Variance Calculator
Variance calculator and sample variance calculator with a step-by-step solution and APA format.
The tool doesn't count empty cells or non-numeric cells.
Variance Calculator
Use the variance calculator to compute both sample variance and population variance, complete with a step-by-step solution, and then present the results in APA format.
What is Variance?
Variance is a parameter that measures the variability of data. It represents the average of squared differences between each value and the mean.
Population variance formula
To calculate the population variance, you need the entire dataset.
What Is Sample Variance? (S2)
When you do not have data for the entire population, you calculate the sample variance from the sampled data. Unlike population variance, when calculating the sample variance, you divide by (n - 1); in this case, the resulting statistic is unbiased.
Sample variance formula
Following the sample variance formula
What statistic should I use, variance or sample variance?
Use the variance (σ²) if the data contains the entire population, otherwise use the sample variance (S²).
What is the sample variance
Usually, you don't have access to the entire population's data because it can be costly to gather all the data or may damage the sample. In such cases, you calculate the sample variance based on a random sample of the data.
When calculating the sample variance, you use a sample average (x̄) instead of the population average (µ). The sample average is a bit closer to the center of the sample than the population average. As a result, if you were to divide by n, on average, the sample average would be greater than the population variance. Dividing by (n-1) will correct the biased estimation of the variance, and partially correct the biased estimation of the variance (Bessel's correction). The sample variance is still biased, but this correction makes it the best simple formula.
Simulation Example
Normal(µ=10, σ=4) distribution with a sample size of n=20, with 1,000,000 repetitions.
The averages of the statistics:
Statistic | Dividing by (n-1) | Dividing by n |
---|---|---|
Standard Deviation | 3.958 | 3.849 |
Variance | 16.008 | 15.208 |
For an unbiased statistic, we expect to get a standard deviation of 4 and a variance of 16.
You may notice that dividing by (n-1) yields better results than dividing by n. The result for the variance is not biased; it is very close to 16, while the result for the standard deviation is biased.
Glossary
n - Sample size, the number of values.Mean - Average.
S - Sample standard deviation, if the list of values you entered is only a sample from the entire population, this is the best estimation for the Population Standard Deviation.
S2 - Sample variance, if the list of values you entered is only a sample from the entire population, this is the best estimation for the Population Variance.
σ - Population standard deviation, if the list of values you entered is the entire population, this is the exact Standard deviation.
σ2 - Population variance, if the list of values you entered is the entire population, this is the exact Variance.