Deviation
By Jude Wallis · Updated
A deviation is the signed distance from a single data value to the mean, found by subtracting the mean from that value.
A deviation belongs to a single observation, not to a data set. It is written , where is one value and (x-bar) is the mean of all of them, and it keeps the units of the data. The sign is part of the answer: positive puts the value above the mean, negative below it.
For 4, 7, 9, 12, 13 the mean is , so the five deviations are -5, -2, 0, 3, and 4. They add to exactly 0, which is not a fact about this data set: , and is the total by definition, so the terms cancel every time. Squaring first rescues the idea. Those squared deviations are 25, 4, 0, 9, and 16, summing to a sum of squares of 54, which divided by gives a variance of 13.5 and a standard deviation of 3.67.
"The deviation of this data set is 3.67" is a category error and the most common one on this page. Five values have five deviations; 3.67 is the standard deviation, one summary built from all of them. Calling one number the deviation of a whole set throws away the distinction that makes the formula work.
The exact-zero check only holds on an unrounded mean. On a set whose mean comes out as 9.333, rounding it to 9.3 before subtracting leaves the deviations missing zero by a little, a rounding artifact and not an error in the data. A deviation is also not a residual: a deviation measures a value against the mean of its own variable, while a residual, (y minus y-hat), measures an observed response against what a model predicted.
Absolute values are the other way to stop the cancellation. Averaging gives the mean absolute deviation, here. Squaring wins out because squared deviations have algebra behind them that absolute values do not, which is why carries through the rest of the course.
Where this comes up
- How to calculate standard deviation by handGuide
- Is a higher standard deviation better? It dependsGuide
- Mean absolute deviation (MAD): formula and examplesGuide
- Standard error vs standard deviation explainedGuide
- Standard deviation vs IQR: which spread to useComparison
- Standard deviation vs variance: the differenceComparison
- Why divide by n - 1 for sample standard deviation?Guide
- What does standard deviation actually mean?Guide
123 pages on the site use this term.
More describing data terms, or browse the full statistics glossary.