Variance calculator is used to find the actual distance of the data values from the mean. This calculator provides the result of the mean, standard deviation, and the sum of squares along with steps.

## What is the variance?

In statistics, the term variance refers to a statistical measurement of the spread between numbers in a data set from the mean. It is denoted by σ^{2}.

The square root of the variance gives the result of the standard deviation.

## Variance formula

The formula of variance is of two types one for the sample variance and the other is for the population variance.

### Sample variance formula

The formula for the sample variance is:

**\( s^2=\frac{\sum \:_{i=1}^N\:\left(x_i-x̄\right)^2}{N-1}\:\)**

- “s
^{2}” denotes the sample variance. - N is the total number of observations
- X
_{i} is the set of data values - x̄ is the sample mean

###

### Population variance formula

The formula for the population variance is:

\( \:σ^2=\frac{\sum \:_{i=1}^N\:\left(x_i-\mu \right)^2}{N}\:\)

- “σ
^{2}” denotes the sample variance. - N is the total number of observations
- X
_{i} is the set of data values - µ is the sample mean

##

## How to calculate variance?

The calculation of variance can be carried out by using the sample and population variance calculator above. Here are few examples to calculate variance manually.

**Example 1: For sample variance**

Find the variance of the given sample data.

1, 5, 7, 8, 9

**Solution**

**Step 1:** Calculate the sample mean.

Sample mean =** **x̄** **= sum of data values / total number of observations

= x̄** **= \(\:\frac{1\:+\:5\:+\:7\:+\:8\:+9}{5}\)

= x̄** **= \(\:\frac{30}{5}=6 \)

**Step 2:** Now subtract the data values from the mean and find the square of differences.

**X**_{i}
| **(x**_{i} - **x̄)** | **(x**_{i} - **x̄)**^{2} |

1 | 1 – 6 = -5 | (-5)^{2} = 25 |

5 | 5 – 6 = -1 | (-1)^{2} = 1 |

7 | 7 – 6 = 1 | (1)^{2} = 1 |

8 | 8 – 6 = 2 | (2)^{2} = 4 |

9 | 9 – 6 = 3 | (3)^{2} = 9 |

**Step 3:** Find the statistical sum of squares.

Σ (x_{i} - x̄)^{2} = 25 + 1 + 1 + 4 + 9

= 40

**Step 4:** Divide the statistical sum of squares by N-1 to get the sample variance.

\( \frac{\sum \:_{i=1}^N\:\left(x_i-x̄\right)^2}{N-1}=\frac{40}{5-1}\:\)

\( \frac{\sum \:_{i=1}^N\:\left(x_i-x̄\right)^2}{N-1}=\frac{40}{4}=10\:\)

Use sample variance calculator above to cross check the result.

**Example 2: For population variance**

Find the variance of the given population data.

2, 8, 11, 14, 20

**Solution**

**Step 1:** Calculate the population mean.

Population mean = µ = sum of data values / total number of observations

= µ = \( \frac{\left(2\:+\:8\:+\:11\:+\:14\:+\:20\right)}{5}\)

= µ = \(\frac{55}{5}=11\)

**Step 2:** Now subtract the data values from the mean and find the square of differences.

**X**_{i} | **(x**_{i} - **µ****)**
| **(x**_{i} - **µ****)**^{2} |

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

8 | 8 – 11 = -3 | (-3)^{2} = 9 |

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

14 | 14 – 11 = 3 | (3)^{2} = 9 |

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

**Step 3:** Find the statistical sum of squares.

Σ (x_{i} - µ)^{2} = 81 + 9 + 0 + 9 + 81

= 180

**Step 4:** Divide the statistical sum of squares by N to get the population variance.

\(\frac{\sum \:_{i=1}^N\:\left(x_i-\mu \right)^2}{N}=\frac{180}{5}=36\:\)

## References

What is a variance? |Investopedia.