Measures of Spread
What You’ll Learn
Section titled “What You’ll Learn”In this lesson you’ll learn to compute range, variance, and standard deviation, understand why we square the deviations, and know why the sample formula divides by instead of .
The Concept
Section titled “The Concept”Why center isn’t enough
Section titled “Why center isn’t enough”Two datasets can share a mean and be completely different.
Both of these have a mean of 50. One clusters tightly; the other sprawls. If they were test scores, the first class is uniformly prepared and the second contains both A students and failures. Reporting only the mean hides that entirely.
Spread (or dispersion, or variability) measures how far the data typically strays from the center. It’s every bit as important as the center, and often more actionable.
The simplest measure:
For 12, 15, 18, 22, 30: range .
It’s easy and nearly useless for serious work, because it depends entirely on the two most extreme values and ignores everything in between. One outlier sets it. Two datasets with the same range can have wildly different shapes.
Deviations, and the squaring problem
Section titled “Deviations, and the squaring problem”To measure typical distance from the center, start with the deviation of each value:
Natural next step: average the deviations. That fails immediately, because the deviations always sum to zero. The positives and negatives cancel exactly, since the mean is the balance point.
For 2, 4, 9 with : deviations are , summing to 0. Always.
Two fixes exist. You could take absolute values, giving the mean absolute deviation, which is perfectly sensible and occasionally used. Statistics instead squares the deviations, because squares behave well under calculus and algebra, which makes the whole theory of inference tractable later.
Variance
Section titled “Variance”Variance is the mean of the squared deviations.
For a population:
For a sample:
Note the denominators differ. More on that below.
Variance has one annoying property: its units are squared. Variance of a set of heights in cm comes out in cm², which is not interpretable. That’s what the standard deviation fixes.
Standard deviation
Section titled “Standard deviation”Standard deviation is the square root of the variance, which puts it back in the original units.
Interpretation: roughly the typical distance of a value from the mean. If test scores have and , a typical student is about 8 points from 75.
Properties worth knowing:
- always. It’s zero only when every value is identical.
- Same units as the data.
- Sensitive to outliers, since squaring magnifies large deviations.
The computation, step by step
Section titled “The computation, step by step”The procedure never changes:
- Find the mean.
- Subtract the mean from each value to get deviations.
- Square each deviation.
- Add the squares.
- Divide by (sample) or (population). That’s the variance.
- Take the square root. That’s the standard deviation.
A useful check at step 2: your deviations must sum to zero. If they don’t, the mean is wrong.
This is the question everyone asks, and it has a real answer.
When you compute a sample variance, you use rather than the true . But is itself computed from the same data, and it sits at the exact center of your sample, which makes your deviations slightly smaller than deviations from the real population mean would be. Dividing by therefore underestimates the population variance systematically.
Dividing by corrects for it exactly. The technical name is Bessel’s correction, and is called the degrees of freedom: once you know the mean and of the values, the last value is determined, so only of the deviations are genuinely free.
Practical note: for large the correction barely matters ( vs is a 0.1% difference). For small samples it matters a lot.
Use only when you genuinely have every member of the population.
Coefficient of variation
Section titled “Coefficient of variation”To compare spread across different scales, use the coefficient of variation, the standard deviation as a percentage of the mean:
A standard deviation of 5 is large for values near 20 and tiny for values near 5,000. The CV makes that comparison possible.
Worked Examples
Section titled “Worked Examples”Example 1: Sample standard deviation, fully worked.
Data: 4, 8, 6, 10, 12 (a sample)
Solution.
Step 1, mean:
Steps 2–3, deviations and squares:
| 4 | −4 | 16 |
| 8 | 0 | 0 |
| 6 | −2 | 4 |
| 10 | 2 | 4 |
| 12 | 4 | 16 |
Deviations sum to ✓
Step 4, sum of squares:
Step 5, variance:
Step 6, standard deviation:
So values sit typically about 3.16 units from the mean of 8.
Example 2: Population versus sample on the same data.
Using the data above, what if those five values were the entire population?
Solution.
Compare to . The sample formula gives a larger answer, which is the correction doing its job: it inflates the estimate to account for the fact that a sample underrepresents the population’s true spread.
Example 3: Same mean, different spread.
Two classes, both with mean 80.
Class A: 78, 79, 80, 81, 82 Class B: 60, 70, 80, 90, 100
Solution.
Class A squared deviations: , summing to 10.
Class B squared deviations: , summing to 1000.
Identical means, standard deviations differing by a factor of 10. Class A is uniformly at the level; Class B has a huge range of ability. Any teaching decision would differ completely between them, and the mean alone would never tell you.
Example 4: Coefficient of variation.
Compare variability: a set of adult heights ( cm, cm) versus a set of annual incomes (, ).
Solution.
Income is roughly nine times more variable relative to its own scale. Comparing the raw standard deviations (8 versus 21,000) would have been meaningless, since the units differ.
Example 5: Zero standard deviation.
What does tell you?
Solution. Every value is identical. If then , and since squares can’t be negative, every single deviation must be zero, so every equals .
If you compute this on real data, suspect a mistake: a column of copied values, or a measurement instrument that’s stuck.
Real-World Applications
Section titled “Real-World Applications”Investment risk is standard deviation, essentially by definition. Two funds with the same average return but different standard deviations are not the same product: the high- fund swings harder in both directions. “Volatility” in finance is the standard deviation of returns, and most portfolio theory is about trading expected return against it.
Manufacturing quality control is built on it. Six Sigma takes its name from requiring the tolerance limits to sit six standard deviations from the mean, so almost nothing falls outside spec. A process with a good mean and a large produces plenty of defective units.
Weather and climate comparisons need spread. Two cities can share an annual mean temperature while one is mild year-round and the other swings between extremes. San Diego and a continental city can average the same and feel nothing alike.
Grading on a curve uses the standard deviation to set boundaries, which is also where z-scores come from in the next lessons.
In A/B testing, the variance of your metric determines how large a sample you need. High-variance metrics (revenue per user, say) require far more traffic to detect a real effect than low-variance ones (click-through rate).
Retrying will remove your ✅ checkmark until you pass again.