Smith is in jail and has $1; he can get out on bail if he has $8. A guard agrees to make a series of bets with him. If Smith bets A dollars, he wins A dollars with probability 0.4 and loses A dollars with probability 0.6.
Find the probability that he wins $8 before losing all of his money if:
a) he bets $1 each time (timid strategy)
b) he bets, each time, as much as possible but not more than necessary to bring his fortune up to $8 (timid strategy)
c) Which strategy gives Smith the better chance of getting out of jail?
k <- 1
M <- 8
p <- 0.4
q <- 0.6
r <- q/p
a) he bets $1 each time (timid strategy)
(probWin <- (1 - (q/p)^k)/ (1-(q/p)^M))
## [1] 0.02030135
b) he bets, each time, as much as possible but not more than necessary to bring his fortune up to $8 (timid strategy)
(QB <- dbinom(3,3,p))
## [1] 0.064
c) Which strategy gives Smith the better chance of getting out of jail?
Smith’s likelihood of being released from jail is higher with the second strategy, which offers a 6.4% chance of success, compared to the first strategy that only provides a 2.03% chance, making it the more favorable approach