In statistics, variance is one of the main types of descriptive statistics. It is a technique that is used to find the variation of the data values from the expected values of population and sample data. The standard deviation is another type of descriptive statistic.

The standard deviation and variance are used to measure the closeness or farness of the data values from the mean. The standard deviation is more accurate than the variance. As the variance is found in squared units while the standard deviation is found in linear units.

In this article, we are going to explain the variance along with its types and formulas. Also, we will learn how to calculate it along with examples and solutions.

## What is the variance in statistics?

In statistics, the mean of the square of the deviation (subtraction of data values from the expected values) and the center of the distribution that is calculated from the mean. It is the statistical measurement of the scatter ness of the observations in a set of numbers.

It is frequently used in finding volatility and marketing security by traders and analysts. The variance in statistics is usually used to measure the variability of observations from the expected value.

There are two kinds of data in variance one is taken from the whole while the other is taken from some observations from the whole. The whole observations taken for calculating the variability are said to be the population data.

While taking some values from the whole to measure the variability to answer the approximated values is said to be sample data. On the basis of population and sample data, the variance is further divided into two categories.

## Categories of variance

The below two terms are the main types or categories of the variance based on population and sample data.

- Population variance
- Sample variance

Now we are going to explain the categories of the variance along with their formulas.

### Population variance

The measure of the spread of data values from the expected value of population data is said to be the population variance. It is calculated by taking the expected value of the population data and then taking the difference of each observation of population data from the mean.

And then evaluate the square of the differences to make them nonnegative because variance never be negative. Take the quotient of the sum of squares of differences and the total number of observations.

The general formula for the population variance is:

**σ ^{2} = [∑ (u_{i} – μ)^{2}/N]**

Where

**∑**= the notation of summation- N = total number of observations
**σ**= is the notation of population variance^{2}- u
_{i}= set of observations of population data

### Sample variance

The measure of the spread of data values from the expected value of sample data is said to be the sample variance. It is calculated by taking the expected value of the sample data and then taking the difference of each observation of population data from the mean.

And then evaluate the square of the differences to make them nonnegative because variance never be negative. Take the quotient of the sum of squares of differences and the total number of observations minus 1.

The general formula for the sample variance is:

**s ^{2} = [∑ (z_{i} – z̄)^{2}/N – 1]**

Where

**∑**= the notation of summation- N = total number of observations
**s**= is the notation of sample variance^{2}- z
_{i}= set of observations of sample data

## How to calculate the variance?

The formulas of the sample and population variance are helpful in calculating the variance problems manually. You can also solve the problems of the variance with the help of a variance calculator to avoid time-consuming calculations.

Here are a few examples of the variance to learn how to calculate it.

**Example 1: for finding the sample variance**

Determine the variability of the given sample data values to calculate the sample variance.

1, 3, 6, 9, 16, 19, 22, 25, 28, 31, 32, 36

**Solution **

**Step 1:**First of all, evaluate the sample mean (**z̄**).

Sum = 1 +3 + 6 + 9 + 16 + 19 + 22 + 25 + 28 + 31 + 32 + 36

Sum = 228

Total number of observation = N = 12

Sample Mean = 216/12 = 108/6 = 54/3

Sample Mean= 19

**Step 2:**Now evaluate the deviation and square of deviations.

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

1 | 1 – 19= -18 | (-18)^{2} = 324 |

3 | 3 – 19 = -16 | (-16)^{2} = 256 |

6 | 6 – 19 = -13 | (-13)^{2} = 169 |

9 | 9 – 19 = -10 | (-10)^{2} = 100 |

16 | 16 – 19 = -3 | (-3)^{2} = 9 |

19 | 19 – 19 = 0 | (0)^{2} = 0 |

22 | 22 – 19 = 3 | (3)^{2} = 9 |

25 | 25 – 19 = 6 | (6)^{2} = 36 |

28 | 28 – 19 = 9 | (9)^{2} = 81 |

31 | 31 – 19 = 12 | (12)^{2} = 144 |

32 | 22 – 19 = 13 | (13)^{2} = 169 |

36 | 36 – 19 = 17 | (17)^{2} = 289 |

**Step 3:**Now add the squared deviations.

∑ (z_{i} – z̄)^{2} = 324 + 256 + 169 + 100 + 9 + 0 + 9 + 36 + 81 + 144 + 169 + 289

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

**Step 4:**Divide the sum of squared deviations by the degree of freedom (N-1).

∑ (z_{i} – z̄)^{2} / N – 1 = 1586 / 12 – 1

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

∑ (z_{i} – z̄)^{2} / N – 1 = 144.18

**Example 2: for calculating the variance from population data**

Evaluate the given sample data values to calculate the population variance.

4, 8, 10, 11, 14, 18, 20, 23, 26, 28, 30

**Solution**

**Step 1:**First of all, evaluate the population mean (**µ**).

Sum = 4 + 8 + 10 + 11 + 14 + 18 + 20 + 23 + 26 + 28 + 30

Sum = 192

Total number of observation = N = 11

Population Mean = µ= 176/11

Population Mean = µ = 17.45

**Step 2:**Now evaluate the deviation and square of deviations.

Data values | y_{i} –µ | (y_{i} –µ)^{2} |

4 | 4 – 17.45 = -13.45 | (-13.45)^{2} = 180.90 |

8 | 8– 17.45 = -9.45 | (-9.45)^{2} = 89.30 |

10 | 10– 17.45 = -7.45 | (-7.45)^{2} = 55.50 |

11 | 11– 17.45 = -6.45 | (-6.45)^{2} = 41.60 |

14 | 14– 17.45= -3.45 | (-3.45)^{2} = 11.90 |

18 | 18– 17.45 = 0.55 | (0.55)^{2} =0.30 |

20 | 20– 17.45 = 2.55 | (2.55)^{2} = 6.50 |

23 | 23– 17.45= 5.55 | (5.55)^{2} = 30.80 |

26 | 26– 17.45 = 8.55 | (8.55)^{2} = 73.10 |

28 | 28– 17.45 = 10.55 | (10)^{2} = 111.30 |

30 | 30 – 17.45 = 12.55 | (12.55)^{2} = 157.50 |

**Step 3:**Now add the squared deviations.

∑ (z_{i} – µ)^{2} = 180.90 + 89.30 + 55.50 + 41.60 + 11.90 + 0.30 + 6.50 + 30.80 + 73.10 + 111.30 + 157.50

∑ (z_{i} – µ)^{2} = 758.7

**Step 4:**Divide the sum of squared deviations by the total number of observations.

∑ (z_{i} – µ)^{2} / N = 758.7 / 11

∑ (z_{i} – µ)^{2} / N = 68.98

## Conclusion

Now you can get all the basics of variance from this post as we have discussed the definition, formulas, and solved examples. Now you are witnessed that solving the problems of variance is not a difficult task just a little effort is required.