Which runner is steadier?
Two runners both average 60 seconds for a lap. One is always within 2 seconds of that. The other swings between 50 and 70.
The coach wants one number that says how steady each runner is. That number is the standard deviation.
Key words
| Word | What it means |
|---|---|
| Dataset | a collection of records held together for analysis |
| Mean | the total divided by how many values there are |
| Deviation | how far one value is from the mean |
| Variance | the mean of the squared deviations |
| Standard deviation | the square root of the variance: a typical gap from the mean, in the data's own units |
| Population | all of the values you care about, not just a sample |
| Sample | a smaller group taken from the population |
The cells students fill in are left blank in this preview.
By the end of this lesson
Note
I can work out the variance and standard deviation of a small dataset, and say what a large or small one means.
Starter
Have a go
Starter
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
The idea in four steps
Standard deviation says how far values typically are from the mean.
- Find the mean.
- Find each value's gap from the mean, and square the gap, so that gaps below the mean do not cancel gaps above it.
- Take the mean of the squared gaps. This is the variance.
- Take the square root of the variance.
Worked example: eight lap times
| Time | Gap from mean (5) | Squared gap |
|---|---|---|
| 2 | -3 | 9 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
| Total | 32 |
The cells students fill in are left blank in this preview.
Worked example: from squares to the answer
| Step | Working | Result |
|---|---|---|
| Mean | 40 divided by 8 | 5 |
| Variance | 32 divided by 8 | 4 |
| Standard deviation | The square root of 4 | 2 |
The cells students fill in are left blank in this preview.
Try it: standard deviation in Python
times = [2, 4, 4, 4, 5, 5, 7, 9]
mean = sum(times) / len(times)
total = 0
for t in times:
total = total + (t - mean) ** 2
variance = total / len(times)
print("variance", variance)
print("standard deviation", variance ** 0.5)
# Change every time to 5. What is the standard deviation?
What the number means
A small standard deviation means values sit close to the mean: a steady runner. A large one means they are spread out: an unsteady runner.
It is in the same units as the data, so 2 here means about 2 seconds. A standard deviation of 0 means every value is the same.