Homework 10, part A

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).

This is the “The Gambler’s Ruin Problem” (p. 487, probability book)

P(w) = 0.4

P(l) = 0.6

if l is not equal to w, then P(winning) = ((l/w)^1 - 1)/((l/w)^8-1)

w <- 0.4
l <- 0.6
z = 1
m = 8

((l/w)^z - 1)/((l/w)^m-1)
## [1] 0.02030135

0.02030135 is the probability that Smith wins 8 dollars before losing all of his money if he bets 1 dollar each time.