Smith is in jail and has 1 dollar; he can get out on bail if he has 8 dollars.A guard agrees to make a series of bets with him. If Smith bets A dollars, he wins A dollars with probability .4 and loses A dollars with probability .6.
Find the probability that he wins 8 dollars before losing all of his money if
he bets 1 dollar each time (timid strategy).
By applying the GAMBLER’S RUIN formula we can get the probability of winning the bet.
\[ P = \frac{(\frac{q}{p})^z - 1}{(\frac{q}{p})^M - 1} \\\]
p = 0.4 # winning probability
q = 0.6 # losing probability
z = 1 # how many dollars he started with
M = 8 # when he stops
P = ((q/p)^z - 1) / ((q/p)^M - 1)
P # probability to win the bet
## [1] 0.02030135
he bets, each time, as much as possible but not more than necessary to bring his fortune up to 8 dollars (bold strategy).
To win with bold strategy, the prisoner should put his wins dollars into the bet. So, if he bet with 1$ -> win will give him 2, 2 will give him 4, 4 will give 8 then he can stop and break free.To do that, he needs 3 successive wins in a row ( binomial distribution - two independent events like coin flip). We can do that using the dbinom()
setting the probability of winning to 0.4
dbinom(3, 3, 0.4)
## [1] 0.064
Which strategy gives Smith the better chance of getting out of jail?
From calculations, it seems that the bold strategy gives the prisoner a better chance than the timid strategy to win this bet.