# The expected number of rallies needed to break a deuce in table tennis / tennis

In table tennis & tennis (among other sports?), a player/team must be two points ahead of their opposition to win a game. Thus, a game could technically go on for infinite deuces. However, assuming that the outcome of each rally is an independent event, with a 0.5 chance of either side winning; it is obvious that the expected number of rallies that a game will go for after a deuce is 4. This can be found (among other methods) through the equation:

a = [1/2 * 2] + [1/2 * (2+a)]

a/2 = 2

'a' is the expected number of turns that a game will go for after a deuce. A deuce has a 1/2 chance of finishing after two rallies (if both are won by either player) hence the term [1/2 * 2]. There is also a 1/2 chance of returning to deuce after two rallies, hence the term [1/2 * (2+a)].

The question arises: what would be the expected number of rallies needed to win after a deuce, if a player needed to be 3 points ahead (instead of 2)? This, too can be solved through an analogous method, yielding a result of 9.

The situation is slightly more complex if one needs to be 4 points ahead (denoted as a '4 point deuce'). This is because we must introduce a new variable, 'b', which is the expected number of rallies needed to win the deuce after one player is 2 points ahead.

We now have the equations:

a = 1/2 * (2+b) + 1/2 * (2+a) The trend seems to be that, for an 'n point deuce', the expected number of rallies needed to win it is n^2. The question is, can this be proven? b = 1/2 * (2+a) + 1/2 * 2

This yields a=16, b=12.

It seems that n^2 rallies are to be expected after an n point deuce. The question is, can this be proven?

Your result is correct. The situation you are describing is isomorphic to a random walk. Imagine you start at $0$ on a number line and flip a fair coin. Heads you take one step to the right (to $1$), and tails you take one step left (to $-1$). From your current position you repeat the process. In an ordinary deuce game, you stop when you get to $2$ or $-2$. In your general case, you stop when you get to $n$ or to $-n$.
It is a standard result in the theory of random walks that the expected length of this random walk is $n^2$. See for instance http://web.mit.edu/neboat/Public/6.042/randomwalks.pdf.