Standard Deviation Guide: How Spread Is Measured标准差指南:如何衡量数据离散程度
The mean tells you the center of a dataset; the standard deviation tells you how spread out it is. Two datasets can have the same average — say a class average of 75 on a test — but very different stories if one has everyone clustered at 70–80 and the other has half at 50 and half at 100. Standard deviation captures that difference in a single number. This guide explains the two formulas (population vs sample), what the resulting number actually means, and the famous 68-95-99.7 rule that makes it useful.
What Is Standard Deviation?
Standard deviation (σ or s) measures the average distance of data points from the mean. A small standard deviation means points cluster tightly around the average; a large one means they're spread out. It's the most common way to summarize spread in a dataset.
Standard deviation is the square root of the variance — and the variance is the average of squared deviations from the mean. The "square then square root" structure removes the effect of sign (a point 5 above and a point 5 below the mean both contribute the same).
Population Standard Deviation
When your data is the entire population of interest (not a sample), use this formula:
- σ — population standard deviation
- μ — population mean
- xᵢ — each data point
- N — number of data points (population size)
Use this when you have every member of the group, not a sample.
Worked example with the dataset {2, 4, 4, 4, 5, 5, 7, 9}:
Mean μ = (2+4+4+4+5+5+7+9)/8 = 40/8 = 5
Squared deviations: (2−5)²=9, (4−5)²=1 (×3), (5−5)²=0 (×2), (7−5)²=4, (9−5)²=16
Sum = 9 + 3 + 0 + 4 + 16 = 32
σ = √(32/8) = √4 = 2
Sample Standard Deviation
When your data is a sample from a larger population (almost always the case in real research), use Bessel's correction — divide by n − 1, not n:
- s — sample standard deviation
- x̄ — sample mean
- n — sample size
Dividing by (n−1) instead of n corrects for the fact that samples underestimate population variance — degrees of freedom decrease by one.
Same dataset, treated as a sample:
s = √(32/7) = √4.571 ≈ 2.138
The sample formula gives a slightly larger value — that's the correction. For n > 30, the difference between the two formulas is essentially zero.
Why the (n−1) Correction
The sample standard deviation uses (n−1) because the sample mean is itself estimated from the data. You've already "used up" one degree of freedom to compute x̄, so only n−1 independent deviations remain. Dividing by n would systematically underestimate the true population standard deviation.
This matters most for small samples. For n = 5, dividing by 5 gives a number 13% too small; for n = 100, only 0.5% too small.
The 68-95-99.7 Rule
For data that's roughly bell-shaped (normal distribution), standard deviation has a clean interpretation:
≈ 95% within μ ± 2σ
≈ 99.7% within μ ± 3σ
Known as the "empirical rule" — applies to any normal distribution.
Worked example: adult male heights in the US are approximately normal with mean 70 inches and standard deviation 3 inches:
- 68% of men are between 67 and 73 inches tall.
- 95% are between 64 and 76 inches.
- 99.7% are between 61 and 79 inches.
A man 6'6" (78 inches) is in the top 2% — about 2.5 standard deviations above average.
Standard Deviation vs Variance
Variance is the average of squared deviations; standard deviation is its square root. They measure the same thing but in different units:
- Variance is in "squared units" — if heights are in inches, variance is in inches². Hard to interpret.
- Standard deviation is back in the original units — if heights are in inches, σ is also in inches. Intuitive.
For our example dataset {2, 4, 4, 4, 5, 5, 7, 9}: variance = 4, σ = 2. The standard deviation is what you actually report and discuss.
The rule is for normal (bell-shaped) distributions. For skewed, multi-modal, or heavy-tailed data, the percentages break down. Always plot your data before assuming normality — a histogram or density plot catches what the rule misses.
Real-World Uses
Standard deviation appears wherever variability matters:
| Field | What σ measures |
|---|---|
| Finance | Volatility of returns — a stock with 25% annual return and 20% σ is riskier than one with 25% return and 10% σ. |
| Manufacturing | Tolerance of measurements — if screws must be 10 ± 0.1 mm, σ around 0.05 mm means almost all will pass. |
| Education | Spread of test scores — same average, but σ tells you whether students are bunched together or polarized. |
| Weather | Variability of temperature — a city with average July high of 85°F and σ of 3 has more consistent weather than one with σ of 10. |
Three Common Mistakes
Errors that catch most people the first time:
- Using the wrong formula. Population vs sample isn't a style choice — it's determined by whether you have the whole group or just a sample. Excel's STDEV.P vs STDEV.S exists for this reason.
- Comparing σ across different units. A σ of 5 cm is much larger than a σ of 5 mm. Compare coefficient of variation (σ/mean) when units differ.
- Ignoring outliers. A single extreme value can inflate σ dramatically. If your data has outliers, report median and IQR instead, or use a robust measure.
Try It
Use the Standard Deviation Calculator to:
- Compute σ or s from any list of numbers.
- See the population vs sample values side by side.
- Get variance, mean, and the 68-95-99.7 ranges automatically.
The calculator accepts comma- or space-separated numbers, shows step-by-step computation, and reports the variance, both standard deviations, and the empirical-rule ranges.