Expectation Recursive
Expectation Recursive
Intuitively, the expected value of X is the average/mean value that it takes. For example, by
applying the definition, we find that the expected value of a roll of a fair 6-sided die is 3.5. One
very important property of expected value is that it is linear; that is for a, b ∈ R and random
variables X, Y , even if X and Y are not independent:
For example, suppose we shuffle a deck of 52 cards and wanted to calculate the expected number
of cards that don’t change position after the shuffle. Let Xi be the random variable that takes the
value 1 if the ith card is in the same
P52spot and 0 otherwise. A relatively straightfoward application of
the linearity of expectation to E[ i=1 Xi ] tells us that we expect 1 card to remain in the same spot.
Figuring out how to define useful random variables is a large part of many problems! Conditional
expectation is also an important concept; let A be some event, then we define the expected value
of X given A as:
X∞
E[X|A] = i · P[X = i|A] (3)
i=0
1.2 Recursion
Recursion is sometimes a helpful technique in combinatorics problems. This often involves defining
several (non-random) variables and using the recursive properties given in the problem to extract
equations using these variables. For example, suppose we wanted to find the expected number of
coin flips before we see the sequence HH in our coin flips. Let x be the answer, and y be the
expected number of flips given that the previous flip was heads and the flip before was not heads.
By conditioning on the next flip, we obtain the equations x = 1 + x/2 + y/2 and y = 1 + x/2, giving
us x = 6 and y = 4.
1
2 Problems
1. You roll a standard six-sided die, then roll n more six-sided die, where n was the first roll.
What is the expected value of the sum of all the die you rolled?
1
2. Victor is farming for orbs. Each minute, he farms one orb, and with probability 20 his game
crashes and he has to start completely over (i.e. from 0 orbs). After he has been farming for
a few years, what is the expected number of orbs he has in his possession?
3. (AIME) A mail carrier delivers mail to the nineteen houses on the east side of Elm Street. The
carrier notices that no two adjacent houses ever get mail on the same day, but that there are
never more than two houses in a row that get no mail on the same day. How many different
patterns of mail delivery are possible?
4. Misha is wandering around on a lattice grid with vertices (0, 0) and (8, 8). He begins at (0, 8)
and can move one space to the right or down each turn. If he ever lands on (0, 0), (2, 2), (4, 4),
(6, 6), (8, 8), or (7, 0) he is teleported back to his starting position; if he lands on (8, 0) he
wins the game. What is the expected number of turns that it will take him to win?
5. (CMIMC) Boris plays a game in which he rolls two standard four-sided dice independently
and at random, and at the end of the game receives a number of dollars equal to the product
of the two rolled numbers. After the initial roll of both dice, however, he can pay two dollars
to reroll one die of choice, and he is allowed to pay to reroll as many times as he wishes. If
Boris plays to maximize his expected gain, how much money, in dollars, can he expect to win
by playing once?
6. A nice cream sundae consists of seven scoops of ice cream stacked on top of each other, such
that each scoop is either vanilla, chocolate, or strawberry and that strawberry and chocolate
scoops never touch. How many nice cream sundaes can you make?
7. (Brice) You flip ten fair coins. If H of them are heads and T of them are tails, what is the
expected value of HT ?
8. (HMMT) You are repeatedly flipping a fair coin. What is the expected number of flips until
the first time that your previous 2012 flips are HTHT...HT?
9. Ten tiles, nine with a unique non-zero digit and one with a decimal point, are placed into a
bag and shuffled. You pick four of them and they form a number in the order you drew them
(e.g. if you drew 4, 2, 1, 7 your number is 4217, and if you drew 1, ., 3, 6 your number is
1.36). What is the expected value of your number?
10. (CHKMO) Let n ≥ 2, and suppose that there are n distinct circles on the plane such that any
pair of circles have two distinct intersection points and no three circles intersect at a common
point. A coin is placed at each intersection point, and Alice and Bob play the following game:
players take turns removing coins, with the restriction that one cannot take away a coin lying
on the same circle as the last coin just taken away by the opponent in the previous step. If a
player has no move available, they lose. If Alice begins, for what n does Alice have a winning
strategy and for what n does Bob have a winning strategy?