# What are the sample and population variances and how to calculate them?

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 (m2).

1. 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 = ∑ (zi – μ)2/N

where,

• σ2 = the notations of the population variances.
• zi = the set of the data values.
• N i= the total number data value.
• μ = the populations mean
• ∑ (zi – μ)2 = the statistical sum of squares.
1. 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 “s2”.

The general formula used to calculate the sample variance is:

s2 = ∑ (zi – z̄)2/N -1

In the above formulas of the variance,

• s2 = the notations of the sample variance.
• zi is the set of the data values.
• N = the total number data value.
• = the sample mean.
• ∑ (zi – z̄)2 = the statistical sum of squares.

## 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.

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

∑ (zi – μ)2 = 484 + 441 + 289 + 36 + 4 + 9 + 49 + 81 + 196 + 256 + 361

∑ (zi – μ)2 = 2206

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

∑ (zi – μ)2 / N = 2206 / 11

∑ (zi – μ)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.

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

∑ (zi – z̄)2 = 256 + 169 + 144 + 64 + 36 + 9 + 4 + 49 + 144 + 169 + 576

∑ (zi – z̄)2 = 1620

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

∑ (yi – z̄)2 / N – 1 = 1620 / 11 – 1

∑ (yi – z̄)2 / N – 1 = 1620 / 10 = 810/5

∑ (yi – 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.