# Gambler's ruin problem - modified

#### federico.zampini

##### New Member
Hi there,

I'm a probability newbie. Can anyone help me with the following problem?

A player begins with £1 and each round they can wager £1 on the outcome of a game.

The player wins the game with probability p (0.48), in which case they get £1 in winnings and with probability 1-p (0.52) the operator wins and the player loses their wager. The players play 5 repetitions.

To illustrate, on the first repetition the player either wins (with probability 0.48) and now has £2 or immediately runs out of money (with probability 0.52).

The second repetition only happens if the customer wins the first repetition. Therefore, after the second repetition the customer either wins (again with probability 0.48) and now has £3 or loses and returns to £1.

This pattern continues until the customer either runs out of money or has played five repetitions. (see the probability tree attached).

The probability that the player goes bankrupt after 1 repetition is 0.52. 1. What is the probability that the player goes bankrupt after 3 repetition? and what is the probability after 5 repetitions? Similarly, what is the probability that the players wins £2 after 5 repetitions?

How do you calculate the expected payout after 5 repetitions?
Is there a specific formula to calculate these results?

Thank you,

Fede

#### federico.zampini

##### New Member
I tried to work something out. Can anyone check whether this is correct?

1. probability of going bankrupt after 1 repetition = 0.52

2. probability of going bankrupt after 3 repetitions =
probability of going bankrupt after 1 repetition (0.52) + probability of going bankrupt after 3 repetitions (0.48*0.52*0.52). The result is 0.6498

3. probability of going bankrupt after 5 repetitions =
probability of going bankrupt after 3 repetitions (0.6498) + probability of going bankrupt after 5 repetitions (0.48*0.52*0.48*0.52*0.52)*2. The result is 0.7146

Ho do I calculate the probability of winning £2 after exactly 5 repetitions?
And what about the expected pay-out after each repetitions?

Thank you,
Fede

#### Mean Joe

##### TS Contributor
Add up the probabilities of the 5 branches that end with £2.
It's quite similar to what you've shown in the second half of #3.

#### Buckeye

##### Active Member
I saw a nice lecture on YouTube of the Gambler's Ruin a while back. It was from a Harvard instructor. He gave a nice solution.

#### rogojel

##### TS Contributor
it has been a long time ago, but i think you can have a general equation for ending up with. k dollars after N runs:

P(k,N)=q*P(k+1,N-1)+p*P(k-1,N-1) where q is the probability of losing, p of winning.

Then it is a simple matter of solving this equation . IIRC the name for this type of problem is a"branching process"

regards

#### federico.zampini

##### New Member
Thanks very much for your help guys!
Fede