The average squared deviation from the mean; the sample version divides by n - 1. Measured in squared units.
Example
Common mistakes
Learn it in the course
Measures of spread: range, SD and quartiles · Two couriers with the same average delivery time, and why only one keeps the promise: measures of spread from range and variance to standard deviation (calculated step by step), quartiles, IQR and the coefficient of variation.
Two-sample t-test · The two-sample t-test (Student's t-test): comparing the means of two groups and deciding whether the gap is bigger than chance.
Paired t-test: before and after · Comparing the same users before and after a change with a paired t-test or the Wilcoxon signed-rank test.
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=N∑i=1N(xi−μ)2s2=n−1∑i=1n(xi−xˉ)2
The left one is the population variance: you have every value and know the true mean μ. 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−1? The sample mean 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−1 instead of n corrects this on average. That n−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.
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 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=576.
Sample variance (these 10 deliveries stand in for all future ones): s2=576/9=64 hours².
Population variance (if these 10 were all you cared about): σ2=576/10=57.6 hours².
Standard deviation: s=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.
Reporting the variance to stakeholders. "Variance is 64" in hours² means nothing to anyone; report the standard deviation (8 hours).
Dividing by n 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 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.