Lesson 4 of 8 · 18 min
Variance and standard deviation
Measure the spread of a discrete random variable with the variance and standard deviation, by the definition and by the quicker computational form, and use them to compare distributions.
What you will be able to do
- Calculate from a probability function.
- Use the computational form .
- Calculate the standard deviation and interpret it as a typical distance from the mean.
- Compare the spread of two distributions with the same mean.
Two random variables can have the same mean and still behave very differently. Let take the values 1, 2, 3 with probabilities 0.25, 0.5, 0.25, and let take the values 0, 2, 4 with the same probabilities. Both have mean 2, but lands further from 2. A mean on its own doesn't tell you how risky or predictable something is. For that you need a measure of spread.
Same mean, different spread: (orange) and (blue). Both balance at 2.
Key idea
Variance and standard deviation
The variance of is the probability-weighted mean of the squared distances from the mean:
The standard deviation is its square root,
which is back in the units of . Roughly, is a typical distance between and its mean.
For above: the distances from the mean are , 0 and 1, so
For the distances are , 0 and 2, so and . is twice as spread out as .
Let be the number of heads when three fair coins are tossed, so , , , and . Find .
The definition needs first and then a subtraction for every value. Expanding the square gives a quicker route that only needs .
Why the two forms agree
Expand and split the sum:
Now and , so this is
Worked example
Calculate the variance and standard deviation
For the number of goals in a quarter from the earlier example,
| 0 | 1 | 2 | 3 | 4 | |
|---|---|---|---|---|---|
| 0.1 | 0.3 | 0.35 | 0.15 | 0.1 |
with , calculate and the standard deviation of , correct to 2 decimal places.
Step 1: Calculate
Square each value first, then weight it by its probability.
Step 2: Use the computational form
Step 3: Take the square root
Step 4: Interpret
The number of goals in a quarter is typically about 1.1 goals away from the mean of 1.85.
Try it yourself first, then check the working one step at a time.
Answer
and goals.
Method
Find .
Find .
; then .
Watch out for
Using in place of , giving 0.
Rounding before squaring it.
Stopping at the variance when the standard deviation is asked for.
The bracket marks , one standard deviation either side of the mean. Which values of lie inside it?
For the score on a fair die, . Use to find .
Common mistake
is not
squares each value, then takes the weighted average. takes the average, then squares. Their difference is the variance, so they are equal only when there is no spread at all. Since a variance can't be negative, always: a negative variance means an arithmetic slip.
Without technology
Set out a table with rows , , and . Add the last two rows to get and , then . Keep fractions exact on Paper 1.
With technology
Enter the values in one list and the probabilities in another, then run one-variable statistics with the probability list as the frequency list. The calculator's mean is and its is the standard deviation. Ignore , which is for samples.
Extension: scaling and shifting change the spread differently
Adding a constant moves every value, and the mean, by the same amount, so the distances from the mean don't change. Multiplying by multiplies every distance by , and every squared distance by :
If the drink stall's sales have , its profit has standard deviation .
Exam tip
Variance or standard deviation?
Read which one is asked for. The variance is in squared units (dollars squared, people squared), so when you interpret spread in context, use the standard deviation. Give it to the accuracy asked, rounding only at the end.
Summary
measures spread in squared units.
The quicker form is with .
is in the units of : a typical distance from the mean.
Distributions with the same mean can have very different spreads.
A variance is never negative, and unless there is no spread.
Finished the lesson?
Try the 2 quick checks above and the lesson completes itself, or mark it complete now.