Skip to content

average and spread

learning from examples

what it is

The mean is where numbers balance. The spread is the average distance between a number and the mean. One far number can pull the mean.

Take five numbers: 1, 4, 4, 7 and 9. They add to 25. Share 25 equally among 5 and each gets 5. That share is the mean, the everyday average.

012346789105411246 to the left6 to the right
1, 4, 4, 7 and 9 balanced at their mean, 5. Each band runs from 5 to a number, its length beside it. They make 6 on each side.

Stand the numbers on a line, like weights on a plank. The plank balances at the mean. To the left of 5, the numbers sit 4, 1 and 1 away, which make 6. To the right, 2 and 4, which also make 6.

It always works. Swap every number for the mean, 5, and the total stays 25: five 5s make 25 too. Each number is 5 plus what it has over, or 5 minus what it lacks: 7 is 5 plus 2, and 1 is 5 minus 4. Add all five that way: five 5s, plus all the overs, minus all the lacks. That is still 25. Five 5s alone make 25, so the overs, 2 and 4, must equal the lacks, 4, 1 and 1.

To measure the spread, take each number's distance from the mean and average them. Their distances are 4, 1, 1, 2 and 4. They add to 12, and 12 shared among 5 is 2.4. On this page, the spread is this average distance.

numberdistance from 5its square
1416
411
411
724
9416
total1238
average2.47.6
Each number's distance from the mean, 5, and its square. The distances average 2.4, the squares 7.6.

Books more often square each distance first: 16, 1, 1, 4 and 16. They add to 38, so the average square is 7.6. Books call it the variance. Some books divide by 4, one less than 5, when the five are only a few picked from many more: 38 shared among 4 is 9.5.

012346789105164111142164
The same numbers with the square on each distance, 16, 1, 1, 4 and 16. They average 7.6.

The square root of 7.6, about 2.76, is the standard deviation. If the numbers were cakes, 7.6 would be in cakes squared, and 2.76 is in cakes again.

A far number pulls the mean. Books call it an outlier. Add 20 to the 5 numbers. Now 6 numbers add to 45, so the mean moves from 5 to 7.5. The average distance grows from 2.4 to about 4.67, and the average square from 7.6 to about 37.58. 20 sits 12.5 from 7.5, and 12.5 squared is 156.25, more than the other 5 squares together, 69.25.

numberdistance from 7.5its square
16.542.25
43.512.25
43.512.25
70.50.25
91.52.25
2012.5156.25
total28225.5
average4.6737.58
With 20 added, each number's distance from the new mean, 7.5, and its square. The distances average about 4.67, the squares about 37.58, and 20 alone gives 156.25 of the 225.5.
024681012141618205411246 to the left6 to the right

The mean is about 5. The numbers sit about 2.4 from it on average, and make about 6 on each side.

With scripts on, you can move a number with a slider or by pressing on the line, and add the far number. The picture and this line change with it.

1, 4, 4, 7 and 9 on a line from 0 to 20, and a far number, 20, that you can add. With it, the mean moves to 7.5.

where the formulas come from

Each question is worked out one numbered line at a time. A line shows the move it makes, the line itself, and why the move is allowed. A line either follows from the lines above it, or brings in something the question needs, such as how the method works, a small fact about nn, or a result from another page, with its own reason. Press 'hide the lines, then guess each one' to cover the lines and uncover them one by one, guessing each before you see it.

question 1Take nn zeros and one far number, n+1n + 1. Here nn can be 1, 2, 3 or any whole number. For 3 zeros that is 0, 0, 0 and 4. Call their mean MM. Where is it?
  1. the move: share the total

    the line:
    M=n×0+(n+1)n+1M = \frac{n \times 0 + (n + 1)}{n + 1}
    0234567891011113
    Three zeros and a far number, 4, balanced at their mean, 1. The zeros sit 1 to the left, 3 in all, and 4 sits 3 to the right.

    why it is allowed: There are n+1n + 1 numbers in all. Their total is nn zeros and the far number, shared equally among all n+1n + 1. For 3 zeros and 4, that is 4 shared among 4.

  2. the move: the zeros add nothing

    the line:
    M=n+1n+1M = \frac{n + 1}{n + 1}

    why it is allowed: nn times 0 is 0.

  3. the move: divide

    the line:
    M=1M = 1

    why it is allowed: A number over itself is 1, and n+1n + 1 is not 0. The zeros alone have mean 0. The far number stands n+1n + 1 from that 0, yet it pulls the mean only to 1.

try it with a small nn: at n=1n = 1, line 1 gives M=1M = 1, which you can work out by hand

question 2The same numbers. Their mean is 1. Call their average distance from it AA. What number does AA never pass?
  1. the move: add the distances

    the line:
    A=n×1+nn+1A = \frac{n \times 1 + n}{n + 1}

    why it is allowed: Each zero sits 1 from the mean, by question 1. The far number is n+1n + 1, so it sits 1 less, nn, from it. Share the total among the n+1n + 1 numbers.

  2. the move: add

    the line:
    A=2nn+1A = \frac{2n}{n + 1}

    why it is allowed: nn and nn make 2n2n. For 3 zeros, 6 over 4 is 1.5.

  3. the move: make the top bigger

    the line:
    A≤2n+2n+1A \le \frac{2n + 2}{n + 1}

    why it is allowed: We want a simple number AA never passes. 2n+22n + 2 is more than 2n2n, and the bottom, n+1n + 1, stays the same and is above 0, so the fraction is no smaller. For 3 zeros, 6 over 4 is 1.5 and 8 over 4 is 2.

  4. the move: take out the 2

    the line:
    A≤2(n+1)n+1A \le \frac{2(n + 1)}{n + 1}

    why it is allowed: Multiply out 2(n+1)2(n + 1) and you get 2n+22n + 2 again, the top of line 3.

  5. the move: cancel n+1n + 1

    the line:
    A≤2A \le 2

    why it is allowed: n+1n + 1 is above and below, and it is not 0. However many zeros there are, the average distance is never more than 2.

try it with a small nn: at n=1n = 1, line 1 gives A=1A = 1, which you can work out by hand

question 3The same numbers again. Square each distance from the mean, then average the squares. Call that QQ. What is it?
  1. the move: add the squares

    the line:
    Q=n×12+n2n+1Q = \frac{n \times 1^2 + n^2}{n + 1}

    why it is allowed: By question 2, each zero sits 1 from the mean and the far number sits nn. Square each distance and share the total among the n+1n + 1 numbers.

  2. the move: work out the squares

    the line:
    Q=n+n2n+1Q = \frac{n + n^2}{n + 1}

    why it is allowed: nn times 121^2 is nn.

  3. the move: take out the nn

    the line:
    Q=n(n+1)n+1Q = \frac{n(n + 1)}{n + 1}

    why it is allowed: Multiply out n(n+1)n(n + 1) and you get n+n2n + n^2 again, the top of line 2.

  4. the move: cancel n+1n + 1

    the line:
    Q=nQ = n
    nmeanaverage distanceaverage squarestandard deviation
    11111
    311.531.73
    1011.82103.16
    10011.9810010
    n zeros and the far number n + 1. The mean stays at 1 and the average distance below 2, while the average square, n, and its root, the standard deviation, both keep growing.

    why it is allowed: n+1n + 1 is above and below, and it is not 0. For 3 zeros the average square is 3, and for 100 zeros it is 100, while the average distance is never more than 2.

  5. the move: take the root

    the line:
    its root is n,which keeps growing\begin{gathered} \text{its root is } \sqrt{n}\text{,} \\ \text{which keeps growing} \end{gathered}

    why it is allowed: The standard deviation is the root of QQ, so n\sqrt{n}: for 100 zeros it is 10. The far number counts far more in the squares than in the plain distances.

try it with a small nn: at n=1n = 1, line 1 gives Q=1Q = 1, which you can work out by hand

a worked example

Two cake shops sell over four days, the first 5, 5, 5 and 5 cakes, the second 2, 8, 0 and 10 cakes. Which sells more on average, and which is steadier?

  1. Both sell 20 cakes in 4 days, so both means are 5.
  2. The first shop's days all sit 0 from 5, so its spread is 0.
  3. The second shop's days sit 3, 3, 5 and 5 from 5. They add to 16, so the average distance is 4. Their squares are 9, 9, 25 and 25, average 17, whose root, the standard deviation, is about 4.12.
  4. Neither sells more, but the first shop is steadier. The mean alone does not say how steady a shop is.
01234678910533558 to the left8 to the right
The second shop's four days balance at 5. Each band is a day's distance from 5, 3, 3, 5 and 5, so 8 on each side. The first shop's days all stand on 5, so its balance would have no bands.

the trap

check yourself

  1. Where do 2, 6 and 7 balance?

    the answer

    They add to 15, and 15 shared among 3 is 5. On the left, 2 sits 3 away. On the right, 6 and 7 sit 1 and 2 away, which also make 3.

  2. How far, on average, do they sit from 5?

    the answer

    The distances 3, 1 and 2 add to 6, and 6 shared among 3 is 2.

  3. Add a fourth number, 13. Where do they balance now?

    the answer

    2, 6, 7 and 13 add to 28, and 28 shared among 4 is 7. One far number moved the mean from 5 to 7.