๐ Statistics Steppe ยท Statistics
Standard Deviation & z-scores
Measure spread with the average squared distance from the mean, and use z-scores to compare values from different data sets.
In short
- Deviations from the mean always sum to zero, which is why they are squared before being averaged.
- Variance is the average squared deviation; standard deviation is its square root, in the units of the data.
- z = (value - mean) / sd counts standard deviations from the mean, and value = mean + z x sd runs it backwards.
- For roughly bell-shaped data, about 68%, 95% and 99.7% of readings lie within 1, 2 and 3 standard deviations of the mean.
Typical distance from the mean
The range uses two values and the IQR uses four. Standard deviation uses every value in the data set, and it answers the question: how far from the mean is a typical reading?
The obvious approach fails immediately. Add up the distances from the mean and you always get zero, because the values above and the values below cancel exactly โ that is what a mean *is*.
The fix is to square each distance first. Squares are never negative, so nothing cancels, and squaring also makes the far-out readings count for more, which is the behaviour you want from a measure of spread.
Average the squared distances and you have the variance. Take its square root and you have the standard deviation, back in the units of the original data.
Computing it
For the population standard deviation, in four steps:
1. Find the mean. 2. Subtract the mean from each value to get the deviations. 3. Square each deviation and add the squares. 4. Divide by n โ that is the variance โ and take the square root.
For 12, 14, 18, 20: mean = 16. Deviations: -4, -2, 2, 4. Squares: 16, 4, 4, 16, adding to 40. Variance = 40/4 = 10, so the standard deviation is sqrt(10), about 3.16.
Laying it out in three columns โ value, deviation, squared deviation โ makes the whole calculation visible and the slips obvious. Two of them are worth naming now: forgetting the square root leaves you with the variance, whose units are squared; and forgetting to divide leaves you with a total that grows with the size of the data set rather than describing it.
(Statisticians divide by n - 1 when the data is a *sample* being used to estimate a wider population's spread. Everything here is the population version, dividing by n, and every question says so.)
z-scores
A standard deviation gives a ruler, and a z-score measures with it:
z = (value - mean) / standard deviation
A z-score says how many standard deviations a value sits from the mean, and its sign says which side. z = 2 means two standard deviations above; z = -1.5 means one and a half below; z = 0 means exactly at the mean.
That makes values from completely different data sets comparable. A crossing time 2 standard deviations above its mean and a survey score 0.5 standard deviations above its is unusual in a way the score is not, however much bigger the raw numbers look.
The formula runs backwards to recover a value from a z-score:
value = mean + z x standard deviation
Note the multiplication. Adding the z-score to the mean treats a count of standard deviations as if it were a measurement in the original units.
The 68-95-99.7 rule
Many real data sets โ heights, measurement errors, crossing times โ pile up around a central value and thin out symmetrically on both sides, a shape called a normal or bell curve. For those:
- about 68% of readings lie within 1 standard deviation of the mean
- about 95% lie within 2
- about 99.7% lie within 3
With a mean of 60 and a standard deviation of 5, about 95% of readings fall between 50 and 70, and only about 5% fall outside that.
Two things follow. Because the curve is symmetric, half of each figure lies on each side: about 34% between the mean and one standard deviation above it. And a reading with |z| above 2 is genuinely unusual โ it belongs to the outer 5% โ which is where "two standard deviations" gets its reputation.
The rule needs a roughly bell-shaped data set. It says nothing useful about data with a long tail on one side, and nothing at all about six values on a page.
Worked examples
Example 1
Find the population standard deviation of 41, 47, 49, 55.
- Mean = (41 + 47 + 49 + 55) / 4 = 192 / 4 = 48.
- Deviations from the mean: -7, -1, 1, 7.
- Squared deviations: 49, 1, 1, 49, which add to 100.
- Variance = 100 / 4 = 25.
- Standard deviation = sqrt(25) = 5. Sense check: most of the data sits within 5 of 48, that is between 43 and 53, and three of the four values do.
Example 2
Steppe crossing times have mean 84 minutes and standard deviation 12 minutes. What is the z-score of a 60-minute crossing, and what does it say?
- z = (value - mean) / standard deviation.
- z = (60 - 84) / 12.
- 60 - 84 = -24, so z = -24 / 12 = -2.
- The crossing is 2 standard deviations BELOW the mean; the minus sign carries that information.
- By the 68-95-99.7 rule about 95% of crossings lie within 2 standard deviations of the mean, so a time this short is in the fastest 2.5% or so โ genuinely quick.
Practice problems, with solutions
Three problems of increasing difficulty, each with the full working. In the game these are generated fresh every time; these three are fixed so this page always shows the same ones.
Problem 1
Difficulty 1 of 5The survey scores recorded on 4 runs, in points, were: 23, 25, 25, 23 What is the population variance? (Divide by 4.)
Answer: 1
- Mean = 96 / 4 = 24 points.
- Distances from the mean: -1, 1, 1, -1.
- Their squares: 1, 1, 1, 1, which add to 4.
- Variance = 4 / 4 = 1
Problem 2
Difficulty 3 of 5The survey scores recorded on 5 runs, in points, were: 58, 76, 64, 70, 67 What is the population standard deviation? (Divide by 5, then take the square root.)
Answer: 6 points
- Mean = 67 points.
- Squared distances: 81 + 81 + 9 + 9 + 0 = 180.
- Variance = 180 / 5 = 36.
- Standard deviation = sqrt(36) = 6 points.
- Sense check: most of the data sits within one standard deviation of 67, that is between 61 and 73.
Problem 3
Difficulty 4 of 5Across the whole steppe the crossing times have mean 191 minutes and standard deviation 10 minutes. Kofi's reading is 196 minutes. What is its z-score?
Answer: 0.5
- z = (value - mean) / standard deviation
- z = (196 - 191) / 10
- z = 5 / 10 = 0.5
- The positive sign says the reading is above the mean.
Common mistakes
- Averaging the raw deviations instead of the squared ones, which always gives zero.
- Stopping at the variance and calling it the standard deviation, so the answer is in squared units.
- Adding the squared deviations without dividing by n, so the "spread" grows with the size of the data set.
- Adding the z-score straight to the mean instead of multiplying it by the standard deviation first.
- Applying the 68-95-99.7 rule to data that is not roughly bell-shaped, or forgetting that the curve is symmetric so half of each figure lies on each side.
What you should be able to do
- Compute the variance of a small data set from its mean.
- Compute the standard deviation and state it in the units of the data.
- Convert a value to a z-score and read a z-score back into a value.
- Apply the 68-95-99.7 rule to a roughly bell-shaped data set.
Where this fits in the curriculum
Common Core
- HSS-ID.A.2
High school โ Use statistics appropriate to the shape of the data to compare centre (median, mean) and spread (interquartile range, standard deviation) of two or more data sets.
- HSS-ID.A.4
High school โ Use the mean and standard deviation of a data set to fit it to a normal distribution and estimate population percentages.
SAT
- Problem Solving and Data Analysis
Standard deviation as a comparison of spread between data sets.
The SAT asks students to compare standard deviations qualitatively rather than to compute one, so this skill goes further than the test does.