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
#This problem uses the Gambler's Ruin formula (from the textbook Ch12.2 p.489)
#Smith has p of winning of .4
p <- 0.4
#.6 chance of losing
q <- 0.6
q_p <- (q/p)
#figure out markov's chain sequencing 1-7
for( i in seq(1, 7, 1)){
print ((1 - q_p^i)/(1-q_p^8))
}
## [1] 0.02030135
## [1] 0.05075337
## [1] 0.0964314
## [1] 0.1649485
## [1] 0.267724
## [1] 0.4218874
## [1] 0.6531324
The probability that Smith reaches 8 starting 1 is equal to 0.0203, the probably increases as/if he wins.
Smithโs aggressive strategy would mean he would need to double his earnings every round, 1->2->4->8, meaning he would need to win 3 times given a probability of .4.
aggressive <- .4^3
print(aggressive)
## [1] 0.064
Smith is better off attempting the bold strategy over the timid strategy.