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

(a) he bets 1 dollar each time (timid strategy).

\[P = \frac { 1-{ (\frac { q }{ p } ) }^{ s } }{ 1-{ (\frac { q }{ p } ) }^{ M } } \]

\[P = \frac { 1-{ (\frac { 0.6 }{ 0.4 } ) }^{ 1 } }{ 1-{ (\frac { 0.6 }{ 0.4 } ) }^{ 8 } } \]

p <- 0.4
q <- 0.6
r<- q/p
s <- 1
M <- 8

for(n in s:M) {
  P <- round( (1-r^n)/(1-r^M), 4)
  print(P)
} 
## [1] 0.0203
## [1] 0.0508
## [1] 0.0964
## [1] 0.1649
## [1] 0.2677
## [1] 0.4219
## [1] 0.6531
## [1] 1

hence \(P_{timid}\) = 0.0203

(b) he bets, each time, as much as possible but not more than necessary to bring his fortune up to 8 dollars (bold strategy).

Here Smith bets the entire amount (up to 8). If he wins, he will follow the following sequence: 1,2,4,8.

He starts with 1 dollar and must win 3 times in a row with probability 0.4. So, the probability of 3 successes in a row is

\(P_{bold}\) = \((0.4)^3\) = 0.064

(c) Which strategy gives Smith the better chance of getting out of jail?

The bold strategy seems better as compared to timid strategy for Smith to come out of jail.