\[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
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
The bold strategy seems better as compared to timid strategy for Smith to come out of jail.