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:

  1. he bets 1 dollar each time (timid strategy).
p = 0.4
q = 0.6
r = q/p

for (i in 0:8){
  P = round((1-r^i)/(1-r^8),4)
  print(P)
}
## [1] 0
## [1] 0.0203
## [1] 0.0508
## [1] 0.0964
## [1] 0.1649
## [1] 0.2677
## [1] 0.4219
## [1] 0.6531
## [1] 1

P_win = 0.0203

  1. he bets, each time, as much as possible but not more than necessary to bring his fortune up to 8 dollars (bold strategy).
dbinom(3,3,0.4)
## [1] 0.064

p_win = 0.064

  1. Which strategy gives Smith the better chance of getting out of jail?

The bold strategy gives smith a better chance of leaving the jail.