Standard deviation
The standard deviation measures how far values typically sit from the mean. A small value means the data is bunched up. A large value means it is spread out. It uses the same units as the data.
Last updated
Analogy
Two archers both average the centre of the target. The one whose arrows land closer together has the smaller standard deviation.
Example
Data: 2, 4, 4, 4, 5, 5, 7, 9Mean = 40 / 8 = 5Squared gaps: 9,1,1,1,0,0,4,16Sum = 32; variance = 32/8 = 4SD = square root of 4 = 2
In practice
Quality control checks that the standard deviation of bottle fill volume is small, so bottles are consistent.
Practice
Interview questions
- A sample is 2, 4, 6. Calculate the sample standard deviation and explain the n minus 1.
- Mean is 4
- Squared gaps sum to 8
- Variance 8 / 2 = 4
- SD is 2
- n minus 1 corrects bias
Questions people ask
How do you calculate standard deviation step by step?
Find the mean. Subtract it from each value and square the result. Add the squares and divide by the count (or by n minus 1 for a sample). That is the variance. Take its square root to get the standard deviation, back in the original units.
Why do we square the deviations instead of just adding them?
Deviations from the mean always add up to zero, because positives cancel negatives. Squaring makes every term positive, so spread cannot cancel out. It also punishes large gaps more heavily. The square root at the end returns the answer to the original units.