← Back to Test

Problem 1 - Entrance Test

A fair coin is flipped until either two consecutive heads or two consecutive tails appear. What is the expected number of flips?

Correct: A

Let E be the expected number. After the first flip, the second flip either matches (game ends in 2 flips) or mismatches (game continues). With probability 1/2 the game ends in 2 flips. With probability 1/2 we are back to the start but have spent 2 flips. Thus E = 1/2·2 + 1/2·(2 + E). Solving gives E = 3.