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
This is a random walk problem with two absorbing states, 0 and 8.
From pg. 487 of Introduction to Probability by Charles M. Grinstead:
\[ q = 0.6 \\ p = 1-q = 0.4 \\ s = 1 \\ M = 8 \\ P = \frac{1 - \frac{q}{p}^s}{1 - \frac{q}{p}^M} \] In R we find:
q = 0.6
p = 0.4
s = 1
M = 8
P = (1 - (q/p)^s) / (1 - (q/p)^M)
P
## [1] 0.02030135
0.4 ^ 3
## [1] 0.064
The bold stratagey would be better.
If he started off with two dollars:
B = 0.4 ^2
B
## [1] 0.16
q = 0.6
p = 0.4
s = 2
M = 8
T = (1 - (q/p)^s) / (1 - (q/p)^M)
T
## [1] 0.05075337
So he is still better than if he did the timid stratagy.
This makes sense because the law of large numbers will lead to achieving the expected value (0).