Skip to content
Related Articles
Open in App
Not now

Related Articles

How to calculate Variance?

Improve Article
Save Article
  • Last Updated : 30 Apr, 2022
Improve Article
Save Article

Variance is defined as a measure of dispersion, a metric used to assess the variability of data around an average value. It is a statistical measurement used to determine the spread of values in a data collection in relation to the average or mean value. Variance is divided into two main categories: population variance and sample variance. The population variance is used to determine how each data point in a particular population fluctuates or is spread out, while the sample variance is used to find the average of the squared deviations from the mean.

Formula

The variance for a data set is denoted by the symbol σ2. For population data, its formula is equal to the sum of squared differences of data entries from the mean divided by the number of entries. While for sample data, we divide the numerator value by the difference between the number of entries and unity.

If the data set is a sample the formula of variance is given by,

σ2 = ∑ (xi – x̄)2/(n – 1)

where,

x̄ is the mean of data set.

∑ (xi – x̄)2 is the sum of squares of difference of each observation from mean,

n is the total number of observations.

If we have a population data set, the formula is written as,

σ2 = ∑ (xi – x̄)2/n

Sample Problems

Problem 1. Calculate the variance of the sample data: 7, 11, 15, 19, 24.

Solution:

We have the data, 7, 11, 15, 19, 24.

Find mean of the data.

x̄ = (7 + 11 + 15 + 19 + 24)/5

= 76/5

= 15.2

Using the formula for variance we get,

σ2 = ∑ (xi – x̄)2/(n – 1)

= (67.24 + 17.64 + 0.04 + 14.44 + 77.44)/(5 – 1)

= 176.8/4

= 44.2

Problem 2. Calculate the variance of the sample data: 4, 8, 11, 14, 17, 20.

Solution:

We have the data, 4, 8, 11, 14, 17, 20.

Find mean of the data.

x̄ = (4 + 8 + 11 + 14 + 17 + 20)/6

= 74/6

= 12.33

Using the formula for variance we get,

σ2 = ∑ (xi – x̄)2/(n – 1)

= (69.4438 + 18.7774 + 1.77768 + 2.7778 + 21.778 + 58.7782)/(6 – 1)

= 173.33/5

= 34.66

Problem 3. Calculate the variance of the population data: 2, 5, 6, 8, 10, 12.

Solution:

We have the data, 2, 5, 6, 8, 10, 12.

Find mean of the data.

x̄ = (2 + 5 + 6 + 8 + 10 + 12)/6

= 43/6

= 7.16

Using the formula for variance we get,

σ2 = ∑ (xi – x̄)2/n

= (26.69 + 4.69 + 1.36 + 0.694 + 8.02 + 23.36)/6

= 64.83/6

= 10.80

Problem 4. Calculate the variance of the population data: 6, 9, 4, 2, 5.

Solution:

We have the data, 6, 9, 4, 2, 5.

Find mean of the data.

x̄ = (6 + 9 + 4 + 2 + 5)/5

= 26/5

= 5.2

Using the formula for variance we get,

σ2 = ∑ (xi – x̄)2/n

= (0.64 + 14.44 + 1.44 + 10.24 + 0.04)/5

= 26.8/5

= 5.36

Problem 5. Calculate the number of observations if the variance of data is 12 and the sum of squared differences of data from the mean is 156.

Solution:

We have,

(xi – x̄)2 = 156

σ2 = 12

Using the  formula for variance we get,

σ2 = ∑ (xi – x̄)2/n

=> 12 = 156/n

=> n = 156/12

=> n = 13

Problem 6. Calculate the sample variance of the data: 3, 9, 5, 3, 10, 14.

Solution:

We have the data, 3, 9, 5, 3, 10, 14.

Find mean of the data.

x̄ = (3 + 9 + 5 + 3 + 10 + 14)/6

= 44/6

= 7.33

Using the formula for variance we get,

σ2 = ∑ (xi – x̄)2/(n – 1)

= (18.77 + 2.77 + 5.44 + 18.77 + 7.11 + 44.44)/(6 – 1)

= 97.33/5

= 19.46

Problem 7. Calculate the population variance of the data: 6, 7, 15, 16, 50.

Solution:

We have the data, 6, 7, 15, 16, 50.

Find mean of the data.

x̄ = (6 + 7 + 15 + 16 + 50)/5

= 94/5

= 18.8

Using the formula for variance we get,

σ2 = ∑ (xi – x̄)2/n 

= (163.84 + 139.24 + 14.44 + 7.84 + 973.44)/5

= 1298.8/5

= 259.76

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!