Find the mean, or average, of your sample's data set. For instance, if the data set were {4, 9, 10, 22, 5}, the average would be the sum of all the numbers divided by the number of separate numbers in the given data set: (4+9+10+22+5)/5 = 10.
This value is x ¯. The number of separate numbers in the given data set is n.
Subtract x ¯ from all of the values in your data set. Using the example, the data set produced from this subtraction looks like this:
{4-10, 9-10, 10-10, 22-10, 5-10} = {-6, -1, 0, 12, -5}.
Find the square of each of the values in the new data set.
{(-6)^2, (-1)^2, (0)^2, (12)^2, (-5)^2} = {36, 1, 0, 144, 25}
Find the sum of all of these numbers.
36+1+0+144+25 = 206
This value is Σ[(x_i-x ¯)^2].
Divide the sum from the previous set by n-1. Remember, n represents how many numbers were in the original data set. Since there were five numbers in the data set, the example should be divided by 5-1, or 4.
206/4 = 51.5
The above value is s^2.
Find the square root of the above value.
sqrt(51.5) = 7.1764
The above value is the sample variance.