Question 1: Probability
Medium · Probability
In a game, a player tosses a fair coin repeatedly and stops as soon as she has tossed two heads in a row or has tossed a total of three tails, whichever happens first. What is the probability that the game ends because she tossed two heads in a row?
- A. 37/64
- B. 19/32
- C. 11/16
- D. 7/10
- E. 7/8
Show the answer and explanation
Answer: A. 37/64
- A. Correct. Working back through the states gives 37/64.
- B. 19/32 is the probability that two heads in a row appear somewhere in the first 5 tosses, on the idea that the game lasts at most 5 tosses. That count includes orders such as T, T, T, H, H, where the game has already ended on the third tail, and it misses games that last 6 tosses.
- C. 11/16 is the probability of tossing two heads, not necessarily in a row, before a third tail.
- D. 7/10 is the probability for a game that ends on two heads in a row or three tails in a row. Here the game ends on the third tail whenever it comes, even with heads between the tails.
- E. 7/8 = 1 − (1/2)³ treats the game as ending in tails only if the first three tosses are all tails. The three tails can be spread out, with single heads between them.
How to solve it
Track two things: how many tails she has tossed and whether her last toss was a head. Work backward from 2 tails. With 2 tails and a head just tossed, the next toss decides the game, so her chance is 1/2. With 2 tails and no head just tossed, she needs a head (reaching the state above) and then another: (1/2)(1/2) = 1/4. With 1 tail and a head just tossed: 1/2 + (1/2)(1/4) = 5/8. With 1 tail and no head just tossed: (1/2)(5/8) + (1/2)(1/4) = 7/16. With no tails and a head just tossed: 1/2 + (1/2)(7/16) = 23/32. At the start: (1/2)(23/32) + (1/2)(7/16) = 23/64 + 14/64 = 37/64.
Why it is medium difficulty: There is no formula for a race between a run of heads and a running count of tails; the solver has to set up states that track both the tail count and whether the last toss was a head, and each shortcut (a fixed number of tosses, tails in a row, heads not in a row) answers a different question.
Written for this page. It does not appear in any timed paper.