Six equal weights stand on a beam, one for each face of a die. Watch the pivot slide until the beam is level.
Where the average balances
A die's chances as weights on a beam: the mean is where the beam balances.
Six equal weights, one sixth on each face of a die. With the pivot at 1, the beam tips right: more weight lies to the right.
Describe this picture
A beam marked 1 to 6 carries six bars, one at each face of a fair die, each tall and labelled 0.17: the die’s probability mass function standing as weights. A triangle under the beam is the pivot, labelled with its position. In the clip the pivot starts at 1 with the beam tipped towards the heavier right side, slides right, and the beam tips less and less until it sits level with the pivot at 3.5, between the bars for 3 and 4. Readouts give the pivot’s position and the mean, . After the clip each bar has a round handle on its top: drag one, or focus it and use the arrow keys, and the other bars rescale so that the heights still add to 1, while the pivot moves to the new mean and the beam stays level.
The balance point
The beam balances at 3.5. No roll of a die ever shows 3.5, yet that is the die’s centre: the point where the weights on the left and the right turn the beam equally.
That balance point has a formula. Each value pulls with its weight , and the beam is level where the weighted values average out:
This is the expected value, or mean, of . I also write it . For the die,
The mean is also the long-run average. Roll the die many times and add up the faces: each face turns up about a sixth of the time, so the average of the rolls settles near 3.5. The law of large numbers makes this precise.
After the clip, drag the bar at 6 up until it holds half the weight. The other five bars shrink to 0.1 each, and the pivot slides to . The pivot leans toward the heavy bar, but it never leaves the span from 1 to 6.
Watch out
The mean is not the most likely value, nor a value that must be possible. The die’s mean, 3.5, can never be rolled. “Expected” here means “average in the long run”, not “what to expect next”.
Means of the named shapes
Bernoulli. A variable that is 1 with chance and 0 otherwise has mean .
Geometric. Roll until the first six, with chance of a six on each roll. You always make the first roll. With chance it misses, and then the wait starts over, as long on average as before. So the mean wait satisfies , which gives
For a die, , so the mean wait is 6 rolls.
Binomial. The mean of is . Summing directly takes some algebra; the next section gets it in one line.
Linearity
Change units, and the mean follows. If every value is multiplied by and shifted by , so is the balance point:
More surprising: for any two random variables on the same experiment,
This holds always, whether or not and affect each other. The reason is that the sum splits into two sums, one for and one for , and splitting a sum needs no independence. This is linearity of the mean.
Two dice. The sum of two dice has mean .
The binomial in one line. A binomial count is a sum of Bernoulli variables, one per try, each with mean . So its mean is . The ten-row board of Discrete random variables at has mean 5, its middle bin.
Hats. Three people leave their hats at a door and each takes one back at random. How many people get their own hat, on average? List all ways the hats can go back. One way gives everyone their own hat: 3 matches. Three ways swap two hats and leave one: 1 match each. Two ways move every hat: 0 matches. The total is , so the mean is .
Linearity gets this without the list. Person gets their own hat with chance , so the number of matches is a sum of three variables, each 1 with chance , and its mean is . The matches are not independent (if two people have their own hats, so does the third), but linearity does not care. With 100 people, the mean is again.
The mean of a function
Often you want the mean of something computed from : its square, a cost, a prize. Weight each computed value by the chance of :
For the die, the mean of the square is
but the square of the mean is . They differ.
Watch out
In general . Only straight-line functions, , pass through the mean. For the die, the mean of is , not .
The gap between and is not an accident; it measures how spread out is, the subject of Variance and standard deviation.
Worked example
1. Roulette. A roulette wheel has 37 numbers. You bet £1 on one number. If it comes up, you get your £1 back plus £35; otherwise you lose the £1. Your net gain is with chance and with chance :
On average you lose 2.7p per £1 bet, so over 1000 spins of £1 you lose about £27. A game is fair when the mean gain is 0; this one is not, and the gap is the casino’s income.
2. Insurance. A house has a 1 % chance a year of a £5000 loss. The insurer’s mean payout is . If the premium is £100, the insurer keeps £50 a year on average from each such house, to cover its costs and profit. You pay more than the mean loss to avoid the rare large one.
Try it yourself. Is 3.5 the most likely face of a die? No: it cannot occur at all. Every face has chance .
Where you’ll meet this
Pricing and insurance. Premiums, warranties and lottery prizes are set from mean payouts, plus a margin.
Design costs. An engineer choosing between two designs compares their expected costs: the cost of each failure times its chance, summed over the ways things can fail.
Signals. The average power of a signal is a mean, the mean of its square; for a random signal it is , not the square of the mean value. How big is a signal in the signal processing course measures it.
Retries and waiting. The mean of the geometric law, , tells a network engineer how many tries a lossy link needs on average: a link that delivers a packet with chance 0.9 needs sends per packet.
Where this leads · a dot product
List the values of as one vector and the pmf as another. The mean is their dot product: multiply matching entries and add. For the die, .
Reference card
| Quantity | Formula | Notes |
|---|---|---|
| Mean | balance point; long-run average | |
| Mean of a function | not in general | |
| Units | ||
| Sums | always, independent or not | |
| Bernoulli | ||
| Binomial | sum of Bernoullis | |
| Geometric | 6 rolls to a six | |
| Fair game | mean gain 0 | roulette: per bet |