Standard deviation and the bell curve
Tonight's idea
The mean \(\mu\) tells you where a data set sits. The standard deviation \(\sigma\) tells you how spread out it is.
Take each value's deviation from the mean, \(x - \mu\). You cannot just average these: they always sum to zero, because the values above the mean cancel the values below. So square them first. The average of the squared deviations is the variance, and its square root, which puts the units back, is the standard deviation:
\[\sigma^2 = \dfrac{(x_1-\mu)^2 + \cdots + (x_n-\mu)^2}{n}, \qquad \sigma = \sqrt{\sigma^2}.\]
Heights, measurement errors, exam scores and the sum of many dice all pile up in roughly the same bell shape, the normal curve, and on it \(\sigma\) is a ruler: about 68% of the data lie within one \(\sigma\) of the mean, 95% within two, 99.7% within three. A z-score, \(z = (x - \mu)/\sigma\), measures a value in those units, which is how you compare a math(s) score with a running time.
One warning. Two quantities can rise and fall together, a correlation, without either causing the other. Ice cream sales and drownings both rise in summer; hot weather drives both. The hidden third variable is a confounder; look for one whenever a headline says "linked to".
Watch one: eight numbers by hand
Data: 2, 4, 4, 4, 5, 5, 7, 9. Sum 40, so \(\mu = 5\). Deviations \(-3, -1, -1, -1, 0, 0, 2, 4\) (they sum to 0). Squares \(9, 1, 1, 1, 0, 0, 4, 16\), total 32. Variance \(32/8 = 4\), so \(\sigma = 2\). The value 9 has \(z = (9-5)/2 = 2\): on a normal curve, about 2.3% of values are that high or higher.
| \(z\) | 1 | 1.5 | 2 | 2.5 | 3 |
|---|---|---|---|---|---|
| fraction above \(z\) | 15.9% | 6.7% | 2.3% | 0.6% | 0.13% |
A tiny normal table. By symmetry the fraction below \(-z\) is the same.
Your turn
- Compute \(\mu\) and \(\sigma\) for the data 3, 7, 7, 19, showing the deviations and their squares.
- Without recomputing, give \(\mu\) and \(\sigma\) when (a) 10 is added to every value in question 1, and (b) every value is doubled. One sentence of reason each.
- Adult heights are roughly normal with \(\mu = 170\) cm and \(\sigma = 8\) cm. Estimate the fraction taller than 178 cm and the fraction between 154 and 186 cm. Then find the z-score of someone 190 cm tall and, from the table, the fraction taller than them.
- Name a plausible confounder for each: (a) cities with more firefighters suffer more fire damage; (b) countries that eat more chocolate win more Nobel prizes.
Watch a bell curve build itself at mathdetours.com/demos/galton.html.
Stretch: the shortcut formula
Expand each \((x - \mu)^2\) in the variance, add up, and use the fact that the deviations sum to zero to prove \(\sigma^2 = \overline{x^2} - \mu^2\), where \(\overline{x^2}\) is the mean of the squares. Check it on the example (the squares average 29).
Answers
- Sum 36, \(\mu = 9\). Deviations \(-6, -2, -2, 10\); squares \(36, 4, 4, 100\), total 144; variance 36; \(\sigma = 6\).
- (a) \(\mu = 19\), \(\sigma = 6\): shifting every value shifts the mean too, so no deviation changes. (b) \(\mu = 18\), \(\sigma = 12\): every deviation doubles, so the variance quadruples and \(\sigma\) doubles.
- 178 is one \(\sigma\) above: about 16% taller. 154 to 186 is \(\mu \pm 2\sigma\): about 95%. 190 cm: \(z = 20/8 = 2.5\), so about 0.6% are taller.
- (a) The size of the fire: big fires attract more crews and do more damage. (b) National wealth: rich countries buy more chocolate and fund more research.
Stretch. \(\sum (x-\mu)^2 = \sum x^2 - 2\mu\sum x + n\mu^2 = \sum x^2 - 2\mu \cdot n\mu + n\mu^2 = \sum x^2 - n\mu^2\). Divide by \(n\): \(\sigma^2 = \overline{x^2} - \mu^2\). Example: \(29 - 25 = 4\). ✓