Lesson 5 of 8 · 16 min
Variance and standard deviation
Measure the spread of a continuous random variable with and , using the definition or the quicker form , and interpret the result.
What you will be able to do
- Calculate and .
- Use the computational form , and explain why it is equivalent.
- Use the uniform variance .
- Compare the spread of two distributions from their graphs and standard deviations.
Two densities can have the same mean and still behave very differently. Both densities below live on and balance at , but the hump keeps values close to 2 while the flat one spreads them evenly to the ends. The mean cannot tell them apart. You need a measure of spread.
Same mean, different spread. The uniform density (blue) has ; the hump (orange) has .
Definition
Variance and standard deviation
The variance of is the expected squared distance from the mean:
The standard deviation is , in the same units as . Both are always , and larger values mean more spread.
Expanding gives a form that is almost always quicker by hand, because you integrate and never have to expand a bracket with in it.
Why the two forms agree
Expand the square and split the integral:
The three integrals are , and , so
Worked example
Variance and standard deviation of
has pdf for , and 0 elsewhere, with .
Find exactly, and the standard deviation correct to 3 decimal places.
Step 1: Find E(X²)
Square inside the integral, then weight by the density.
Step 2: Use Var(X) = E(X²) − μ²
Step 3: Take the square root
Step 4: Check against the definition
With technology, . The two forms agree.
Try it yourself first, then check the working one step at a time.
Answer
and
Method
.
, then .
Watch out for
Using instead of : is not the variance.
For on , you found . Given , find .
A blend of the flat and hump densities. The mean stays at 2 for every , but as grows the area gathers near 2 and shrinks, from about 1.15 at to about 0.89 at .
Key idea
Uniform distribution
For uniform on ,
Deriving the uniform variance
Write . Shifting a distribution does not change its spread, so take uniform on , where and :
Buses arrive every 12 minutes and your waiting time is uniform on . Find the standard deviation of , in minutes, correct to 2 decimal places.
Worked example
Spread of on
The error mm in the position of a drilled hole is modelled by for , and 0 elsewhere.
(a) Find .
(b) Write down , giving a reason.
(c) Find the standard deviation of , correct to 3 decimal places.
(d) Find the probability that is within one standard deviation of the mean, correct to 3 decimal places.
Step 1: Total area 1 for (a)
, so .
Step 2: Use symmetry for (b)
, so the density is symmetric about and .
Step 3: Find E(X²)
Step 4: Variance and standard deviation
, so mm.
Step 5: Integrate between μ − σ and μ + σ for (d)
Compare with about 0.68 for a normal distribution: this density has lighter tails and a flatter top, so less of its area is crowded near the mean.
Try it yourself first, then check the working one step at a time.
Answer
(a) (b) by symmetry (c) mm (d)
Method
Find from total area 1.
Use symmetry for the mean where you can.
; when this is just .
Watch out for
Losing the negative limit: is .
Common mistake
E(X²) is not (E(X))²
squares each value before averaging. squares the average. Mixing them up gives or a negative number, which is impossible: a variance is never negative.
Exam tip
Technology on Paper 2
On Paper 2 your calculator can evaluate these definite integrals. Still write the integral you are evaluating, with its limits, for example . On Paper 1 the integrands will be polynomials or other functions you can antidifferentiate by hand.
Summary
measures spread; is in the units of .
Quicker by hand: with .
Uniform on : .
A density with more area far from the mean has a larger standard deviation.
A variance is never negative; if yours is, recheck and .
Finished the lesson?
Try the 2 quick checks above and the lesson completes itself, or mark it complete now.