Glossary Math & Statistics

Standard deviation

Standard deviation measures how far values typically stray from their mean; it is the square root of the variance.

Last reviewed:

AdSense Placeholder
Slot: header_reference_page

In more detail

To compute it, take each value's distance from the mean, square it, average the squares (that is the Variance) and take the square root. Dividing by n gives the population standard deviation, used when you have every value; dividing by n − 1 gives the sample standard deviation, used when the data are a sample from something larger, because a sample's own mean sits slightly too close to its values. Roughly 68% of bell-shaped data lies within one standard deviation of the mean. See How Standard Deviation Works.

Why it matters

It tells you whether an average is typical: two classes with the same mean of 70 are very different if one has SD 3 and the other SD 15. It is the yardstick for z-scores, control charts, investment volatility and error bars. Tools differ in which version they default to: Python's statistics.pstdev and Excel's STDEV.P use n, while statistics.stdev and STDEV.S use n − 1.

Example

Data 2, 4, 4, 4, 5, 5, 7, 9 (mean 5):

deviations      −3  −1  −1  −1   0   0   2   4
squared          9   1   1   1   0   0   4  16    sum = 32
population SD = √(32 / 8) = √4     = 2
sample SD     = √(32 / 7) = √4.571 = 2.138

Common confusion

The standard error, SD / √n, measures how precisely the mean is known, not how spread out the values are: here 2.138 / √8 = 0.756. Error bars must say which one they show.

AdSense Placeholder
Slot: footer_leaderboard