The variance is widely used in statistics and mathematics. In statistics, this term is frequently used to calculate the spread of the data from the expected value. It measures the typical distance of the data values in the same units such as meter squares.

There is another term that is more stable to measure the spread of data is the standard deviation. It has the unit’s time and meter. In this lesson, we will discuss the variance in descriptive statistics along with its definition, formula, and calculations.

## Variance – introduction

In descriptive statistics, a term that is the average of the squared deviation (square of the difference of the data values from the expected value) from the mean is known as the variance. It is widely used to measure the variability in the distribution of data values.

It is expressed in larger units such as m^{2} (square meters or meter squares). It is generally used to represent how much variation in the data set there from the expected value. The zero value of the variance indicates that all the values are identical in the data set.

It is denoted by “**σ ^{2}**” or “

**s**” and is calculated by subtracting the expected value from the data value and taking the square of the deviation and dividing it by the total number of observations.

^{2}## Types of variance

Variance used two kinds of data sets one is a sample and the other is a population, on the basis of these sets the variance has two types

Population variance & sample variance

In this section, we will discuss the types of variance briefly.

### 1. Population variance

Population variance is that type of variance in which the population data set is taken. The population is the measure of all the data such as people in a city or girls in a country. Hence the measure of the spread of the whole data set from the expected value indicates the population variance.

For the calculation of population variance, you have to calculate the quotient of the statistical sum of squares and the total number of data values. It is denoted by “**σ ^{2}**”. The measure of the expected value in population variance is denoted by “

**μ**”.

### 2. Sample variance

Sample variance is that type of variance in which the sample (random) data set is taken. The sample is the measure of random data from the whole such as people in a school in a city or girls in a class of a high school. Hence the measure of the spread of sample (random) data set from the expected value indicates the sample variance.

For the calculation of sample variance, you have to calculate the quotient of the statistical sum of squares and the total number of data values minus one. It is denoted by “**s ^{2}**”. The measure of the expected value in sample variance is denoted by “

**x̅**”.

## Formulas of the variance

The formula for the population variance is:

**σ ^{2} = **

**∑ (y**

_{i}– μ)^{2}/NThe formula for the sample variance is:

**s ^{2} = **

**∑ (y**ȳ

_{i}–**)**

^{2}/N -1In the above formulas of the variance,

**σ**and^{2}**s**are the notations of population and sample variances respectively.^{2}**Y**is the set of the data values._{i}**N**is the total number data value.**μ & ȳ**are the populations mean and sample means respectively.**∑ (y**&_{i}– μ)^{2}**∑ (y**are the statistical sum of squares._{i}– ȳ)^{2}

A variance calculator can be used to solve the variance problems according to the above formulas of variance.

## How to calculate the variance?

Let us take some examples to understand how to calculate the variance.

**Example 1: For population variance**

Evaluate the population variance if the given data set is:

10, 15, 20, 22, 25, 28

**Solution **

**Step 1:** First of all, calculate the population means of the given data set.

Sum of population values = 10 + 15 + 20 + 22 + 25 + 28

Sum of population values = 120

Total number of observation = n = 6

Mean of population data set = μ = 120/20 = 60/10 = 30/5

Mean of population data set = μ = 6

**Step 2:** Now value the deviation of the data values from the population mean.

y_{1} – μ = 10 – 20 = -10

y_{2} – μ = 15 – 20 = -5

y_{3} – μ = 20 – 20 = 0

y_{4} – μ = 22 – 20 = 2

y_{5} – μ = 25 – 20 = 5

y_{6} – μ = 28 – 20 = 8

**Step 3:** Now make the above differences by taking the square of each term.

(y_{1} – μ)^{2} = (-10)^{2} = 100

(y_{2} – μ)^{2} = (-5)^{2} = 25

(y_{3} – μ)^{2} = (0)^{2} = 0

(y_{4} – μ)^{2} = (2)^{2} = 4

(y_{5} – μ)^{2} = (5)^{2} = 25

(y_{6} – μ)^{2} = (8)^{2} = 64

**Step 4:** Now calculate the statistical sum of squares by adding all the above-squared deviations.

∑ (y_{i} – μ)^{2} = 100 + 25 + 0 + 4 + 25 + 64

∑ (y_{i} – μ)^{2} = 218

**Step 5:** Take the quotient of the ∑ (y_{i} – μ)^{2 }(sum of squares) and the total number of observations to calculate the population variance of the given data set.

∑ (y_{i} – μ)^{2} / N = 218 / 6 = 109/3

∑ (y_{i} – μ)^{2} / N = 36.33

**Example 2: For sample variance**

Evaluate the sample variance of the given set of observations.

1, 3, 8, 12, 21

**Solution **

**Step 1:** First of all, calculate the sample mean of the given data set.

Sum of sample values = 1 + 3 + 8 + 12 + 21

Sum of sample values = 45

Total number of observation = n = 5

Sample mean of data set = ȳ = 45/5

Sample mean of data set = ȳ = 9

**Step 2:** Now value the deviation of the data values from the sample mean.

y_{1} – ȳ = 1 – 9 = -8

y_{2} – ȳ = 3 – 9 = -6

y_{3} – ȳ = 8 – 9 = -1

y_{4} – ȳ = 12 – 9 = 3

y_{5} – ȳ = 20 – 9 = 11

**Step 3:** Now make the above differences by taking the square of each term.

(y_{1} – ȳ)^{2} = (-9)^{2} = 81

(y_{2} – ȳ)^{2} = (-6)^{2} = 36

(y_{3} – ȳ)^{2} = (-1)^{2} = 1

(y_{4} – ȳ)^{2} = (3)^{2} = 9

(y_{5} – ȳ)^{2} = (11)^{2} = 121

**Step 4:** Now calculate the statistical sum of squares by adding all the above-squared deviations.

∑ (y_{i} – ȳ)^{2} = 81 + 36 + 1 + 9 + 121

∑ (y_{i} – ȳ)^{2} = 254

**Step 5:** Take the quotient of the ∑ (y_{i} – ȳ)^{2} (sum of squares) and the total number of observations minus 1 to calculate the sample variance of the given data set.

∑ (y_{i} – ȳ)^{2} / N – 1 = 254 / 5 – 1

∑ (y_{i} – ȳ)^{2} / N – 1 = 254 / 4 = 127/2

∑ (y_{i} – ȳ)^{2} / N – 1 = 63.5

## Wrap up

In this lesson, we have learned all the basic intent of the variance with the help of solved examples. Now you can grab all the basics of the variance and able to calculate any problem of variance by following the above formulas and solved examples.