Cards Until the First Ace
A standard, well-shuffled 52-card deck is dealt face-up one card at a time. Find the expected number of cards dealt up to and including the first ace.
Work it out, then compare with the answer.
SolutionShow the worked solution
Key idea. Count the non-aces dealt before the first ace using indicators.
Label the non-aces . Let be the indicator that is dealt before all four aces. The number of cards dealt up to and including the first ace is
Fix and look only at the relative order of the five cards and the four aces. In a uniformly shuffled deck, each of these five is equally likely to come first. Hence . By linearity of expectation,
Generalisation. Suppose a well-shuffled deck of cards contains special cards. Each of the ordinary cards precedes all the special cards with probability . So the first special card is at expected position
Equivalently, the special cards cut the others into gaps of equal expected size .
Variations
The same idea with a twist. Each solution gives only the changed step.
Five identical boxes are shuffled, with exactly one containing $150 and the rest empty, all arrangements equally likely. You pay $X to open a box, proceeding one box at a time and stopping as soon as you find the box with the money. Find the value of that makes the game fair, i.e. for which your expected net profit (money found minus total amount paid) is zero.
Work it out, then compare with the answer.
Solution
The money box is equally likely to be in each of positions . So the number of boxes opened, , satisfies
This agrees with .
You always collect $150, so the expected profit is . Setting this to zero gives .
A game show hides $200 behind two of seven doors, chosen uniformly at random; the other five doors are empty. You open doors one at a time, uniformly among those not yet opened, stopping as soon as you open a door with money behind it. Each door you open, whether or not it hides money, costs $x. Find the value of that makes the game fair, i.e. for which your expected net profit is zero.
Work it out, then compare with the answer.
Solution
We take the statement to mean that you collect $200 when you open the first door with money behind it.
Consider each of the empty doors together with the two money doors. Each of these three is equally likely to be opened first, so each empty door is opened before both money doors with probability . The number of doors opened, , therefore has
You always win $200, so the expected profit is . Setting this to zero gives .
A standard 52-card deck, which contains 13 hearts, is dealt face-up one card at a time until every heart has appeared. Find the expected total number of cards dealt, i.e. the position at which the last heart appears.
Work it out, then compare with the answer.
Solution
Consider each of the non-hearts together with the hearts. Among these cards, the non-heart is last with probability . So the expected number of non-hearts dealt after the last heart is .
The last heart therefore sits at expected position
A basket contains 4 green apples and 50 red apples. Apples are drawn one at a time without replacement until all 4 green apples have been removed. Find the expected number of apples remaining in the basket at that moment.
Work it out, then compare with the answer.
Solution
The apples left in the basket are exactly the red apples drawn after all green ones.
Consider each red apple together with the green apples. Each of these five is equally likely to be drawn last, so the red apple comes after all the greens with probability . By linearity, the expected number of apples remaining is