Variance

Variance is a measure of the dispersion, or spread, of a set of values about the mean. When values are close to the mean, the variance is small. When values are widely scattered about the mean, the variance is larger.

Formula:

Variance formula

  To calculate the variance of a set of values:

  1. Find the mean or average.

  2. For each value, calculate the difference between the value and the mean.

  3. Square the differences.

  4. Divide by n - 1, where n is the number of differences.

For example, suppose your values are 1, 3, 6, 7, and 9. The mean is 5.2. The variance, denoted by s2 , is calculated as follows:

s squared equals (1 minus 5.2) squared, plus (3 minus 5.2) squared, plus (6 minus 5.2) squared, plus (7 minus 5.2) squared, plus (9 minus 5.2) squared,  all divided by (5 minus 1), equals 40.8 divided by 4, equals 10.2.

Note:

The calculation uses n - 1 instead of n to correct for the fact that the mean was calculated from the data sample, thus removing one degree of freedom. This correction makes the sample variances slightly larger than the variance of the entire population.