This same problem has come up in a couple of completely unrelated contexts recently, and it seemed worth sharing here. It has the usual “nice” properties of being approachable in several different ways, from (initial) computer simulation to (eventual) analytic solution. Following is my attempt at re-stating the problem as a puzzle, involving neither of the original contexts:
My nephew and I like to play a card game together. He is slightly better at the game than I am, so that the probability that he wins any particular game is . The game does not take long to play, and so we usually play multiple games in succession, keeping track of who wins the most games.
However, my nephew likes to win, and so if at any point he has not won the most games, he wants to keep playing. If we stop as soon as he has won more games than I have, what is the expected number (or better yet, probability distribution) of games played in one session?