Skip to content

What is Variance in Math
and Statistics?


Variance is something that gives a measure that tells us how spread out a set of data values are. But we will expand more on what is variance in Math.


For a set of data values, the Variance is the sum of each squared distance of a value from the mean/average of the data set, all divided by the amount of values that there is.



That definition can be a bit much to take in all at once, but things should become quite clear with some detailed examples further in the page.

Firstly though it can help to have a look at some examples of calculating the mean/average for a group of some numbers.
As sometimes an average value can be a good fit for a set of values, but there can also be times when it isn’t.






Examples &nbsp &nbsp


(1.1)&nbsp

List of 8 numbers:

2 , 6 , 10 , 3 , 2 , 20 , 13 , 8


Mean/average &nbsp=&nbsp \bf{\frac{2\space+\space6\space+\space10+\space3\space+\space2\space+\space20\space+\space13\space+\space8}{8}} &nbsp = &nbsp \bf{\frac{64}{8}} &nbsp=&nbsp 8

The average of the list is &nbsp8,&nbsp but it can be seen that some values are quite far away from that value, such as &nbsp20.





(1.2)&nbsp

List of 8 numbers:

4 , 5 , 4 , 7 , 6 , 7 , 9 , 6


Mean/average &nbsp=&nbsp \bf{\frac{4\space+\space5\space+\space4+\space7\space+\space6\space+\space7\space+\space9\space+\space7}{8}} &nbsp=&nbsp \bf{\frac{48}{8}} &nbsp=&nbsp 6

The average is turns out to be &nbsp6,&nbsp and all values in the list are indeed close to this value here.








Formula for the Variance


Earlier in the page it was mentioned that a definition of the variance is the sum of each squared value distance from the mean, divided by the total amount of values.

In examples &nbsp(1.1)&nbsp and &nbsp(1.2)&nbsp above, for each set of numbers has &nbsp8&nbsp numbers, the total amount of values is &nbsp8,&nbsp that part is clear to see.


So how do we establish the sum of each squared distance from the mean?

If we focus on the set of numbers in example &nbsp(1.2).


4 , 5 , 4 , 7 , 6 , 7 , 9 , 7

The mean/average of the list is &nbsp6,&nbsp this can be labelled by the symbol &nbspμ. &nbsp &nbsp ( μ &nbsp=&nbsp 6 )


The list has &nbsp7&nbsp values.

We can also label each of these as an &nbspx&nbsp subscript.


{ 4 , 5 , 4 , 7 , 6 , 7 , 9 , 7 } &nbsp = &nbsp { x_1 , x_2 , x_3 , x_4 , x_5 , x_6 , x_7 , x_8 }




Distance from the Mean/Average


To calculate the distance of one of the data values from the mean, we just have to subtract the mean from that data value.


So for &nbspx_4,&nbsp which was &nbsp7.

x_4μ &nbsp = &nbsp 76 &nbsp=&nbsp 1

1&nbsp is the distance that the data value &nbsp7&nbsp is from the set mean/average of &nbsp6.


So the ‘distance from the mean’ squared, for &nbsp7,&nbsp is &nbsp12,&nbsp which is also &nbsp1.



Thus to calculate the Variance of the whole list of values from example &nbsp(1.2).

We perform the same action that we just did with &nbsp7,&nbsp but for every value in the list,
then summing each result up together,
before finally dividing that total by the number of values there is in the list,&nbsp n&nbsp values.


Which gives us the formula for the Variance.
Formula to work out the variance.

σ2&nbsp is the common standard notation for the Variance.

The distances of the data values from the mean are squared to keep their overall value positive, as positive and negative distance values added up together would result in some cancelling out and end up giving a false measure of the spread.


This can all be quite a bit to digest at first, but the process will become clear by looking at some numerical examples.





Finding Variance Examples



(2.1)&nbsp

We can look at the same list of &nbsp8&nbsp numbers from example &nbsp(1.1):

