Skip to main content

Gambler's Ruin Problem Mathematical Proof

Gambler's ruin problem is a statistical concept that 2 people gamble $1 in each game, one of them will lose all his or her money if they keep gambling.

Problem Statement

Let A and B be gamblers who gamble 1$ in each game. A's probability of winning in each game is p while A’s probability of losing in each game is 1-p, Let 1-p be denoted as q. The sum of the probability of losing and the probability of wining is 1 because A either wins or loses a game. There are no other outcomes.

Let A have x amount of money and B have n-x amount of money. A and B have total amount of n dollars.

We want to find the probability of A wining all B's money if they keep gambling. Let it be Px.

After One Game

A and B gamble for one game. A either wins with the probability of p or loses with the probability of q.

If A wins this game, A will have x+1 dollars and A’s probability of wining all B's money become Px+1.

If A loses this game, A will have x-1 dollars and A’s probability of wining all B's money become Px-1.

So together, Px = p* Px+1 + q*Px-1.

P0 = 0, because A has lost all his or her money and the game has ended.

Pn = 1, because A has won all B's money and the game has ended.

Guess the Answer First

Assume Px = xi. Px = p* Px+1 + q*Px-1 becomes xi = p*xi+1 + q* xi-1, which is this quadratic equation: x = p*x2 + q.

Solving for x, we get x = 1 or x = q/p.

Testing the results

If x = 1, Px = xi = 1, which does not satisfy the fact that P0 = 0.

If x = q/p, for Pn to be 1, q will have to be p, then x will be 1 again.

Therefore, the solution will be some combination of the 2 roots of x, 1 and q/p .

Solving for this combination

Let Px = A*(1)x + B*(q/p)x, which is the linear combination of the two roots of x,1 and q/p plugging into Px = xi.

Applying the results of P0 = 0 and Pn = 1 to this linear combination, we get the following derivation:

P0 = 0 = A + B, A = -B

Pn = 1 = A + B* (q/p)n = -B + B*(q/p)n = B((q/p)n - 1).
B = 1 / ((q/p)n - 1)

A = -B, so A = -1 / ((q/p)n - 1)

Finally, Px = A*(1)x + B*(q/p)x = -1 / ((q/p)n - 1) + (q/p)x / ((q/p)n - 1)

= (q/p)x -1 / ((q/p)n - 1)

What If p = q?

If p = q, Px = (q/p)x -1 / ((q/p)n - 1) = 0/0 = 0, which doesn't make sense because Pn is 1 not 0 even if p = q.

As p approaches q, p/q goes to 1 then both (q/p)x -1 and (q/p)n -1 go to 0. Then this has become a "0 over 0" problem, which can be solved by applying the L'hopital's rule.

By taking the first derivative of both (q/p)x -1 and (q/p)n -1 with respect to (q/p), we get x(q/p)x-1 and n(q/p)n-1.

Plug back in Px = (q/p)x -1 / ((q/p)n - 1), we get

Px = x(q/p)x-1/ n(q/p)n-1 = x / n when p goes to q.

Suggested reading: Probability Calculator: Gambler’s Ruin Problem

Comments

Popular posts from this blog

Which is better? BND or AGG?

The US 10-year treasury yield has reached at 2007-2008 years level, which is about 16 years ago. From a technical point of view, it is a buy. Then there are 2 bond ETFs that I am interested in. There are BND and AGG. They are very similar in nature. US 10 year Treasury Bond, chart, prices - FT.com Expense Ratio BND: 0.03% AGG: 0.03% The same. Turnover Rate BND: 40.00% AGG: 104.0% BNG seems better. Historical Performance Comparison Investment duration: 5 years with no tax on dividends BND wins a little with winning rate of 57.5%, but AGG wins 0.012% in return. Investment duration: 5 years with 30% tax on dividends AGG wins a little with winning rate of 65% and a 0.079% difference on average. Investment duration: 10 years with no tax on dividends AGG wins a little with winning rate of 67% and a 0.024% difference on average. Investment duration: 10 years with 30%  tax on dividends AGG wins a little with winning rate of 99% and a 0.095% difference on average. C...