Variance measures how spread out numbers are around their mean. Small variance means the values stay fairly close to the mean. Large variance means they are more spread out.

To calculate variance, find how far each value is from the mean, square those distances, and average them. Squaring matters because positive and negative deviations would otherwise cancel out.

Variance Formula: Population Vs. Sample

Use the population variance formula when your data includes every value in the group you want to describe:

σ2=1Ni=1N(xiμ)2\sigma^2 = \frac{1}{N}\sum_{i=1}^{N}(x_i - \mu)^2

Use the sample variance formula when your data is only a sample and you want to estimate the spread of a larger population:

s2=1n1i=1n(xixˉ)2s^2 = \frac{1}{n-1}\sum_{i=1}^{n}(x_i - \bar{x})^2

The only difference is the denominator. Use NN for a full population. Use n1n-1 for a sample estimate.

What Variance Means

Variance does not tell you where the center is. It tells you how far the data tends to sit from that center.

If two data sets have the same mean, the one with the larger variance has values that sit farther from the mean on average. Because the deviations are squared, unusually large gaps have extra influence.

One important detail: variance is measured in squared units. If the data is in meters, the variance is in square meters. That is why standard deviation is often easier to interpret in everyday use.

How To Calculate Variance: Worked Example

Use the data set 2,4,4,4,5,5,7,92, 4, 4, 4, 5, 5, 7, 9.

First find the mean:

xˉ=2+4+4+4+5+5+7+98=408=5\bar{x} = \frac{2+4+4+4+5+5+7+9}{8} = \frac{40}{8} = 5

Now subtract the mean from each value and square the result:

  • (25)2=9(2-5)^2 = 9
  • (45)2=1(4-5)^2 = 1
  • (45)2=1(4-5)^2 = 1
  • (45)2=1(4-5)^2 = 1
  • (55)2=0(5-5)^2 = 0
  • (55)2=0(5-5)^2 = 0
  • (75)2=4(7-5)^2 = 4
  • (95)2=16(9-5)^2 = 16

Add those squared deviations:

9+1+1+1+0+0+4+16=329+1+1+1+0+0+4+16 = 32

If these eight values are the full population, the population variance is:

σ2=328=4\sigma^2 = \frac{32}{8} = 4

If the same eight values are treated as a sample from a larger population, the sample variance is:

s2=3274.57s^2 = \frac{32}{7} \approx 4.57

This example shows the main idea clearly: the squared deviations are the same, but the final answer changes depending on whether you divide by NN or by n1n-1.

Common Variance Mistakes

  • Forgetting to square the deviations. If you average raw deviations, positive and negative values cancel, so you no longer measure spread correctly.
  • Mixing up population and sample variance. Divide by NN for a full population and by n1n-1 for a sample that estimates a larger population.
  • Forgetting that variance uses squared units. Variance is useful, but standard deviation is often easier to read because it returns to the original units.
  • Assuming large variance is always bad. Larger variance only means more spread. Whether that matters depends on the context.

When Variance Is Used

Variance is used whenever you need to describe or compare spread in a consistent way.

  • In statistics, it helps summarize how dispersed a data set is.
  • In quality control, it can help track whether a process is staying consistent over time.
  • In finance, variance is used to describe how much returns fluctuate, though it is only one way to think about risk.
  • In machine learning and data analysis, it helps describe how features or errors vary across observations.

Try A Similar Problem

Try your own version with two small data sets that have the same mean but different spread. Calculate the variance for both and see whether the wider data set gets the larger value. That single comparison usually makes the idea stick.

Need help with a problem?

Upload your question and get a verified, step-by-step solution in seconds.

Open GPAI Solver →