Question

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).
  2. he bets, each time, as much as possible but not more than necessary to bring his fortune up to 8 dollars (bold strategy).
  3. Which strategy gives Smith the better chance of getting out of jail?

Answer

As per above, we can see that Smith’s money can be in different states based on winning and losing. For him to win, he needs to reach to state 8 (8 dollars) before he reaches state 0 (0 dollars).

\(P(i)\): Probability for Smith to reach state 8

\(P(i)=0.4P(i+1)+0.6P(i-1)\)

\(i=1,2,3,4,5,6,7\)

\(P(1)=0.6P(2)+0.6P(0)\)

….

\(P(W)= 0.4\) and \(P(L)=0.6\)

\(P(i)= (1-P((L)P(W))^i)/(1-((P(L)/P(W)^8)\)

We can find each state probability using above with a for loop;

w <- 0.4
l <- 0.6
p <- l/w

for (i in 1:8){
  p_bail <- (1-p^i)/(1-p^8)
  print(p_bail)
}
## [1] 0.02030135
## [1] 0.05075337
## [1] 0.0964314
## [1] 0.1649485
## [1] 0.267724
## [1] 0.4218874
## [1] 0.6531324
## [1] 1

The sequence as above is 1,2,4 and 8 dollar states.

\(P(1)=0.4P(2)\) \(P(2)=0.4P(4)\) \(P(4)=0.4P(8)\)

#he needs to win each time
p_bail_b <- 0.4*0.4*0.4
p_bail_b
## [1] 0.064

By comparing the probabilty of bold strategy and 0.064 and 0.02 for timid strategy, we can say that Smith has better chance getting out of jail using bold strategy.