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:
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
dbinom(3,3,0.4)
## [1] 0.064
p_win = 0.064
The bold strategy gives smith a better chance of leaving the jail.