Quick Answer
For the data set {2, 4, 4, 4, 5, 5, 7, 9}, the population variance is 4.0 and the sample variance is approximately 4.571.
Separate values with commas, spaces, or newlines
Common Examples
| Input | Result |
|---|---|
| 2, 4, 4, 4, 5, 5, 7, 9 | Pop variance: 4.0, Sample variance: 4.571 |
| 10, 12, 23, 23, 16, 23, 21, 16 | Pop variance: 24.0, Sample variance: 27.429 |
| 1, 2, 3, 4, 5 | Pop variance: 2.0, Sample variance: 2.5 |
| 100, 100, 100 | Pop variance: 0, Sample variance: 0 |
How It Works
The formula
Population variance is the average of squared deviations from the mean:
\[\sigma^2 = \frac{\sum_{i=1}^{N}(x_i - \mu)^2}{N}\]Where each x is a data point, μ is the population mean, and N is the total number of values.
Sample variance uses N - 1 instead of N in the denominator:
\[s^2 = \frac{\sum_{i=1}^{N}(x_i - \bar{x})^2}{N - 1}\]This adjustment is called Bessel’s correction. When you compute variance from a sample rather than an entire population, dividing by N tends to underestimate the true variance. Dividing by N - 1 corrects for that bias.
When to use each version
Use population variance when your data includes every member of the group you are studying, such as all test scores in a single class. Use sample variance when your data is a subset drawn from a larger group, such as survey responses from 500 people representing a city of 100,000.
Relationship to standard deviation
Standard deviation is the square root of variance. Variance is measured in squared units (if your data is in meters, variance is in meters squared), which makes it less intuitive to interpret directly. Standard deviation converts back to the original units. Both measure spread, but variance has better mathematical properties for theoretical work and is the basis for many statistical tests.
Properties of variance
Variance is always zero or positive. It equals zero only when every value in the data set is identical (no spread at all). Adding a constant to every value does not change the variance. Multiplying every value by a constant c multiplies the variance by c squared.
Worked example
For the data set {2, 4, 4, 4, 5, 5, 7, 9}: The mean is (2+4+4+4+5+5+7+9)/8 = 40/8 = 5. The squared deviations are (2-5)²=9, (4-5)²=1, (4-5)²=1, (4-5)²=1, (5-5)²=0, (5-5)²=0, (7-5)²=4, (9-5)²=16. Their sum is 32. Population variance = 32/8 = 4.0. Sample variance = 32/7 = 4.571.
Related Calculators
Standard Deviation Calculator
Calculate the standard deviation, variance, mean, and other statistics for any data set.
Mean, Median, Mode Calculator
Calculate the mean, median, mode, range, and other basic statistics for any data set.
IQR Calculator
Calculate the interquartile range, quartiles, fences, and outliers for any data set.
CalculateY