Variance Calculator
Calculate the population or sample variance of a list of numbers.
Variance
- Count
- Mean
- Sum of squares
How we calculated this
Formula (population)
σ² = Σ(xᵢ − μ)² / N
Worked example
Inputs: 2, 4, 4, 4, 5, 5, 7, 9. Formula: σ² = Σ(x − μ)² ÷ N. Substitution: the mean is 5 and the squared differences add up to 32, so σ² = 32 ÷ 8. Result: the population variance is 4. Treated as a sample the same numbers give s² = 32 ÷ 7, which is about 4.571429.
How it works
Variance is the average of the squared differences from the mean, so it is measured in squared units. The population formula divides the sum of squares by the number of values; the sample formula divides by one fewer, to correct for estimating a wider group from a sample. Which you need depends on your data, so it is a choice you make, and the result names it. The two are never mixed. A sample variance needs at least 2 values, since dividing by one fewer than 1 is undefined; the population variance of a single value is 0.
What this result means
Variance is the average of the squared differences from the mean. It is measured in squared units, which is why the standard deviation, its square root, is often quoted instead.
Common mistakes
- Choosing sample variance for a complete population, or the reverse. Population variance divides by the number of values; sample variance divides by one fewer, to correct for estimating from a sample.
Assumptions and limitations
- Sample variance needs at least 2 values; population variance of a single value is 0.
