Coursera Learner working on a presentation with Coursera logo and
Coursera Learner working on a presentation with Coursera logo and

What is the Variance of the Champion?

 s2, is used to calculate how varied a sample is. A sample is a selected number of items taken from a population. For example, if you measure the weight of Americans, it would not be possible (either temporally or monetarily) to measure the weight of each person in the population. The solution is to take a sample of the population, say 1000 people, and use that sample size to estimate the actual weights of the entire population. The variance helps you to understand how your weights are distributed.

Defining the sample variance

The variance is defined mathematically as the average of the differences squared with respect to the average. But what does it mean in English? To understand what you are calculating with the variance, you break it down into steps:

Step 1: Calculate the average (the average weight).

Step 2: Subtract the average and square the result.

Step 3: Calculate the average of these differences.

Use the sample variance and the standard deviation calculator

Or see: how to calculate the sample variance (by hand).

What is the sample variance for?

Although the variance is useful in a mathematical sense, it will not really give you any information you can use. For example, if you take a sample population of weights, you might end up with a variance of 9801. This could make you scratch your head about why you are calculating it! The answer is: you can use the variance to calculate the standard deviation – a much better measure of how your weights are distributed. To get the standard deviation, take the square root of the sample variance:

√9801 = 99.

The standard deviation, combined with the mean, tells you what most people weigh. For example, when your average is 150 pounds and your standard deviation is 99 pounds, the majority of people weigh between 51 pounds (average-99) and 249 pounds (average+99).

How to find the sample variant

If you find the sample variant by hand, the “usual” formula given to you in the textbooks is as follows:

How to find the sample variance by hand: 

Question: Find the variance for the following dataset representing trees in California (standing height): 3, 21, 98, 203, 17, 9

Step 1: Add the numbers from your data set.

3 + 21 + 98 + 203 + 17 + 9 = 351

Step 2: Answer the square:

351 × 351 = 123,201

…and divide by the number of items. We have 6 items in our example like this:

123,201 / 6 = 20,533.5

Put this number aside for a moment.

Step 3: Take your original set of numbers from Step 1, and square them individually this time:

3 × 3 + 21 × 21 + 98 × 98 + 203 × 203 + 17 × 17 + 9 × 9

Add the numbers (squares) together:

9 + 441 + 9604 + 41209 + 289 + 81 = 51,633

Step 4: Subtract the amount of step 2 from the amount of step 3.

51,633 – 20,533.5 = 31,099.5

Put this number aside for a moment.

Step 5: Subtract 1 from the number of items in your data set*. For our example:

6 – 1 = 5

Step 6: Divide the number of step 4 by the number of step 5. In this way you get the variant:

31,099.5 / 5 = 6,219.9

How to find the sample variance: Standard deviation Example 1

Step 7: Take the square root of your answer from Step 6. This gives you the standard deviation:

√6,219.9 = 78.86634

That’s all!

*Important note: the standard deviation formula is slightly different for populations and samples (a part of the population). If you have a population, it will be divided by “n” (the number of elements in the data set). If you have a sample (which is the case for most statistical questions you will receive in class!) you will have to divide by n-1. For the reason you use n-1, see: Bessel correction.

How to find the sample variant: Example 2

Your paychecks for the last few weeks are: $600, $470, $430, $300 and $170. What is the standard deviation?

Step 1: Add up all the numbers:

170 + 300 + 430 + 470 + 600 = 1970

Step 2: Square the total and then divide by the number of items in the data set

1970 x 1970 = 3880900

3880900 / 5 = 776180

Step 3: Take your original set of numbers from Step 1, and square them individually this time. Then add them all up:

(170 x 170) + (300 x 300) + (430 x 430) + (470 x 470) + (600 x 600) = 884700

Step 4: Subtract the amount of step 2 from the amount of step 3:

884700 – 776180 = 108520

Step 5: I subtracted 1 from the number of entries in my data set:

5 – 1 = 4

Step 6: Divide the number of step 4 by the number of step 5:

108520 / 4 = 27130

This is my Variance!

Step 7: Take the square root of the number from step 6 (the Variance),

√(27130) = 164.7118696390761

This is my Standard Deviation!

Back to the top

How to find the sample variant: Example 3

This example uses the same formula, it’s just a slightly different way of working it.

