# Gambler’s Ruin: A Lesson in Probability

The Riddler Express for Friday, February 23 was a gambler’s ruin problem, so I thought I would walk you through the solution and show you how the following problem can be solved.

Suppose you have one quarter, and I have two quarters.  Each round, a die is rolled. If a 1, 2, 3, or 4 is rolled, you will win a quarter from me.  If a 5 or 6 is rolled, I will win a quarter from you.  The game is won when someone retrieves all 3 quarters.

What is the probability that you will win the game?

### Breaking it down into cases

Let’s use W to represent you winning a round, and L can represent you losing a round.  We can see that you will win this game if you win the next two rounds and capture both my quarters: WW.

You could also win by first winning, then losing, and then winning twice in a row: WLWW.

You could also win along the path WLWLWW.  And WLWLWLWW.  And so on.

The probability of any given W is 2/3.  The probability of any given L is 1/3.  To find the probability of two wins in a row, we would need to multiply and get $(2/3)(2/3)=(2/3)^2$.

The probability of WLWW occurring is $(2/3)(1/3)(2/3)(2/3)=(1/3)(2/3)^3$.  Similarly, the probability of WLWLWW occurring is $(1/3)^2(2/3)^4$.  And so on.

So, we would need to calculate the difficult infinite sum $\displaystyle (2/3)^2+(1/3)(2/3)^3+(1/3)^2(2/3)^4+\ldots$ .

This is not too difficult for the savvy statistician/mathematician, but it seems like a headache for the rest.  There is an easier approach.

### A Recursive Relationship

Let $P_i$ represent the probability that you will eventually win this game if you are holding $i$ quarters.

If you are not holding any quarters, then $i=0$ and $P_0 =0$ since you have a zero probability of winning (indeed, you have lost).

If you are holding all three quarters, then $i=3$ and $P_3=1$ since you have won the game (and therefore have a probability 1 of winning).

Since we are holding one quarter in this problem, $i=1$, and we want to find $P_1$.  Here is the weird trick.  We will solve for this by also solving for $P_2$, the probability that you will eventually win when holding 2 quarters.

We need to recognize the following two relationships:

1. The probability that we will eventually win the game when we hold 1 quarter is the probability that we win the next round AND eventually win the game from holding 2 quarters. The equation that results from this logic is $P_1 = (2/3)P_2$.
2. The probability that we will eventually win the game when we hold 2 quarters is the probability that we lose the next round AND eventually win the game from holding 1 quarter OR we simply win the next round.  The equation that results in this logic is $P_2 = (1/3)P_1+2/3$.

Now, we use some substitution. Using the equation from 1 inside the equation from 2, we get $\displaystyle P_2 = (1/3)(2/3)P_2+2/3$.

Multiplying the constants together gives you $P_2=2/9P_2+2/3$. Subtracting $2/9P_2$ from both sides gives you $7/9 P_2 = 2/3$.  Finally, multiplying both sides by the $9/7$ will give $P_2 = (9/7)(2/3) = 6/7$.

Now, using the original equation from 1 we get $P_1 = (2/3)(6/7) = 4/7$.

### Gambler’s Ruin Equation: The General Result

To explain how to obtain the general result would be over most people’s heads, so I’ll simply give it to you.

Suppose on each individual round you have a probability $p$ of winning and a probability $q = 1-p$ of losing.

When you begin with a bank of $i$, and you are interested in reaching a fortune of $N$, then the probability that you will reach that fortune is given as $\displaystyle \frac{1-(q/p)^i}{1-(q/p)^N}$.

To see how this applies to our problem, you will need to recognize that $p=2/3$, $q=1/3$, $i=1$, and $N=3$.

Notice that $q/p = (1/3)/(2/3) = 1/2$, so when we plug everything into that equation, we get $\displaystyle \frac{1-(1/2)^1}{1-(1/2)^3} = \frac{(1/2)}{1-(1/8)} = \frac{(1/2)}{(7/8)} = \frac12\cdot\frac87 = \frac47$.

## 2 thoughts on “Gambler’s Ruin: A Lesson in Probability”

1. Jonathan Vieker says:

Just covered basic probability in my statistics class, so it’s cool to see how recursive methods can be employed in this area. And I was pleasantly surprised at how much of this I could follow. 🙂

Like

1. Jason Shaw says:

I was afraid that this post might be a bit much, so it was good to hear that you could follow some of it.

Like