Standard Deviation & Variance

Two numbers tell you how spread out your data is. Variance is the average squared distance from the mean; standard deviation is its square root — the typical distance of a value from the average, in the data's own units.

What it is

The mean tells you where a dataset is centered. It says nothing about whether the values huddle close to that center or scatter far from it. Standard deviation answers that second question: how far, typically, is a value from the mean?

Two datasets can share a mean of 50 yet look nothing alike. One might run 49, 50, 51 — barely moving. The other might run 10, 50, 90 — flung wide. Same center, wildly different spread. Standard deviation puts a single number on that difference. A small standard deviation means tight, consistent, predictable; a large one means scattered, variable, hard to pin down.

Variance is the same idea one step earlier in the calculation. It's the average of the squared distances from the mean. Squaring keeps everything positive (so distances above and below the mean don't cancel) and penalizes far-flung values more heavily. The catch: squaring also squares the units. If your data is in dollars, the variance is in dollars-squared, which means nothing to a human. Taking the square root undoes that — and the result, in plain dollars, is the standard deviation.

The formula

There are two versions, and the difference matters. The population version assumes you have every value there is; the sample version assumes your data is a sample drawn from a larger population you're trying to describe.

Population variance:   σ² = (1/N) · Σ (xᵢ − μ)²
Sample variance:       s² = (1/(n−1)) · Σ (xᵢ − x̄)²

Standard deviation = √variance      (σ or s)

Here μ is the true population mean, is the sample mean, N is the population size, and n is the sample size. The only structural difference is the divisor: N for a population, n−1 for a sample.

Why n−1?

When you compute variance from a sample, you don't know the true mean μ — you estimate it with the sample mean . But is, by construction, the point that sits closest to your particular sample. So the squared distances measured against are systematically a little too small, and dividing by n would underestimate the real spread. Dividing by n−1 instead inflates the result just enough to correct that bias — this is Bessel's correction. The intuition: estimating the mean "uses up" one degree of freedom, leaving only n−1 independent pieces of information about the spread.

How to read it

What you seeWhat it means
SD small relative to the meanTight, consistent data — values cluster near the average
SD large relative to the meanWide spread — values scatter far from the average
SD = 0Every value is identical; there is no spread
Variance vs. SDSame information; SD is in the data's units, variance in squared units

For roughly bell-shaped (normal) data, standard deviation has a handy reading: about 68% of values fall within one SD of the mean, about 95% within two, and about 99.7% within three. That "empirical rule" is also why standard deviation is the natural unit for a z-score — how many SDs a value sits from the mean.

A worked example. Five exam scores: 70, 72, 74, 76, 78. The mean is 74. The deviations from the mean are −4, −2, 0, 2, 4; squared, they're 16, 4, 0, 4, 16, summing to 40. As a sample, divide by n−1 = 4: variance s² = 10, so s = √10 ≈ 3.16. As a population, divide by N = 5: variance σ² = 8, so σ = √8 ≈ 2.83. Same data, two defensible answers — which is why a tool has to tell you which one it reports.
How Stratum computes it. Stratum's Summary report reports the sample standard deviation by default — it divides by n−1. That matches NumPy with ddof=1, pandas (.std()), and R (sd()), so a Stratum result lines up with those tools on the same data. Missing and non-finite values are dropped first, and the reported N is the count actually used — see the conventions page for the full missing-value rule.

See also

Related terms
Z-Score · Normal Distribution · Mean, Median & Mode
On the blog
Mean vs. median: which to use
In the app
Read SD and variance in the Summary report

Standard deviation is the most-used measure of spread for good reason: it's in the data's own units, it underpins the normal distribution, and it's the building block of z-scores, confidence intervals, and most of inferential statistics. Just remember which divisor produced it — sample n−1 is almost always what you want.