My Year 12 Mathematics Methods students are doing continuous random variables at the moment and I thought it would be worthwhile deriving the mean and variance formulas for a uniform continuous random variable.
The probability density function for a uniform random variable is
![]()
and it looks like

Remember, the mean
or expected value
of a continuous random variable is
(1) ![]()
and the variance
is
(2) ![]()
We are going to use equations
and
to find formulae for a uniform continuous random variable.
![]()
![]()
![]()
Factorise the numerator (using difference of squares)
![]()
Hence,
![]()
Now for the variance
![]()
![]()
![]()
![]()
![]()
![]()
From the binomial expansion theorem, we know
![]()
Hence
![]()
and
![]()


