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
q_timid <- matrix(c(0,.4,0,0,0,0,0,.6,0,.4,0,0,0,0,0,.6,0,.4,0,0,0,0,0,.6,0,.4,0,0,0,0,0,.6,0,.4,0,0,0,0,0,.6,0,.4,0,0,0,0,0,.6,0), c(7,7), byrow = TRUE)
identity <- diag(7)
n_timid <- solve(identity-q_timid)
r_timid <- matrix(c(.6,0,0,0,0,0,0,0,0,0,0,0,0,.4), nrow=7, byrow = TRUE)
b_timid <- n_timid %*% r_timid
print(b_timid)
## [,1] [,2]
## [1,] 0.9796987 0.02030135
## [2,] 0.9492466 0.05075337
## [3,] 0.9035686 0.09643140
## [4,] 0.8350515 0.16494845
## [5,] 0.7322760 0.26772403
## [6,] 0.5781126 0.42188739
## [7,] 0.3468676 0.65313243
Using the timid strategy and starting from 1 dollar, Smith has approximately a 2.03% chance of making it to 8 dollars.
q_bold <- matrix(c(0,.4,0,0,0,0,0,0,0,0,.4,0,0,0,0,0,0,0,0,.4,0,0,0,0,0,0,0,0,0,.6,0,0,0,0,0,0,0,0,.6,0,0,0,0,0,0,0,0,.6,0), c(7,7), byrow = TRUE)
n_bold <- solve(identity-q_bold)
r_bold <- matrix(c(.6,0,.6,0,.6,0,.6,.4,0,.4,0,.4,0,.4), nrow=7, byrow = TRUE)
b_bold <- n_bold %*% r_bold
print(b_bold)
## [,1] [,2]
## [1,] 0.936 0.064
## [2,] 0.840 0.160
## [3,] 0.744 0.256
## [4,] 0.600 0.400
## [5,] 0.504 0.496
## [6,] 0.360 0.640
## [7,] 0.216 0.784
Using the bold strategy and starting from 1 dollar, Smith has a 6.4% chance of making it to 8 dollars.
The bold strategy gives Smith a better chance of getting out of jail.