Module 2.5 · Counting and Probability
Expected value
Expected value is the long-run average of a random quantity. It shows up on almost every AMC 10 and 12, and the problems that look hardest often collapse in two lines thanks to one fact: linearity of expectation. This module teaches the definition, then shows how to break a messy count into simple pieces.
The definition
If a random quantity takes values with probabilities , its expected value is
For a fair die, . The expected value doesn't have to be a possible outcome; it's an average.
Linearity of expectation
Linearity of expectation
For any random quantities and and constants , ,
This holds even when and are dependent.
The expected sum of three dice is , with no need to list outcomes.
The real power comes from indicator variables. To find the expected number of times something happens, write the count as a sum of -or- variables, one for each place it could happen:
Since ,
You never need the distribution of itself, only the probability of each small event. The events can overlap and depend on each other in complicated ways; it doesn't matter.
Waiting times
If each trial succeeds with probability , independently, then the expected number of trials up to and including the first success is . For example, you expect to roll a die times to get a .
Why: let be the expected number of trials. The first trial always counts. With probability you're done; otherwise you're back where you started. So , which gives .
Worked example: Direct definition
You roll a fair die and win dollars, where is the number rolled. What is your expected winnings?
Note that is not . Linearity works for sums, not for squares or products of dependent quantities.
Worked example: Indicators: adjacent heads
A fair coin is flipped times. What is the expected number of places where two consecutive flips are both heads? (In HHHT, there are such places.)
There are pairs of consecutive flips. Let if flips and are both heads. Each has probability . So the expected count is .
The indicators overlap (pairs – and – share a flip), but linearity doesn't care.
Worked example: Indicators: distinct values
Three fair dice are rolled. What is the expected number of different values that appear?
For each face value from to , let if appears at least once. By the complement, . So the expected number of distinct values is
Common mistake
Don't try to find the full distribution when linearity will do. Students often spend ten minutes computing for a count . If the question only asks for , look for indicators first: "the expected number of ___" almost always means "sum the probabilities of each ___."
Worked example: Collecting every face
A fair die is rolled until every face has appeared at least once. What is the expected number of rolls?
Split the process into stages. Once you've seen different faces, each roll shows a new face with probability , so that stage takes rolls on average. By linearity, the total is
Practice
Three fair dice are rolled. What is the expected value of their sum?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
A bag holds red marbles and blue marbles. Three marbles are drawn without replacement. What is the expected number of red marbles drawn?
Two fair dice are rolled. What is the expected value of the larger of the two numbers? (If they are equal, that number is the larger.)
Seven people each put their name in a hat, and each person draws one name at random (all assignments are equally likely). What is the expected number of people who draw their own name?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Every subset of , including the empty set, is written on a card, and one card is chosen at random. What is the expected value of the sum of the numbers in the chosen subset? (The empty set has sum .)
The numbers through are arranged in a random order . A descent is a position with . What is the expected number of descents?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
A fair coin is flipped repeatedly until two heads in a row appear. What is the expected number of flips?
Four fair dice are rolled. What is the expected number of different values that appear?
Five men and five women sit at random around a round table with seats. What is the expected number of pairs of neighbors consisting of one man and one woman?
Real contest practice
- 2021 Fall AMC 10B, Problem 16: the expected number of balls back in their starting spots after two random swaps.
- 2021 Fall AMC 12B, Problem 23: an expected count of consecutive pairs, a natural fit for indicators.