Why do we square the deviations when computing variance? Why not just take the average distance from the mean?
Deviations from the mean always sum to zero, so averaging them raw gives nothing. Squaring removes the sign, and unlike absolute values it is mathematically well behaved and weights large deviations more heavily. Standard deviation is the square root, which returns the number to the original units.
Monthly rainfall in millimetres at a station, over five months:
80 120 100 60 140
The mean is 100. The deviations are −20, +20, 0, −40, +40, and they sum to exactly zero. That is not a coincidence; deviations from the mean always cancel, by construction. So a plain average of deviations is useless as a spread measure.
Two fixes exist. Take absolute values, giving mean absolute deviation of 24. Or square them:
(400 + 400 + 0 + 1600 + 1600) / 5 = 800
That 800 is the variance, in squared millimetres, which is not a unit anyone can picture. Take the square root and you get a standard deviation of about 28.3 mm, back in the original units and directly comparable to the mean.
So why squaring rather than absolute values? Two reasons worth giving. Squaring penalises large deviations disproportionately, which matches how risk usually behaves: one month 40 mm off matters more than two months 20 mm off. And squared deviations behave well under addition, which is what makes variances of independent quantities add up and makes almost all downstream statistics tractable. Absolute deviation is a perfectly valid measure and is genuinely more robust to outliers; it is simply harder to build theory on.
The misconception to correct: standard deviation is not the average distance from the mean. It is the square root of the average squared distance, which is always at least as large, and larger when the deviations are uneven.
For comparing variability across different units, use the coefficient of variation, standard deviation divided by mean, which is unitless.
- If squaring exaggerates large deviations, is that a bug or a feature?
- Two datasets have the same standard deviation but very different shapes — how?
- How would you compare variability between two things measured in different units?