Sum all the data values and divide by the number of observations to compute the average. In the introduction's examples, both data sets have an average of 50. The first is calculated as 49 plus 51 plus 50, and then dividing the 150 result by 3. The second is calculated as 1 plus 2 plus 98 plus 99, and then dividing the 200 result by 4.
Subtract each data point in the set from the average and then square the differences. In the first example, the differences between each data point is -1, 0 and 1. Squaring those differences gives you 1, 0 and 1. In the second example, the differences are -49, -48, 48 and 49. Squaring each difference gives you 2401, 2304, 2304 and 2401.
Sum the squared differences. In the first example, adding 1 plus 0 plus 1 gives you a total of 2. In the second example, the total is 9,410.
Divide the total by the number of data points to compute the variance. In the first example, dividing 2 by 3 gives you a variance of 0.667. In the second example, dividing 9,410 by 4 gives you a variance of 2,352.5. The considerably larger variance in the second example demonstrates that the data used when calculating the average was immensely diverse.