Standard deviation and variance
How to put a number on how spread out data is. One small data set, worked by hand: distances from the mean, their squares, the variance and its square root.
In 30 seconds
The mean says where data is centred. The standard deviation says how far, typically, the values sit from that centre.
To get it: find the mean, take each value’s distance from it, square the distances, and average the squares. That average is the variance. Its square root is the standard deviation, back in the data’s own units.
If your data is a sample standing in for a larger group, divide by n − 1 instead of n when averaging the squares.
Standard deviation and variance, step by step
Dividing by n − 1 (Bessel’s correction) makes the sample variance right on average. Its square root is the usual sample standard deviation, though it still runs slightly low on average.
- Step 1: Same mean, different spread. Two teams each average 4 goals over five matches. Team A is steady, team B swings between 1 and 7. The mean cannot tell them apart, so we need a second number that says how far the data typically sits from its mean.
- Step 2: Find the mean. We work with team B. Add the five values and divide by how many there are: 20 / 5 = 4. The mean is the balance point of the data: put the dots on a beam and it would rest level on a pivot at 4.
- Step 3: Distance from the mean. For each value, measure how far it sits from the mean: 1 is 3 below, 7 is 3 above. These signed distances are called deviations. They always add up to exactly zero, because the mean is the balance point, so their plain average is useless as a measure of spread.
- Step 4: Square each distance. Squaring fixes the cancelling: every square is positive, so below and above both count. It also weighs big gaps more heavily: a distance of 3 contributes 9, nine times as much as a distance of 1. The five squares add up to 20.
- Step 5: Variance: the average square. Share that total equally among the five matches: 20 / 5 = 4. This is the variance, the average squared distance from the mean. It is a sound measure of spread, but its unit is awkward: goals squared, not goals.
- Step 6: Standard deviation: the root. Take the square root to get back to the original unit: √4 = 2 goals. That is the standard deviation, the side of the average square. Read it as the typical distance from the mean, with big gaps given extra weight. The same steps give steady team A just 0.63.
- Step 7: Divide by n or by n − 1?. If these five matches are everything you care about, divide by n = 5. If they are a sample used to estimate the spread of something bigger, divide by n − 1 = 4. A sample sits closer to its own mean than to the true mean, so its squares run small; n − 1 corrects that, giving 5 and a standard deviation of about 2.24.
Try it yourself
Learn this first
Nothing. This concept starts from scratch.
Spotted a mistake on this page?