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). \[ \begin{array}{cccccccc|cc} & 1 & 2 & 3 & 4 & 5 & 6 &7 &0 &8 \\ 1 & 0 &.4 & 0 & 0 & 0 & 0 &0 &.6 &0\\ 2 & .6 & 0 & .4 & 0 & 0 & 0 &0 &0 &0\\ 3 & 0 & .6 & 0 & .4 & 0 & 0 &0 &0 &0\\ 4 & 0 & 0 &.6 & 0 & .4 & 0 & 0 & 0 & 0\\ 5 & 0 & 0 & 0 & .6 & 0 & .4 & 0 & 0 & 0\\ 6 & 0 & 0 & 0 & 0 & .6 & 0 & .4 & 0 & 0\\ 7 & 0 & 0 & 0 & 0 & 0 & .6 & 0 & 0 &.4\\ \hline 0 & 0 & 0 & 0 & 0 & 0 &0 &0 &1 &0\\ 8& 0 & 0 & 0 & 0 & 0 &0 &0 &0 &1\\\\ \end{array} \]
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.

  1. he bets, each time, as much as possible but not more than necessary to bring his fortune up to 8 dollars (bold strategy). \[ \begin{array}{cccccccc|cc} & 1 & 2 & 3 & 4 & 5 & 6 &7 &0 &8 \\ 1 & 0 &.4 & 0 & 0 & 0 & 0 &0 &.6 &0\\ 2 & 0 & 0 & 0 & .4 & 0 & 0 &0 &.6 &0\\ 3 & 0 & 0 & 0 & 0 & 0 & .4 &0 &.6 &0\\ 4 & 0 & 0 &0 & 0 & 0 & 0 & 0 & .6 & .4\\ 5 & 0 & .6 & 0 & 0 & 0 & 0 & 0 & 0 & .4\\ 6 & 0 & 0 & 0 & .6 & 0 & 0 & 0 & 0 & .4\\ 7 & 0 & 0 & 0 & 0 & 0 & .6 & 0 & 0 &.4\\ \hline 0 & 0 & 0 & 0 & 0 & 0 &0 &0 &1 &0\\ 8& 0 & 0 & 0 & 0 & 0 &0 &0 &0 &1\\\\ \end{array} \]
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.

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

The bold strategy gives Smith a better chance of getting out of jail.