The sample and population variances are the two main types of variances in descriptive statistics. These kinds of variances are commonly used to calculate the scatter of the data values from the mean by taking the whole data or sample from the whole.

There is another term used to calculate the spread of data values more accurately than the variance, that term is known as the standard deviation. In this lesson, we will cover the definition, formulas, and examples of sample and population variance.

**What are the sample and population variances?**

Before describing the sample variance and population variance, let us learn about the variance and its definition.

The variance is a sub-branch of descriptive statistics. It is the average of the square of the difference of the data values from the mean. The square of the differences is also known as the statistical sum of squares.

This sub-branch of descriptive statistics is frequently used to measure the variability in the distribution of data values. It measures how far or close the data sets are from the expected value. Generally, it is measured in square meters (m^{2}).

**Population variance**

The subtype of the variance that deals with the whole set of data from the population is known as the population variance. It is defined as the measure of the variability or the spread of the data set of the whole population from the average of the set.

The zero-population variance indicates that the whole set of data values is identical. The population variance is always greater than or equal to zero and it never is negative. It is denoted by the symbol “**σ**** ^{2}**”.

The general formula used to calculate the population variance is:

**σ**^{2}** = ∑ (z**_{i}** – μ)**^{2}**/N**

where,

**σ**^{2}**z**_{i}**N**i= the total number data value.**μ**=**∑ (z**_{i}**– μ)**^{2}

**Sample variance**

The subtype of the variance that deals with the sample set of data from the whole population is known as the sample variance. It is defined as the measure of the variability or the spread of the data set of the sample values from the whole population from the average of the set.

The zero-sample variance indicates that the whole set of data values is identical. The sample variance is always greater than or equal to zero and it never is negative. It is denoted by the symbol “**s**** ^{2}**”.

The general formula used to calculate the sample variance is:

**s**^{2}** = ∑ (z**_{i}** – z̄)**^{2}**/N -1**

In the above formulas of the variance,

**s**^{2}**z**_{i}**N**= the total number data value.**z̄**= the sample mean.**∑ (z**_{i}**– z̄)**^{2}

## How to calculate the sample variance and population?

The formulas are very essential for the calculation of the sample variance and the population variance. Here are a few examples to learn how to calculate the sample variance and the population variance.

**Example 1: For population variance**

Calculate the measure of the spread of the given population data values.

4, 5, 9, 20, 24, 29, 33, 35, 40, 42, 45

**Solution **

**Step 1:** Take the given set of data values and add them to calculate the population mean (μ).

Sum = 4 + 5 + 9 + 20 + 24 + 29 + 33 + 35 + 40 + 42 + 45

Sum = 286

Total number of observations = N = 11

Mean = μ = 286/11

Mean = μ = 26

**Step 2:** Now calculate the typical distance of the data values from the population mean and calculate the square of these differences to make them positive.

Data values | z_{i} – μ | (z_{i} – μ)^{2} |

4 | 4 – 26 = -22 | (-22)^{2} = 484 |

5 | 5 – 26 = -21 | (-21)^{2} = 441 |

9 | 9 – 26 = -17 | (-17)^{2} = 289 |

20 | 20 – 26 = -6 | (-6)^{2} = 36 |

24 | 24 – 26 = -2 | (-2)^{2} = 4 |

29 | 29 – 26 = 3 | (3)^{2} = 9 |

33 | 33 – 26 = 7 | (7)^{2} = 49 |

35 | 35 – 26 = 11 | (9)^{2} = 81 |

40 | 40 – 26 = 14 | (14)^{2} = 196 |

42 | 42 – 26 = 16 | (16)^{2} = 256 |

45 | 45 – 26 = 19 | (19)^{2} = 361 |

**Step 4:** Now add the square of differences to evaluate the statistical sum of squares.

∑ (z_{i} – μ)^{2} = 484 + 441 + 289 + 36 + 4 + 9 + 49 + 81 + 196 + 256 + 361

∑ (z_{i} – μ)^{2} = 2206

**Step 5:** Now divide the ∑ (z_{i} – μ)^{2 }(statistical sum of squares) by the total number of observations in a given data set to calculate the population variance.

∑ (z_{i} – μ)^{2} / N = 2206 / 11

∑ (z_{i} – μ)^{2} / N = 200.55

You can also solve the above problem online with the help of a variance calculator to get rid of the above larger and lengthy calculations.

**Example 2: For sample variance**

Calculate the measure of the spread of the given sample data values.

12, 15, 16, 20, 22, 25, 30, 35, 40, 41, 52

**Solution **

**Step 1:** Take the given set of data values and add them to calculate the sample mean (z̄).

Sum = 12 + 15 + 16 + 20 + 22 + 25 + 30 + 35 + 40 + 41 + 52

Sum = 308

Total number of observations = N = 11

Mean = z̄ = 308/11

Mean = z̄ = 28

**Step 2:** Now calculate the typical distance of the data values from the sample mean and calculate the square of these differences to make them positive.

Data values | z_{i} – z̄ | (z_{i} – z̄)^{2} |

12 | 12 – 28 = -16 | (-16)^{2} = 256 |

15 | 15 – 28 = -13 | (-13)^{2} = 169 |

16 | 16 – 28 = -12 | (-12)^{2} = 144 |

20 | 20 – 28 = -8 | (-8)^{2} = 64 |

22 | 22 – 28 = -6 | (-6)^{2} = 36 |

25 | 25 – 28 = -3 | (-3)^{2} = 9 |

30 | 30 – 28 = 2 | (2)^{2} = 4 |

35 | 35 – 28 = 7 | (7)^{2} = 49 |

40 | 40 – 28 = 12 | (12)^{2} = 144 |

41 | 41 – 28 = 13 | (13)^{2} = 169 |

52 | 52 – 28 = 24 | (24)^{2} = 576 |

**Step 4:** Now add the square of differences to evaluate the statistical sum of squares.

∑ (z_{i} – z̄)^{2} = 256 + 169 + 144 + 64 + 36 + 9 + 4 + 49 + 144 + 169 + 576

∑ (z_{i} – z̄)^{2} = 1620

**Step 5:** Now divide the ∑ (z_{i} – z̄)^{2 }(statistical sum of squares) by the total number of observations minus one in a given data set to calculate the population variance.

∑ (y_{i} – z̄)^{2} / N – 1 = 1620 / 11 – 1

∑ (y_{i} – z̄)^{2} / N – 1 = 1620 / 10 = 810/5

∑ (y_{i} – z̄)^{2} / N – 1 = 162

**Final Words**

Now you can solve any problem of the sample variance or population variance as we have discussed every basic intent of solving them with the help of examples. These subtypes of variance are widely used techniques in statistics.