Statistics Quest

Variance and standard deviation

The standard deviation measures the typical distance of values from their mean; the sample version divides the sum of squares by n − 1.

s2=1n−1∑i=1n(xi−xˉ)2,s=s2s^2 = \frac{1}{n-1}\sum_{i=1}^{n}(x_i - \xbar)^2, \qquad s = \sqrt{s^2}
Sample variance and standard deviation (the engine's default).
s2, ss^2,\ s
Sample variance and sample standard deviation.
xi−xˉx_i - \xbar
Deviation of value ii from the sample mean.
n−1n - 1
Degrees of freedom: the deviations sum to zero, so only n−1n - 1 are free.
σ2=1N∑i=1N(xi−μ)2,σ=σ2\sigma^2 = \frac{1}{N}\sum_{i=1}^{N}(x_i - \mu)^2, \qquad \sigma = \sqrt{\sigma^2}
Population variance and standard deviation (divide by N).
σ2, σ\sigma^2,\ \sigma
Population variance and standard deviation.
μ, N\mu,\ N
Population mean and size.

When to use

  • Quantitative data, alongside the mean. For skewed data or outliers also report the IQR or MAD.
  • Use ss (divisor n−1n - 1) when the data are a sample used to learn about a larger population — almost always. Use σ\sigma (divisor NN) only when the data are the entire population of interest.

How to interpret

The SD is in the units of the data ("delivery times vary by about 4 minutes around the mean"). The variance is in squared units and is mainly a building block. For roughly bell-shaped data about 68% of values lie within 1 SD of the mean and about 95% within 2 SD. Dividing by n−1n - 1 makes s2s^2 an unbiased estimator of σ2\sigma^2.

Common mistakes

  • Using the population formula for sample data (spreadsheet STDEV.P instead of STDEV.S); it underestimates spread, especially for small nn.
  • Forgetting the square root (reporting the variance as the SD).
  • Confusing the SD (spread of individual values) with the standard error (spread of a statistic).
  • Expecting the 68–95 rule to hold for strongly skewed data.

Example

Data 2, 4, 4, 4, 5, 5, 7, 9: xˉ=5\xbar = 5, sum of squared deviations =32= 32. Sample: s2=32/7=4.571s^2 = 32/7 = 4.571, s=2.138s = 2.138. Population formula: σ2=32/8=4\sigma^2 = 32/8 = 4, σ=2\sigma = 2.