You survey households in your area to find the average rent they pay. Find the standard deviation from the following data:

$1550, $1700, $900, $850, $1000, $950.

Step 1: Find the average:

($1550 + $1700 + $900 + $850 + $1000 + $950)/6 = $1158.33

Step 2: Subtract the average from each value. This gives you the differences:

$1550 – $1158.33 = $391.67

$1700 – $1158.33 = $541.67

$900 – $1158.33 = -$258.33

$850 – $1158.33 = -$308.33

$1000 – $1158.33 = $158.33

$950 – $1158.33 = $208.33

Step 3: Square the differences you found in Step 3:

$391.672 = 153405.3889

$541.672 = 293406.3889

-$258.332 = 66734.3889

-$308.332 = 95067.3889

$158.332 = 25068.3889

$208.332 = 43401.3889

Step 4: Add up all the squares you found in step 3 and divide by 5 (which is 6 – 1):

(153405.3889 + 293406.3889 + 66734.3889 + 95067.3889 + 25068.3889 + 43401.3889) / 5 = 135416.66668

Step 5: Find the square root of the number you found in step 4 (the variance):

√135416.66668 = 367.99

The standard deviation is 367.99.

How to find the sample variant: Steps:

Sample question: Find the sample variance/standard deviation for the following dataset: 1245, 1255, 1654, 1547, 1787, 1989, 1878, 2011, 2145, 2545, 2656.

Step 1: Sum up all numbers in your data set:

1245 + 1255 + 1547 + 1654 + 1787 + 1878 + 1989 + 2011 + 2145 + 2545 + 2656 = 20712

Step 2: Square the number you found in Step 1:

20712 x 20712 = 428986944

…and then divide by the number of entries in your data set.

428986944 / 11 = 38998813.09090909

Put this number aside for a moment.

Step 3: Square all the numbers in your data set and then add them together.

(1245 x 1245) + (1255 x 1255) + (1547 x 1547) + (1654 x 1654) + (1787 x 1787) + (1878 x 1878) + (1989 x 1989) + (2011 x 2011) + (2145 x 2145) + (2545 x 2545) + (2656 x 2656) = 41106856

Step 4: Subtract the number calculated in step 2 from the number calculated in step 3:

41106856 – 38998813.09090909 = 2108042.9090909064

Step 5: Subtract 1 from the number of entries in your data set:

11 – 1 = 10.

Step 6: Divide the number calculated in step 4 by the number calculated in step 5:

2108042.9090909064 / 10 = 210804.29090909063

This is the Variance.

Step 7: Take the square root of step 6 to find the standard deviation:

√ 210804.29090909063 = 459.13.

Sample Variance in Excel 2010

Sample variance in Excel 2007-2010 is calculated using the “Var” function. Watch this one-minute video on how to calculate it, or read the steps below

Sample question: Find the sample variance in Excel 2007-2010 for the following sample data: 123, 129, 233, 302, 442, 542, 545, 600, 694, 777

Step 1: Type the data in a single column in an Excel spreadsheet. For this example, I typed “123, 129, 233, 302, 442, 542, 545, 600, 694, 777” in column A. Do not leave any empty cells in your data.

tep 2: click on any empty cell.

Step 3: Click the “Insert Function” button in the toolbar. The Insert Function dialog box opens.

variance in excel 2

Step 4: Type “Var” in the Search for a function text box and then click “Go”. VAR must be highlighted in the function list.

Step 5: Click “OK”.

Step 6: Type the location of the sample data in the Number1 text box. This sample data was typed in cells A1 to A10, then I typed “A1:A10” in the text box. Be sure to separate the first and last cell from a semicolon (A1:A10).

Step 7: Click “OK”. Excel will return the sample variance in the cell chosen in step 2. For this question, the variance of 123, 129, 233, 302, 442, 542, 545, 600, 694, 777 is 53800.46.

Tip: You can also access the VAR function from the “Formulas” tab in Excel. Click the “Formulas” tab and then click the “Insert function” button on the far left of the toolbar. Continue from step 4 to calculate the variance.

Tip: You do not need to enter the sample data in a worksheet. Technically, you can open the VAR function dialog box and then type in the data in boxes Number1, Number2 etc. However, the advantage of typing data directly into the worksheet is that you can run multiple functions on the data (such as standard deviation) if necessary.