LightMySky

Expected Value and Variance of a Discrete Random Variable

Weight each value by its probability to get the long-run mean, and use E(X²) minus the square of E(X) for the variance. Both turn a distribution into a decision about whether something is worth doing.

No account needed. Progress saves in this browser.

What a learner can do afterwards

  • Calculate E(X) for a given distribution
  • Calculate Var(X) from E(X²) and E(X)
  • Decide whether a game with a stake is fair

1 · Read

The fair's other spinner stall has its distribution written out. The prize X is 0, 1 or 5 pounds, with probabilities 0.6, 0.3 and 0.1. That table answers every question about one spin, and the stall needs something it cannot answer: what a go is worth on average, so a stake can be set. The whole table has to collapse into one number, and the way to do it is to let each prize pull with the weight of its own probability.

£060£130£510
A hundred players sorted by prize. The tall bar wins nothing at all, and the short one takes most of the money out of the till.

Follow those hundred players. Sixty win nothing, which pays out 0 pounds. Thirty win a pound, which pays out 30. Ten win five, which pays out 50. The stall hands over 80 pounds across 100 goes, so a go is worth 0.80 on average. Written from the table, that is 0 × 0.6 + 1 × 0.3 + 5 × 0.1 = 0.8. Every value weighted by its own probability, then totalled: that answer is called the expected value, or E(X).

Now the thing to be careful about. Nobody wins 80p. The spinner pays 0, 1 or 5, and 0.80 is not one of them and never will be. E(X) is the long-run average per go, not a prediction of any single go, and it does not have to be a value the variable can take. It is the point where the distribution balances, in the same way a mean of 2.1 visits described members who all made whole visits.

prizes: 0, 1, 5average: 0.80nobody wins 0.80
The average of a set of prizes need not be one of the prizes. That is not a fault in the arithmetic; it is what an average is.
Try it together

E(X) says where the distribution sits. The variance says how far it spreads, and it is built the same way: Var(X) = E(X²) - [E(X)]². Square each value, weight it by its probability and add, which gives E(X²) = 0² × 0.6 + 1² × 0.3 + 5² × 0.1 = 2.8. Then take off the square of the mean: 2.8 - 0.8² = 2.8 - 0.64 = 2.16. Squaring first and subtracting after is the whole method, and because it is built from squares a variance can never come out negative.

The stall charges 1 pound a go and pays 0.80 on average, so it keeps 0.20 of every stake. A game is called fair when the stake equals the expected winnings, and this one is not: the player loses 20p a go in the long run. Across 400 goes the stall expects to keep 400 × 0.2 = 80 pounds, which is what pays for the marquee. Nothing dishonest in that, as long as nobody is told the odds are even. Position and spread are separate dials: a stall can leave E(X) exactly where it is and change how wildly the payouts swing.

The expected value E(X) is every value multiplied by its probability and added up, and it is the long-run average per go rather than a prediction of one go. It need not be a value the variable can ever take. The variance is E(X²) minus the square of E(X): square each value, weight, add, then subtract. A game is fair when the stake equals the expected winnings, and the gap between them is what the stall keeps per go.

2 · Watch

3 · Play

step 1 of 6

The spinner stall's distribution is on the card: a prize of 0, 1 or 5 pounds, with probabilities 0.6, 0.3 and 0.1. Dee has to set a stake before the gates open, and for that she needs to know what one go is worth.

A hundred people play. How much does the stall pay out altogether?

£060£130£510

Take it off screen

Print a worksheetA4 with an answer key page for grown-ups. No screen, no internet.

Where it sits

Where this leads

Jobs that lean on this skill. Follow one to see everything it is built on.

Then practise

24 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.

Spotted a problem on this page? Tell us
Expected Value and Variance of a Discrete Random Variable · Mathematics, ages 16 to 17 · LightMySky