3.3. DURATION OF THE GAMBLER’S RUIN 109
It follows that the general solution of the duration equation is:
DT 0 =T 0 /(q−p) +A+B(q/p)T^0.
The boundary conditions require thatA+B= 0, andA+B(q/p)a=−a/(q−
p). Solving forAandB, we find
DT 0 =
T 0
q−p
−
a
q−p
1 −(q/p)T^0
1 −(q/p)a
.
The calculations are not valid ifp= 1/2 =q. In this case, the particular
solutionT 0 /(q−p) no longer makes sense for the equation
DT 0 = (1/2)DT 0 +1+ (1/2)DT 0 − 1 + 1
The reasoning about the particular solution remains the same however, and
we can show that the particular solution is−T 02. It follows that the general
solution is of the formDT 0 =−T 02 +A+BT 0. The required solution satisfying
the boundary conditions is
DT 0 =T 0 (a−T 0 ).
Corollary 4. Playing until ruin with no upper goal for victory against an
infinitely rich adversary, the expected duration of the game until ruin is
T 0 /(q−p) for p 6 =q
and
∞ for p= 1/2 =q.
Proof. Pass to the limita→∞in the preceding formulas.
Illustration 1
The duration can be considerably longer than we expect naively. For instance
in a fair game, with two players with $500 each flipping a coin until one is
ruined, the average duration of the game is 250,000 trials. If a gambler has
only $1 and his adversary $1000, with a fair coin toss, the average duration
of the game is 999 trials, although some games will be quite short! Very long
games can occur with sufficient probability to give a long average.