LightMySky

Expected Value and Variance of a Discrete Random Variable

Weight each value by its probability to find the expected value. Calculate variance as E(X²) minus the square of E(X), and compare a game's stake with its expected payout to judge mathematical fairness.

Start learning thisNo 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

At another spinner stall at the fair, the payout X is 0, 1 or 5 pounds with probabilities 0.6, 0.3 and 0.1. A distribution gives both the average payout and its spread. Its probabilities must be nonnegative and total 1. Find a missing probability by subtracting the known probabilities from 1. For the average, multiply each prize by its probability, then add the products.

£060£130£510
Expected counts in 100 spins. The £5 prize contributes £50 of the expected £80 payout, despite having the smallest expected count.

In 100 independent spins with these fixed chances, the expected counts are 60, 30 and 10. These are not promised counts. The expected total payout is 0 × 60 + 1 × 30 + 5 × 10 = £80, or £0.80 per spin. From the distribution, E(X) = 0 × 0.6 + 1 × 0.3 + 5 × 0.1 = 0.8. E(X) is the expected value: each value multiplied by its probability, then added.

Nobody wins 80p on this spinner: it pays £0, £1 or £5. E(X) is the long-run average over repeated independent spins with fixed probabilities, not a promised payout on one spin. It need not be a value X can take. A probability-weighted mean always lies between the smallest and largest possible values, so a mean outside that range signals a calculation or table error.

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

Variance is the probability-weighted average of the squared distances from E(X), so it is nonnegative. Use Var(X) = E(X²) - [E(X)]². Square each value, weight by its probability and add for E(X²). For the spinner, E(X²) = 0² × 0.6 + 1² × 0.3 + 5² × 0.1 = 2.8, so Var(X) = 2.8 - 0.8² = 2.16. To recover the mean, [E(X)]² = E(X²) - Var(X). Take its square root and use the stated sign of the mean.

Weight the squares, add, then subtract the square of the mean.

A fair stake equals the expected total payout, including any returned stake. The player's expected net gain is E(X) - stake. For a target gain, stake = E(X) - target gain. Here a £1 stake gives a mean loss of £0.20; over 400 goes the stall's expected margin before costs is £80. Actual totals can differ. Mean and spread can change separately: replace £5 at chance 0.1 by £50 at 0.01 and move the freed chance to £0. E(X) stays £0.80, but variance rises.

E(X) is a probability-weighted mean and need not be a possible payout. Var(X) = E(X²) - [E(X)]² measures spread. A fair stake equals E(X). Expected margin is stake minus E(X).

Lesson, practice questions and flashcards written for Marble.

Readings and practice questions written for Marble. Linked videos by Khan Academy: Mean (expected value) of a discrete random variable, and Variance and standard deviation of a discrete random variable.

2 · Watch

3 · Play

Another spinner stall has its distribution on a card: prizes of 0, 1 or 5 pounds, with probabilities 0.6, 0.3 and 0.1. Dee needs to know what one go is worth so she can set a stake before the gates open.

What total payout should the stall expect over 100 spins?

£060£130£510
  • £6, found by adding each possible prize once

    That sum does not use the probabilities. The £5 outcome alone contributes 100 × 0.1 × £5 = £50 to the expected total.

  • £80, using expected counts of 60, 30 and 10 (The answer)

    The expected payout is 0 × 60 + 1 × 30 + 5 × 10 = £80. Actual counts and payouts can differ.

  • £500, assuming every spin wins the £5 prize

    £500 is possible if all 100 spins pay £5, but it is not the expected total. The £5 prize has probability 0.1 on each spin.

£80 expected over 100 spins is £0.80 per spin. From the distribution, E(X) = 0 × 0.6 + 1 × 0.3 + 5 × 0.1 = 0.8.

You have weighted the prizes to find E(X). To measure spread, Dee now needs the weighted squares.

For the same spinner, what is E(X²)?

0² × 0.6 = 01² × 0.3 = 0.35² × 0.1 = 2.5
  • 2.8, adding the weighted squared prizes (The answer)

    Add 0 + 0.3 + 2.5 = 2.8. The probabilities stay attached to their original prizes.

  • 0.64, squaring the expected prize of 0.8

    0.8² = 0.64 is [E(X)]². E(X²) instead squares each possible prize before weighting and adding.

  • 2.16, subtracting the squared mean as well

    2.8 - 0.64 = 2.16 is the variance. E(X²) is the first part, 2.8, before that subtraction.

The spinner's variance is 2.8 - 0.8² = 2.16. You now have both its mean and its spread.

A player reads the sign and objects. The board says a go is worth 80p on average, and the spinner has never once paid 80p to anybody.

Is the player right, and does it matter?

  • An 80p average means 80p must be a prize on the wheel

    The possible prizes are £0, £1 and £5. An average does not have to be one of those prizes.

  • Nobody wins 80p, but the expected value can still be 80p (The answer)

    E(X) describes the long-run average payout. It is not a promised payout on an individual spin.

  • The missing 80p prize proves the average calculation is incorrect

    The weighted calculation gives 0 × 0.6 + 1 × 0.3 + 5 × 0.1 = 0.8. The result need not appear on the prize list.

The possible prizes and their probability-weighted average answer different questions.

Dee decides on a stake of 1 pound. Sam does the sums and says the game is fair, because a pound is close to 80p.

Is a 1 pound stake fair on this spinner?

stake: £1mean payout: £0.80mean loss: £0.20
  • No: the £1 stake exceeds the £0.80 expected payout (The answer)

    The expected player loss is £1 - £0.80 = £0.20 per go. Over 400 goes, the stall's expected margin before costs is £80.

  • Yes: any practical price close to the mean payout is fair

    Mathematical fairness requires equality. A practical price can still exceed the expected payout.

  • Yes: a possible £5 win makes the £1 stake fair

    The £5 prize has probability 0.1 on each spin. Its contribution is already included in the £0.80 mean; a possible large win does not establish fairness.

Mathematical fairness compares stake and expected payout. It does not by itself establish whether a stall is honest.

Leo keeps the £1 stake. He changes the prizes to £0, £1 and £50 with probabilities 0.69, 0.3 and 0.01. The mean is still 0 × 0.69 + 1 × 0.3 + 50 × 0.01 = £0.80.

What has actually changed about the game?

  • Nothing has changed because the expected payout is unchanged

    The mean is unchanged, but the possible prizes and probabilities have changed. The £50 prize now has probability 0.01.

  • The expected margin is larger than the original 20p per go

    The stake is still £1 and the mean payout is still £0.80, so the expected margin remains £0.20 before costs.

  • The variance is larger because the rare payout is much bigger (The answer)

    The new E(X²) is 1 × 0.3 + 2500 × 0.01 = 25.3. Its variance is 25.3 - 0.8² = 24.66, above the original 2.16.

The mean stayed at £0.80 while variance rose from 2.16 to 24.66. Equal means do not imply equal spreads.

You found the spinner's mean and variance, compared its stake with its expected payout, and checked a changed game with the same mean but a larger variance.

  • E(X) is every value multiplied by its probability and added up
  • It is a long-run average per go, and need not be a value the game can pay
  • A fair stake equals the expected total payout; stake minus mean payout is the expected margin before costs
  • Var(X) = E(X²) - [E(X)]², and it separates games that share an average

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

Then practise

30 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.

Start learning this