Standard Deviation
The standard deviation measures how far the values in a data set typically lie from their mean. The range and the interquartile range also describe spread, but the standard deviation uses every value, and it is the measure that the rest of the course is built on: the variance of a random variable, the binomial distribution and the normal distribution all use it. On Paper 5 you calculate it from raw data, frequency tables, grouped data and given totals, combine two data sets, and use it to compare and contrast distributions in context.
Measuring spread from the mean
Take the eight values . Their mean is . Each value has a deviation from the mean, :
A natural first idea is to average the deviations, but they always add to zero: the values above the mean exactly balance those below. That is what the mean is. So the deviations are squared first, which makes them all positive and gives large deviations more weight. Averaging the squared deviations gives the variance:
The variance is measured in squared units (if is in cm, the variance is in ), so we take its square root to return to the units of the data. That is the standard deviation: to 3 significant figures. Roughly speaking, a typical value lies about from the mean.
The variance of a data set is the mean of the squared deviations from the mean. The standard deviation is the positive square root of the variance. It has the same units as the data. A larger standard deviation means the values are more spread out about the mean; a standard deviation of means every value is equal.
The two forms of the formula
Expanding gives an equivalent form that is far quicker to use, because it needs only the totals and and never the individual deviations.
For values with mean :
For a frequency table, or grouped data using the mid-points as :
Both forms are on the formula list. A useful way to remember the second: the variance is the mean of the squares minus the square of the mean.
Check with the eight values: and , so the variance is , as before.
is not . means square each value, then add. For the data above, , but . Mixing these up gives a nonsense (often negative) variance.
Frequency tables and grouped data
In a frequency table each value occurs times, so it contributes to the total and to the total of squares. Add two columns, and , to the table and total them. Note that means , not .
For grouped data the individual values are unknown, so each class is represented by its mid-point, found from the class boundaries (see histograms and class boundaries). The answers are then estimates, because we are assuming every value in a class sits at its mid-point.
- Find (or ).
- Make columns for (mid-points if grouped), and , and total them.
- Calculate and keep it to full calculator accuracy.
- Calculate the variance , then square-root it.
- Give the answer to 3 significant figures, and say "estimate" if the data were grouped.
Working from totals
Exam questions often skip the data and give you summary totals, or give you the mean and standard deviation and ask you to work backwards. Everything follows from three facts, all just rearrangements of the formulas:
where is the standard deviation and the variance. Totals can be added and subtracted; means and standard deviations cannot.
The second fact is the variance formula rearranged for . It is the key to every "combine two groups" and "a value is removed" question.
Combining two data sets
To find the mean and standard deviation of two data sets put together:
- For each set, find and .
- Add the s, the s and the s.
- Apply the formulas to the combined totals.
The combined mean is not the average of the two means (unless the sets are the same size), and the combined standard deviation is never found by averaging or adding standard deviations. It can even be larger than both, because the gap between the two means adds spread.
Using the calculator
Your calculator's statistics mode will give and the standard deviation directly from a list or a frequency table. Use it to check, not to replace, written working: the examiner needs to see , (or , ) and the formula, or the method marks are lost if the final answer is wrong. The calculator symbol you want is (or ), which divides by . The symbol (or ) divides by and belongs to Paper 6; it gives a slightly larger answer that Paper 5 mark schemes do not accept.
Interpreting and comparing
A standard deviation means nothing on its own; it is a tool for comparison. When asked to "compare" two data sets, make one comment on the average and one on the spread, each in the context of the question.
- "On average, the girls took longer than the boys (mean s compared with s)."
- "The boys' times were more variable (standard deviation s compared with s), so the girls' times were more consistent."
The standard deviation is affected by every value, including extreme ones; one outlier can inflate it a lot. For skewed data or data with outliers, the median and interquartile range (see median, quartiles and interquartile range) describe the data better. For roughly symmetrical data without outliers, the mean and standard deviation are preferred because they use all the data.
Two quick checks catch most arithmetic errors. The variance can never be negative, and the standard deviation can never be more than half the range. For the eight values above, the range is and the standard deviation , comfortably inside that limit.
Worked examples
The numbers of emails received by a worker on eight days were
Find the mean and standard deviation.
Solution
, , .
The number of goals scored by a team in each of matches is recorded.
| Goals, | ||||||
|---|---|---|---|---|---|---|
| Frequency, |
Calculate the mean and standard deviation of the number of goals.
Solution
| Total |
The times, minutes, taken by people to complete a puzzle are summarised.
| Time (minutes) | |||||
|---|---|---|---|---|---|
| Frequency |
Calculate estimates of the mean and standard deviation of the times.
Solution
Mid-points .
| Mid-point | |||
|---|---|---|---|
| Total |
These are estimates because the times within each class are assumed to be at the mid-point. Notice that was kept unrounded: using instead gives , a different final answer.
A set of values has mean and standard deviation .
(a) Find and .
(b) A further value, , is added to the set. Find the new mean and standard deviation.
Solution
(a) .
From : .
(b) Now , , .
The new value is above the mean and further from it than a typical value, so the mean rises slightly and the standard deviation increases.
The times taken by boys to run have mean seconds and standard deviation seconds. The times of girls have mean seconds and standard deviation seconds. Find the mean and standard deviation of the times of all students.
Solution
Boys: , .
Girls: , .
Combined: , , .
The combined standard deviation is close to the boys' value, even though the girls' times were less spread out, because the difference between the two means adds to the overall spread.
Five numbers are and , where . Their mean is and their variance is . Find and .
Solution
Mean. , so and .
Variance. , so and .
Substitute :
Since , and .
Check: have and , giving variance .
Rounding the mean too early. Squaring a rounded mean in can change the third significant figure of the answer, and with large values can even make the variance negative. Store in the calculator memory and use the stored value.
Using the wrong mid-points. For classes such as "–" of rounded or discrete data, the mid-point is , not . Find the class boundaries first.
Averaging standard deviations. When two groups are combined, the combined standard deviation is not and not a weighted average. Always go back to and .
Forgetting the square root. A question asking for the standard deviation wants . Write "variance " and "standard deviation " so you and the examiner can see which is which.
- Show the totals and (or and ) and the formula with numbers substituted. A correct method earns marks even after an arithmetic slip; a bare calculator answer earns nothing if it is wrong.
- Give final answers to 3 significant figures unless told otherwise, but carry full accuracy in between.
- Use (divide by ) on the calculator, never .
- For grouped data, the word "estimate" in the question is a reminder to use mid-points; say why the answer is an estimate if asked.
- "Compare" questions need two comments, one on the centre and one on the spread, each with the figures quoted and phrased in the context of the question ("the girls' times were more consistent"), not just "B has a higher standard deviation".
- Variance mean of the squared deviations ; standard deviation .
- For frequency tables and grouped data, weight by : . Grouped data use mid-points and give estimates.
- is the sum of the squares, not the square of the sum.
- and : use these to work backwards and to combine or adjust data sets.
- Add totals, never means or standard deviations.
- Keep unrounded until the end; answers to 3 s.f.
- Compare with one comment on average and one on spread (consistency), in context.
- The standard deviation uses all the data but is distorted by outliers; then prefer the median and IQR.
Practice questions
-
Find the mean and standard deviation of .
-
The table shows the number of people, , living in each of houses.
Frequency Calculate the mean and standard deviation of .
-
For values, and . Find the mean and the standard deviation.
-
values have mean and standard deviation . Find and .
-
The heights, cm, of students are summarised.
Height (cm) Frequency Calculate estimates of the mean and standard deviation of the heights.
-
In a test, the students in class P had mean mark and standard deviation . The students in class Q had mean and standard deviation . Find the mean and standard deviation of the marks of all students.
-
Fifteen values have mean and standard deviation . One value, , is found to be an error and is removed. Find the mean and standard deviation of the remaining values.
-
Two shops record the number of customers each day over a month. Shop A: mean , standard deviation . Shop B: mean , standard deviation . Compare the numbers of customers at the two shops.
-
A set of values has mean and standard deviation . A further values, each equal to , are added. The standard deviation of the new set is . Find .
-
For a set of values, , and the variance is . Find and the mean.
Answers
-
, , . Mean . Variance , so standard deviation (3 s.f.).
-
, , . Mean (3 s.f.). Variance , standard deviation (3 s.f.).
-
Mean . Variance . Standard deviation (3 s.f.).
-
. .
-
Mid-points . , , . Mean . Variance . Standard deviation (3 s.f.). Both are estimates, since mid-points were used.
-
P: , . Q: , . Combined: , , . Mean . Variance . Standard deviation (3 s.f.).
-
Original: , . Remove : , , . Mean (3 s.f.). Variance . Standard deviation (3 s.f.).
-
On average, shop A had more customers per day than shop B (mean compared with ). The number of customers at shop B was much more variable (standard deviation compared with ), so shop A's daily numbers were more consistent.
-
Original: . Each added value equals the mean, so it adds to and leaves the mean at . New variance , so and .
-
. Multiply by : , so , i.e. . The discriminant is , so , giving or . The number of values must be a whole number, so and the mean is . (Check: .)