Homework10

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 Gamler’s Ruin problem.
s <- 1
M <- 8 
q <- .6
p <- .4

qz <- (((q/p)^s)-1) / (((q/p)^M)-1)
round(qz,2)
## [1] 0.02

The probabilty of Smith getting $8 if he bets $1 each time is around 2%

  1. he bets, each time, as much as possible but not more than necessary to bring his fortune up to 8 dollars (bold strategy). The probability of 3 successes in a row is:
x <- 3 
s <- 3
p <- .4
dbinom(x, s, p) 
## [1] 0.064
  1. Which strategy gives Smith the better chance of getting out of jail?

It seems that the bold strategy p=.064 gives Smith a better chance of getting out of jail as oppose to the timid strategy that gives him p=.02 chance