2 , 6 , 10 , 3 , 2 , 20 , 13 , 8 &nbsp = &nbsp { x_1 , x_2 , x_3 , x_4 , x_5 , x_6 , x_7 , x_8 }

n = 8 &nbsp&nbsp , &nbsp&nbsp μ = 8


\sum_{i=1}^8 \space(x_i \space {\text{–}} \space \mu)^2

= &nbsp ( x_1 − 8 )2 &nbsp+&nbsp ( x_2 − 8 )2 &nbsp+&nbsp ( x_3 − 8 )2 &nbsp+&nbsp ( x_4 − 8 )2 &nbsp+&nbsp ( x_5 − 8 )2
+&nbsp ( x_6 − 8 )2 &nbsp+&nbsp ( x_7 − 8 )2
&nbsp+&nbsp ( x_8 − 8 )2


= &nbsp ( 2 8 )2 + ( 6 8 )2 + ( 10 8 )2 + ( 3 8 )2 + ( 2 8 )2
+ ( 20 8 )2 + ( 13 8 )2 + ( 8 8 )2

= &nbsp 36 + 4 + 4 + 25 + 36 + 144 + 25 + 0 &nbsp = &nbsp 274


So:

\sum_{i=1}^8 \space(x_i \space {\text{–}} \space \mu)^2 &nbsp=&nbsp 274 &nbsp&nbsp , &nbsp&nbsp n &nbsp=&nbsp 8

Variance &nbsp = &nbsp \bf{\frac{274}{8}} &nbsp = &nbsp 34.25






(2.2)&nbsp

This time we will look at the list of &nbsp8&nbsp numbers from example &nbsp(1.2):


4 , 5 , 4 , 7 , 6 , 7 , 9 , 7 &nbsp = &nbsp { x_1 , x_2 , x_3 , x_4 , x_5 , x_6 , x_7 , x_8 }

n = 8 &nbsp&nbsp , &nbsp&nbsp μ = 6


\sum_{i=1}^8 \space(x_i \space {\text{–}} \space \mu)^2

= &nbsp ( 4 6 )2 + ( 5 6 )2 + ( 4 6 )2 + ( 7 6 )2 + ( 6 6 )2 + ( 7 6 )2
+ ( 9 6 )2 + ( 6 6 )2

= &nbsp 4 + 1 + 4 + 1 + 0 + 1 + 9 + 0 &nbsp=&nbsp 20


Variance &nbsp=&nbsp \bf{\frac{20}{8}} &nbsp=&nbsp 2.5




As can now be seen, the Variance value is larger with the data set of numbers in &nbsp(1.1)&nbsp than with &nbsp(1.2).

Which is what we would expect as the numbers in the lists are closer together in &nbsp(1.2).


Which shows that the lower the value of the Variance, then generally the less spread out the data set is. With the larger the Variance value, the more spread out a data set is.








What is Variance in Math?
Variance Alternative Formula


When learning about what is variance in Math, it turns out that there is also another formula for the Variance that can be used when required. A formula that can be quicker to use.



The alternative formula for variance is:
Alternative formula to work out the variance.

Looking at the numbers &nbsp 4 , 5 , 4 , 7 , 6 , 7 , 9 , 6 &nbsp from &nbsp(2.2),&nbsp the sums with the formula would be:



σ2 &nbsp=&nbsp \frac{\sum_{i=1}^8 \space (x_i)^2}{8} &nbsp−&nbsp 62

=&nbsp \boldsymbol{\frac{(4)^2 \space + \space (5)^2 \space + \space (4)^2 \space + \space(7)^2 \space + \space (6)^2 \space + \space (7)^2 \space + \space (9)^2 \space + \space (6)^2}{8}} &nbsp−&nbsp 62


=&nbsp \boldsymbol{\frac{272}{8}} &nbsp−&nbsp 36 &nbsp=&nbsp 38.536 &nbsp = &nbsp 2.5





  1. Home
  2.  ›
  3. Probability/Stats
  4. › Variance




Return to TOP of page