Skip to content
CoursesLog in
← Statistics glossary

variance

The average squared deviation from the mean; the sample version divides by n - 1. Measured in squared units.

Variance measures spread as the average squared distance from the mean. Take each value's deviation from the mean, square it (so negative and positive deviations stop cancelling out, and big misses weigh more than small ones), then average the squares.

There are two versions, depending on what your data represents:

σ2=∑i=1N(xi−μ)2Ns2=∑i=1n(xi−xˉ)2n−1\sigma^2 = \frac{\sum_{i=1}^{N}(x_i - \mu)^2}{N} \qquad\qquad s^2 = \frac{\sum_{i=1}^{n}(x_i - \bar{x})^2}{n - 1}

The left one is the population variance: you have every value and know the true mean μ\mu. The right one is the sample variance, used when your data is a sample from something bigger. In product analytics that is almost always the case: last month's orders stand in for all the orders you'll ever get. Why n−1n - 1? The sample mean xˉ\bar{x} is computed from the same values, so it sits closer to them than the true mean does. The squared deviations come out slightly too small, and dividing by n−1n - 1 instead of nn corrects this on average. That n−1n - 1 is the number of degrees of freedom. In Sheets or Excel: VAR.S for a sample, VAR.P for a population.

The catch is the units. Squaring the deviations squares the units too, so the variance of delivery times is in hours² and that of revenue in dollars². Nobody can picture that, so for reporting take the square root and you get the standard deviation, back in normal units.

Why keep variance at all? Its maths is convenient: the variances of independent quantities simply add up, and many methods (the t-test, ANOVA, regression, sample-size calculations) are built on it. Think of variance as the engine and the standard deviation as the reading on the dashboard.

Example

A CatChow courier's last 10 delivery times, in hours, sorted: 14, 14, 18, 18, 24, 24, 30, 30, 30, 38. Their sum is 240, so the mean is xˉ=240/10=24\bar{x} = 240 / 10 = 24 hours.

Hours
14
14
18
18
24
24
30
30
30
38
Deviation
−10
−10
−6
−6
0
0
+6
+6
+6
+14
Squared
100
100
36
36
0
0
36
36
36
196

The sum of squared deviations is 100+100+36+36+0+0+36+36+36+196=576100 + 100 + 36 + 36 + 0 + 0 + 36 + 36 + 36 + 196 = 576.

  • Sample variance (these 10 deliveries stand in for all future ones): s2=576/9=64s^2 = 576 / 9 = 64 hours².
  • Population variance (if these 10 were all you cared about): σ2=576/10=57.6\sigma^2 = 576 / 10 = 57.6 hours².
  • Standard deviation: s=64=8s = \sqrt{64} = 8 hours, so "24 ± 8 hours" is the line for the report.

Notice how squaring amplifies big misses: the single 38-hour delivery contributes 196 of the 576, about 34% of the total, although it is only one of 10 deliveries.

Common mistakes

  • Reporting the variance to stakeholders. "Variance is 64" in hours² means nothing to anyone; report the standard deviation (8 hours).
  • Dividing by nn on a sample. It underestimates the spread, noticeably so on small samples: 57.6 instead of 64 for 10 deliveries.
  • Adding standard deviations instead of variances. If picking takes a variable time with SD 3 hours and transit is independent with SD 4 hours, the total SD is 32+42=5\sqrt{3^2 + 4^2} = 5 hours, not 7.
  • Confusing statistical variance with "variance vs plan". In finance reports "variance" often means the gap between actual and budget. That is a difference, not a spread measure.
  • Forgetting that squaring magnifies outliers. One extreme value can dominate the sum of squares, so look at the data before trusting a variance.

Learn it in the course