Variance Formula: Population and Sample Variance Explained

Understanding the Variance Formula

Variance is the average squared deviation from the mean, quantifying how spread out numbers are. There are two main formulas: one for a population and one for a sample. Understanding both is crucial for correct statistical analysis.

Population Variance (σ²)

Use this when you have data for every member of the group of interest (e.g., all students in a class). The formula is:

σ² = Σ(x - μ)² / N

Where:

  • σ² = population variance
  • Σ = sum of all values
  • x = each individual data point
  • μ = population mean
  • N = number of data points in the population

The steps: compute the mean (μ), subtract it from each data point to get deviations, square each deviation to make them positive, sum all squared deviations, then divide by N.

Sample Variance (s²)

When you have only a sample of the entire population (e.g., a survey of 100 voters), use the sample variance formula. It divides by (n − 1) instead of n to correct for bias (Bessel’s correction).

s² = Σ(x - x̄)² / (n - 1)

Where:

  • = sample variance
  • = sample mean
  • n = sample size
  • Other symbols same as before

Dividing by (n−1) gives an unbiased estimate of the population variance. This is essential when you want to generalize from your sample to the larger population.

Why Squared Deviations?

Deviations from the mean sum to zero. Squaring them removes negative signs and emphasizes larger differences. The result is in squared units (e.g., dollars², meters²). Taking the square root gives the standard deviation, which is easier to interpret because it's in the original units.

Historical Context

The concept of variance was formalized by Ronald Fisher in the early 20th century, building on earlier work by Gauss and Legendre on least squares. Fisher introduced the term “variance” in 1918 and developed the sample variance correction (n−1) to make it an unbiased estimator.

Practical Implications of Variance

Variance is used across many fields:

  • Finance: Portfolio risk is measured by variance; lower variance indicates less volatility. Learn more in our article on Variance in Finance.
  • Quality control: Low variance means consistent product quality.
  • Weather: Variance in temperature helps predict climate patterns.

Interpreting variance values is context-dependent. For a guide, see Variance Interpretation: What Do High and Low Values Mean?.

Edge Cases and Cautions

  • Zero variance: All data points are identical. The mean equals every value, so all deviations are zero.
  • Outliers: Squared deviations magnify the effect of outliers. Consider robust measures like median absolute deviation if outliers are present.
  • Small samples: Sample variance can be unstable; larger samples give more reliable estimates.
  • Different scales: Variance is sensitive to measurement units. Standardize data when comparing datasets with different units.

Solved Examples

Population Example

Data: 4, 8, 6, 5, 3 (entire population).

  1. Mean μ = (4+8+6+5+3)/5 = 26/5 = 5.2
  2. Deviations: -1.2, 2.8, 0.8, -0.2, -2.2
  3. Squared deviations: 1.44, 7.84, 0.64, 0.04, 4.84
  4. Sum = 1.44+7.84+0.64+0.04+4.84 = 14.8
  5. σ² = 14.8 / 5 = 2.96

Sample Example

Same data, but assume it's a sample.

  1. Mean x̄ = 5.2
  2. Same deviations and squared deviations = 14.8
  3. s² = 14.8 / (5-1) = 14.8 / 4 = 3.7

Steps can be done easily with our How to Calculate Variance guide or the Variance Calculator itself.

Conclusion

The variance formula is a cornerstone of statistics. Whether you use the population (σ²) or sample (s²) version depends on your data. For a broader introduction, read What is Variance? Definition, Formula & Examples. Remember that variance is always non-negative, and a higher value indicates greater spread.

Try the free Variance Calculator ⬆

Get your Variance is a statistical measure of the spread or dispersion of data points around the mean, calculated as the average squared deviation from the mean. result instantly — no signup, no clutter.

Open the Variance Calculator

Contact Us