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 xixˉx_i - \bar{x}, where xix_i is one value and xˉ\bar{x} (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 45/5=945/5 = 9, 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: (xixˉ)=xinxˉ\sum (x_i - \bar{x}) = \sum x_i - n\bar{x}, and nxˉn\bar{x} 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 n1=4n - 1 = 4 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, yy^y - \hat{y} (y minus y-hat), measures an observed response against what a model predicted.

Absolute values are the other way to stop the cancellation. Averaging xixˉ|x_i - \bar{x}| gives the mean absolute deviation, (5+2+0+3+4)/5=2.8(5 + 2 + 0 + 3 + 4)/5 = 2.8 here. Squaring wins out because squared deviations have algebra behind them that absolute values do not, which is why ss carries through the rest of the course.

Where this comes up

123 pages on the site use this term.

More describing data terms, or browse the full statistics glossary.