# What is the variance for the following data, 2 4 5 7 ? Please show working.[steps].

Apr 3, 2018

$\textcolor{red}{{\sigma}^{2} = 3.25}$

#### Explanation:

To find the variance, we first need to calculate the mean.

To calculate the mean, simply add all the data points, then divide by the number of data points.

The formula for the mean $\mu$ is

$\mu = \frac{{\sum}_{k = 1}^{n} {x}_{k}}{n} = \frac{{x}_{1} + {x}_{2} + {x}_{3} + \cdots + {x}_{n}}{n}$

Where ${x}_{k}$ is the $k$th data point, and $n$ is the number of data points.

For our data set, we have:

$n = 4$

$\left\{{x}_{1} , {x}_{2} , {x}_{3} , {x}_{4}\right\} = \left\{2 , 4 , 5 , 7\right\}$

So the mean is

$\mu = \frac{2 + 4 + 5 + 7}{4} = \frac{18}{4} = \frac{9}{2} = 4.5$

Now to calculate the variance, we find out how far away each data point is from the mean, then square each of those values, add them up, and divide by the number of data points.

The variance is given the symbol ${\sigma}^{2}$

The formula for the variance is:

${\sigma}^{2} = \frac{{\sum}_{k = 1}^{n} {\left({x}_{k} - \mu\right)}^{2}}{n} = \frac{{\left({x}_{1} - \mu\right)}^{2} + {\left({x}_{2} - \mu\right)}^{2} + \ldots + {\left({x}_{n} - \mu\right)}^{2}}{n}$

So for our data:

${\sigma}^{2} = \frac{{\left(2 - 4.5\right)}^{2} + {\left(4 - 4.5\right)}^{2} + {\left(5 - 4.5\right)}^{2} + {\left(7 - 4.5\right)}^{2}}{4}$

${\sigma}^{2} = \frac{{\left(- 2.5\right)}^{2} + {\left(- 0.5\right)}^{2} + {\left(0.5\right)}^{2} + {\left(2.5\right)}^{2}}{4}$

${\sigma}^{2} = \frac{6.25 + 0.25 + 0.25 + 6.25}{4} = \frac{13}{4} = \textcolor{red}{3.25}$