Variance of a set of numbers describes how far a set of numbers lie from the mean. Variance describes the distribution or the spread of the numbers. It is more commonly used in probability theory and statistics in the analysis of population. We usually define variance of a random variable or distribution as the mean of the squared deviation or squared differences of that variable from the expected value or mean. This article on how to calculate variance will help you in calculating variance using simple formula.
Calculating variance
To calculate variance you need to follow three simple steps
- Step 1: Calculate mean of the given set of numbers. Add all the numbers i.e. obtain sum of the numbers and divide it by the total number of numbers in the set to get mean of the numbers.
Mean = n1 + n2 + …. + nn/N
Where, N = Total number of values
- Step 2: Find out deviation of the numbers. Subtract each number from the mean of the numbers that you have obtained. Save each value that you have obtained after performing this operation on the values.
D 1 = n1 – mean
D 2 = n2 – mean
…..
D n = n n – mean
- Step 3: Find out the variance of the numbers. To find out the variance of the numbers that you have obtained, square each number and find out the mean of these numbers.
Variance = (D1)2 + (D2)2 +…… (Dn)2/ N
Example:
Let us calculate variance of the heights of the people having height as, 600 mm, 470 mm, 170 mm, 300 mm and 430 mm.
Calculating mean of these numbers
Mean = 600 + 470 + 170 + 430 + 300/ 5
Mean = 1970/5
Mean = 394
Calculating deviation of numbers
- D 1 = 600 – 394 = 206
- D 2 = 470 – 394 = 76
- D3 = 170 – 394 = -224
- D4 = 430 – 394 = 36
- D5 = 300 – 394 = -94
Calculating Variance of the numbers
Initially square all the numbers and obtain their mean, squaring all the numbers we get 360000, 5776, 50176, 1296, 8836
Therefore,
Variance = 360000 + 5776 + 50176 + 1296 + 8836/5
Variance = 21,704
- We can also use another simple formula to find out mean of the numbers. This formula states that variance is equal to the mean of the squares minus square of the mean.
Variance = mean of squares – square of mean
- Consider the numbers 1, 2 and 4.
Finding mean of the squares of these numbers we get,
Mean of squares = 12 + 22 + 42/3
= 7
Now, regular mean of the numbers is 6.25
Variance = 7 – 2.33
Therefore,
Variance = 4.67
- Variance of any set of numbers is always a positive number, as we square all the numbers all the negative values either become positive or zero and help in obtaining a more accurate result. Variance has no unit. Variance of numbers can be used to find out the standard deviation of the numbers, as standard deviation is the square root of variance.
- If we add a constant value to all the numbers in the set and obtain variance of these numbers then the variance does not change i.e. variance is invariant.
Related Content: