IB MYP Extended Mathematics · Statistics and probability
Standard deviation
1Why another measure of spread?
The range uses only the two extreme values, and the interquartile range uses only the middle half. The standard deviation uses every value: it measures how far, on average, the data lie from the mean.
- A small standard deviation means the values are bunched close to the mean: the data are consistent.
- A large standard deviation means the values are spread widely.
Same mean, different spread
- Set A: 48, 49, 50, 51, 52. Mean 50.
- Set B: 10, 30, 50, 70, 90. Mean 50.
- The means are equal, but B is far more spread out.
- Standard deviations: A is about 1.41 and B is about 28.3.
The standard deviation has the same units as the data. If the data are heights in centimetres, so is the standard deviation.
It is the usual partner of the mean, just as the interquartile range is the partner of the median. It is written $\sigma$ (sigma) for a whole population.
Check yourself
Two classes have the same mean test score. Class P has a smaller standard deviation. What does this show?
Show the answer
Class P's scores are more consistent
A smaller standard deviation means values closer to the mean.
2Calculating standard deviation
The method, step by step:
- Find the mean, $\bar{x}$.
- Find each value's deviation from the mean: $x - \bar{x}$.
- Square each deviation (this removes the negative signs).
- Find the mean of the squares. This is the variance, $\sigma^2$.
- Take the square root. This is the standard deviation, $\sigma$.
$$\sigma = \sqrt{\frac{\sum (x - \bar{x})^2}{n}}$$
The data 2, 4, 4, 4, 5, 5, 7, 9
- Mean: 40 ÷ 8 = 5.
- Deviations: −3, −1, −1, −1, 0, 0, 2, 4.
- Squares: 9, 1, 1, 1, 0, 0, 4, 16.
- Sum of squares: 32. Variance: 32 ÷ 8 = 4.
- Standard deviation: $\sqrt{4} = 2$.
The deviations themselves always add to zero, which is why they must be squared before averaging.
An equivalent formula is quicker when the mean is awkward: $\sigma^2 = \dfrac{\sum x^2}{n} - \bar{x}^2$ ("the mean of the squares minus the square of the mean").
Checking with the second formula
- $\sum x^2 = 4 + 16 + 16 + 16 + 25 + 25 + 49 + 81 = 232$.
- $\dfrac{232}{8} - 5^2 = 29 - 25 = 4$. The same variance.
In practice a calculator or spreadsheet does this in statistics mode. You should be able to do a small set by hand and to interpret the result.
Check yourself
The variance of a data set is 25. What is the standard deviation?
Show the answer
5
The standard deviation is the square root of the variance.
3Standard deviation from a frequency table
For data in a frequency table, each value is counted as many times as its frequency.
$$\bar{x} = \frac{\sum fx}{\sum f}, \qquad \sigma^2 = \frac{\sum fx^2}{\sum f} - \bar{x}^2$$
Values 1, 2, 3 with frequencies 2, 5, 3
- $\sum f = 10$.
- $\sum fx = 2 + 10 + 9 = 21$, so the mean is 2.1.
- $\sum fx^2 = 2(1) + 5(4) + 3(9) = 2 + 20 + 27 = 49$.
- Variance: $\dfrac{49}{10} - 2.1^2 = 4.9 - 4.41 = 0.49$.
- Standard deviation: $\sqrt{0.49} = 0.7$.
For grouped data, use the midpoint of each class as $x$. The result is then an estimate.
Take care with $\sum fx^2$: square the value first, then multiply by the frequency. It is not $(\sum fx)^2$.
Some calculators show two values: $\sigma$ (dividing by $n$, for a whole population) and $s$ (dividing by $n - 1$, for a sample used to estimate a population). Use $\sigma$ unless told otherwise.
Check yourself
For a frequency table, how is Σfx² calculated?
Show the answer
Square each value, multiply by its frequency, then add
Each value is squared first, then weighted by how often it occurs.
4The effect of changing the data
What happens to the mean and standard deviation when every value is changed in the same way?
- Adding a constant $k$ to every value: the mean increases by $k$; the standard deviation is unchanged. The whole set slides along without spreading.
- Multiplying every value by $k$: the mean is multiplied by $k$; the standard deviation is multiplied by $|k|$.
Test scores
- A test has mean 60 and standard deviation 8.
- Everyone is given 5 bonus marks: mean 65, standard deviation still 8.
- Instead, every score is doubled to make it out of 200: mean 120, standard deviation 16.
- Scores are converted with $y = 1.5x + 10$: mean 1.5 × 60 + 10 = 100, standard deviation 1.5 × 8 = 12.
Outliers affect the standard deviation strongly, because deviations are squared. One extreme value can increase it a great deal. For skewed data or data with outliers, the median and interquartile range describe the set better.
Check yourself
Every value in a data set is increased by 10. What happens to the standard deviation?
Show the answer
It stays the same
Adding a constant shifts all the values but does not change how spread out they are.
5Interpreting and comparing
To compare two data sets, comment on the centre and on the spread, in context.
Two machines filling 500 g bags
- Machine A: mean 501 g, standard deviation 1.2 g. Machine B: mean 500 g, standard deviation 4.5 g.
- Centre: both are close to the target; A slightly overfills on average.
- Spread: A is much more consistent. B's fills vary widely, so many of its bags will be noticeably under or over 500 g.
- Conclusion: A is the more reliable machine, although it gives away about 1 g a bag.
For many natural measurements (heights, masses, errors) the data form a symmetrical bell shape, the normal distribution. Then:
- about 68% of values lie within 1 standard deviation of the mean;
- about 95% within 2;
- about 99.7% within 3.
Using the rule
- Heights have mean 165 cm and standard deviation 7 cm.
- About 68% lie between 158 cm and 172 cm.
- About 95% lie between 151 cm and 179 cm.
- A height of 190 cm is more than 3 standard deviations above the mean, so it is very unusual.
A value's distance from the mean, in standard deviations, tells you how unusual it is. A score of 76 in a test with mean 60 and standard deviation 8 is 2 standard deviations above the mean.
Check yourself
Masses have mean 50 kg and standard deviation 4 kg, and are normally distributed. About what percentage lie between 42 kg and 58 kg?
Show the answer
95%
42 and 58 are two standard deviations either side of the mean.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera