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.
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.
| number | distance from 5 | its square |
|---|---|---|
| 1 | 4 | 16 |
| 4 | 1 | 1 |
| 4 | 1 | 1 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
| total | 12 | 38 |
| average | 2.4 | 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.
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.
| number | distance from 7.5 | its square |
|---|---|---|
| 1 | 6.5 | 42.25 |
| 4 | 3.5 | 12.25 |
| 4 | 3.5 | 12.25 |
| 7 | 0.5 | 0.25 |
| 9 | 1.5 | 2.25 |
| 20 | 12.5 | 156.25 |
| total | 28 | 225.5 |
| average | 4.67 | 37.58 |
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.
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 , 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.
the move: share the total
the line: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 numbers in all. Their total is zeros and the far number, shared equally among all . For 3 zeros and 4, that is 4 shared among 4.
the move: the zeros add nothing
the line:why it is allowed: times 0 is 0.
guess it, thenthe move: divide
the line:why it is allowed: A number over itself is 1, and is not 0. The zeros alone have mean 0. The far number stands from that 0, yet it pulls the mean only to 1.
guess it, then
try it with a small : at , line 1 gives , which you can work out by hand
the move: add the distances
the line:why it is allowed: Each zero sits 1 from the mean, by question 1. The far number is , so it sits 1 less, , from it. Share the total among the numbers.
the move: add
the line:why it is allowed: and make . For 3 zeros, 6 over 4 is 1.5.
guess it, thenthe move: make the top bigger
the line:why it is allowed: We want a simple number never passes. is more than , and the bottom, , 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.
guess it, thenthe move: take out the 2
the line:why it is allowed: Multiply out and you get again, the top of line 3.
guess it, thenthe move: cancel
the line:why it is allowed: is above and below, and it is not 0. However many zeros there are, the average distance is never more than 2.
guess it, then
try it with a small : at , line 1 gives , which you can work out by hand
the move: add the squares
the line:why it is allowed: By question 2, each zero sits 1 from the mean and the far number sits . Square each distance and share the total among the numbers.
the move: work out the squares
the line:why it is allowed: times is .
guess it, thenthe move: take out the
the line:why it is allowed: Multiply out and you get again, the top of line 2.
guess it, thenthe move: cancel
the line:n mean average distance average square standard deviation 1 1 1 1 1 3 1 1.5 3 1.73 10 1 1.82 10 3.16 100 1 1.98 100 10 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: 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.
guess it, thenthe move: take the root
the line:why it is allowed: The standard deviation is the root of , so : for 100 zeros it is 10. The far number counts far more in the squares than in the plain distances.
guess it, then
try it with a small : at , line 1 gives , 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?
- Both sell 20 cakes in 4 days, so both means are 5.
- The first shop's days all sit 0 from 5, so its spread is 0.
- 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.
- Neither sells more, but the first shop is steadier. The mean alone does not say how steady a shop is.
the trap
check yourself
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.
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.
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.