Standard deviation, explained with examples
Standard deviation tells you how spread out data is around its mean. It is one of the most used numbers in statistics, from exam grades to scientific experiments.
On this page
What standard deviation measures
Two classes can both have a mean test score of 70. In one class, everyone scored between 65 and 75. In the other, scores ranged from 30 to 100. The mean is the same, but the spread is very different. Standard deviation measures that spread: roughly, it is the typical distance of a data value from the mean. A small standard deviation means values cluster tightly around the mean; a large one means they are widely spread.
The formulas
Population standard deviation: σ = √( Σ(x − μ)² / N ), where μ is the population mean and N is the population size.
Sample standard deviation: s = √( Σ(x − x̄)² / (n − 1) ), where x̄ is the sample mean and n is the sample size.
The variance is the square of the standard deviation: σ² or s². Variance is useful in theory, because variances of independent variables add, but standard deviation is easier to interpret because it has the same units as the data.
Why divide by n − 1?
When you work with a sample, you measure distances from the sample mean, not the true population mean. The sample mean is, by definition, the centre of your particular data, so the distances to it are slightly smaller on average than distances to the true mean would be. Dividing by n − 1 instead of n corrects for this, making s² an unbiased estimate of the population variance. This adjustment is called Bessel's correction. In AP Statistics, you almost always work with samples, so s with n − 1 is the default.
Step-by-step calculation
Example 1: a sample
Find the sample standard deviation of 4, 8, 6, 5, 7.
- Mean: (4 + 8 + 6 + 5 + 7)/5 = 30/5 = 6.
- Deviations from the mean: −2, 2, 0, −1, 1.
- Squared deviations: 4, 4, 0, 1, 1. Sum = 10.
- Divide by n − 1 = 4: variance s² = 2.5.
- Square root: s ≈ 1.58.
Example 2: the same data as a population
If 4, 8, 6, 5, 7 were the whole population, find σ.
- Same sum of squares, 10, but divide by N = 5: σ² = 2.
- σ ≈ 1.41, slightly smaller than s.
Example 3: a frequency table
Scores: 1 (frequency 2), 2 (frequency 5), 3 (frequency 3). Find the population standard deviation.
- N = 10. Mean = (2 + 10 + 9)/10 = 2.1.
- Σf x² = 2 + 20 + 27 = 49, so variance = 49/10 − 2.1² = 4.9 − 4.41 = 0.49.
- σ = 0.7. The shortcut variance = mean of squares minus square of mean saves time.
How changes to data affect the standard deviation
- Adding a constant to every value shifts the mean but does not change the standard deviation. Adding 5 points to every test score moves everyone together, so the spread is the same.
- Multiplying by a constant multiplies the standard deviation by the absolute value of that constant. Converting metres to centimetres multiplies the standard deviation by 100.
- Outliers have a big effect, because deviations are squared. One extreme value can inflate the standard deviation a lot. For skewed data or data with outliers, the interquartile range is often a better measure of spread.
Example 4: a linear transformation
Temperatures in a city have mean 20 °C and standard deviation 5 °C. Find the mean and standard deviation in °F, using F = 1.8C + 32.
- Mean: 1.8 × 20 + 32 = 68 °F.
- Standard deviation: 1.8 × 5 = 9 °F. The + 32 does not affect spread.
The empirical rule
For data that is approximately normal (bell-shaped and symmetric), about 68% of values lie within one standard deviation of the mean, about 95% within two, and about 99.7% within three. This is also called the 68-95-99.7 rule. It gives a quick sense of what counts as unusual: a value more than two standard deviations from the mean is in the outer 5% or so.
Example 5: using the empirical rule
Heights of adult women are approximately normal with mean 162 cm and standard deviation 6 cm. Roughly what percentage are between 150 cm and 174 cm?
- 150 and 174 are 2 standard deviations below and above the mean.
- About 95%.
Interpreting standard deviation in context
On AP free-response questions, you may be asked to interpret a standard deviation. A strong answer uses context and the word “typically”: “The commute times typically vary by about 8 minutes from the mean of 32 minutes.” Avoid saying all values are within one standard deviation; many are not.
Common mistakes
- Dividing by n instead of n − 1 for sample data.
- Forgetting to take the square root at the end, leaving the variance.
- Thinking adding a constant changes the spread.
- Using standard deviation for strongly skewed data where the IQR would be better.
Practice questions
Try each one before opening the answer.
Q1. Find the sample standard deviation of 2, 4, 4, 4, 5, 5, 7, 9.
Show answer
Q2. Every value in a data set is doubled. What happens to the standard deviation?
Show answer
Q3. A data set has variance 16. What is its standard deviation?
Show answer
Q4. Can a standard deviation be negative?
Show answer
Q5. Test scores are approximately normal with mean 70 and SD 10. About what percentage are above 90?
Show answer
Frequently asked questions
What is a good standard deviation?
There is no universal answer. It depends on the context and the size of the mean. Comparing the standard deviation with the mean, or with another data set, is more useful than looking at it alone.
Is standard deviation on the AP Statistics exam?
Yes. It appears in Unit 1 for describing data and throughout the course in sampling distributions, confidence intervals and tests.
Is it in GCSE or A level Maths?
Standard deviation is part of A level Maths statistics. GCSE uses the range and interquartile range instead.
Key takeaways
- Standard deviation measures typical distance from the mean.
- Use n − 1 for samples and N for populations.
- Variance is the square of standard deviation.
- Adding a constant does not change spread; multiplying scales it.
- For normal data: 68% within 1 SD, 95% within 2, 99.7% within 3.