Title: Variance
Course: UGQuants (SSPS) > Section: Univariate Analysis

Variance

Variance represents the ‘average’ extent to which all values for a particular variable differ from the mean value for that variable. Another way to think of this is that it gives an indication of whether the values for all our cases tend to ‘cluster’ closely around the mean value, or are more widely dispersed. This echoes the notion of closeness of ‘fit’ around the mean as a ‘model’ of our data, and is also very useful in understanding how the variance is calculated.

We have already established that data can be thought of as made up of two parts: ‘fit’ and ‘residual’. If we understand the mean value for a variable as the ‘fit’ element, then the ‘residual’ is the difference between the mean value and the actual values for each case. So, each case that does not take a value exactly the same as the mean will have a ‘residual’. That residual is simply the difference between the value for that case and the mean value.

We could choose to assess the variance simply by adding together the residuals for all our cases. But in fact this wouldn’t do us much good because negative residuals (i.e. all those cases which took a value below the mean) and positive residuals (all those cases with a value above the mean) would cancel each other out. To avoid this problem we square all the residuals (i.e. we multiply each one by itself) and then add them together. Because squaring negative or positive numbers always results in a positive number we avoid the problem of our residuals cancelling each other out.

However, the resulting figure is not a very good representation of the ‘average’ spread of our data around the mean. One reason for this is that it takes no account of the number of cases: if we do not adjust for this, then high values for variance might reflect the number of cases as much or more than the spread of the data. The variance is therefore calculated by dividing the sum of the squared residuals by the total number of cases:

<h4Variance = sum of (mean value – case value)^2 / number of cases

But there are still two further issues we need to consider. The first is that, strictly speaking, the formula above gives us the variance for a population. But in practice, in social and political research our data are often based only on a sample of some larger population. We usually want to use this sample to estimate the likely characteristics of that wider population, including the spread of data for certain variables. But because statisticians have established that using the formula above with a sample tends to slightly overestimate the variance, a small adjustment is usually made. For a sample, we divide by the number of cases minus one (n – 1). In practice, since even in a sample we typically have hundreds or even thousands of cases this makes little difference to the value for variance, but it is worth noting that some software packages automatically make the sample adjustment when calculating the variance for any data.

But there is still one further reason why we might think that the variance is not a very good representation of spread: it does not adjust for the fact that we initially squared all our residuals, which will tend to amplify the spread. To adjust for this we use a slightly different measure of spread: standard deviation.