Calculate σ², the variance of a complete population, from a list of values or straight from a frequency table, with the sample variance alongside for comparison.
σ² = Σ(x − μ)² ÷ N · from a table: σ² = Σf(x − μ)² ÷ Σf
Population variance (σ²) is the average squared distance from the mean when your data includes every member of the group you're describing. You divide the sum of squares by N, the number of values.
That applies to the marks of every student in one class (if the class is all you care about), the sales of every store in a chain, or a full census. If your data is a sample used to learn about something bigger, which covers most surveys and experiments, use the sample variance instead.
The two differ by a factor of N ÷ (N − 1). With 10 values that's an 11% difference; with 1,000 values it's 0.1%. So the choice matters most for small groups.
Formula as given in the NIST/SEMATECH e-Handbook of Statistical Methods. See Sources.
Each value counts as many times as its frequency, in both the mean and the sum of squares.
These are all the households on the street, so the population formula is right. If they were a sample of a whole town, the sample variance (21 ÷ 19 = 1.11) would be the one to report.
For the same data, the sample variance is always the population variance times n ÷ (n − 1).
| Number of values | s² ÷ σ² | Difference |
|---|---|---|
| 2 | 2 | 100% |
| 5 | 1.25 | 25% |
| 10 | 1.1111 | 11.1% |
| 30 | 1.0345 | 3.4% |
| 100 | 1.0101 | 1% |
| 1,000 | 1.001 | 0.1% |
Only when your data includes every member of the group and you don’t want to generalise beyond it: one class, one company’s staff, a complete census.
With the whole population, the mean is the true mean, so there’s no bias to correct for. Dividing by N gives the exact average squared distance.
VAR.P (or VARP in older versions). VAR.S is the sample version.
For the same data, yes, by the factor (N − 1) ÷ N, unless every value is identical and both are zero.
σ² (sigma squared). The sample variance is written s², and the population mean μ (mu).
Choose “Frequency table”, list each different value once in the first box and how often it occurs in the second, in the same order.
If you already have the whole population, there’s nothing left to infer: the figure is exact. Inference (confidence intervals, tests) is for samples.
The square of the data’s units. Children squared, in the example, which is why the standard deviation (σ = 1.02 children) is easier to interpret.
Related Tools