No history yet

Variance Mechanics

Beyond the Average

The mean tells you the center of your data, but it doesn't tell you the whole story. Imagine two cities with the same average daily temperature of 75°F. In one city, the temperature is 75°F every single day. In the other, it swings from 55°F to 95°F. The average is the same, but the experience of living there is completely different. To capture this difference, we need to measure the data's spread, or dispersion.

A logical first step is to measure how far each data point deviates from the mean. If our data points are x1,x2,...,xnx_1, x_2, ..., x_n and the mean is μ\mu, the deviation for each point is simply (xiμ)(x_i - \mu). But if we just add these up, we hit a wall. The positive and negative deviations cancel each other out perfectly, and their sum is always zero. This tells us nothing about the spread.

The sum of all deviations from the mean in any dataset is always zero. This mathematical property makes it useless for measuring overall spread.

To solve this, we need a way to make all the deviations positive so they don't cancel out. We could use absolute values, but a more powerful method is to square each deviation. This has two benefits. First, squaring any number, positive or negative, results in a positive number. Second, it gives more weight to larger deviations. An that is 10 points from the mean will contribute 100 to the total, while a point 2 points away only contributes 4. This heavily penalizes data points that are far from the average.

Calculating Variance

When we add up all these squared deviations, we get a value called the (SS). This single number represents the total variation in the dataset. A larger Sum of Squares means the data points are, collectively, far from the mean.

But the Sum of Squares depends on the number of data points. A dataset with 1,000 points will likely have a much larger SS than one with 10 points, even if the spread is similar. To create a fair comparison, we need an average of the squared deviations. This average is called the variance.

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

Let's walk through an example. Say we have the test scores of 5 students: 70, 75, 80, 85, 90.

  1. Find the mean (\\[mu]): (70+75+80+85+90)/5=400/5=80(70 + 75 + 80 + 85 + 90) / 5 = 400 / 5 = 80.
  2. Calculate each squared deviation (ximu)2(x_i - \\mu)^2:
    • (7080)2=(10)2=100(70 - 80)^2 = (-10)^2 = 100
    • (7580)2=(5)2=25(75 - 80)^2 = (-5)^2 = 25
    • (8080)2=(0)2=0(80 - 80)^2 = (0)^2 = 0
    • (8580)2=(5)2=25(85 - 80)^2 = (5)^2 = 25
    • (9080)2=(10)2=100(90 - 80)^2 = (10)^2 = 100
  3. Sum the squared deviations: 100+25+0+25+100=250100 + 25 + 0 + 25 + 100 = 250. This is the Sum of Squares.
  4. Divide by the number of data points (N): 250/5=50250 / 5 = 50.

The variance of the test scores is 50.

So, what does a variance of 50 actually mean? It's a measure of the average squared distance from the mean. But '50 squared points' isn't intuitive. Because we squared the units, the variance is no longer in the same scale as our original data. This makes it difficult to interpret directly.

Variance gives us a precise mathematical measure of spread, but its units are squared. To bring this measure back into a more understandable scale, we need one more step.

Ready to test your knowledge on variance?

Quiz Questions 1/5

If you simply sum all the deviations of each data point from the mean ((xiμ)\sum (x_i - \mu)), what will the result always be?

Quiz Questions 2/5

What is the primary benefit of squaring the deviations from the mean?

This value, while not directly intuitive, is the critical foundation upon which a much more practical measure of spread is built: the standard deviation.