Let N
be the number of games played. Then the probability than
N=i is the probability of
exactly 3 wins in the
first i−1 games, and the
last game being a win. P(N=i)=2(i−13)(12)3(12)i−1−312=2(i−13)(12)i.
Note that the factor of 2
in P(N=i)
is to account for either of the two players winning after
i
games.