Home Work 10

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

    p = 0.4
    q = 0.6
    r = q/p
    
    s=1 #start
    m=8 #max
    
    p_win = (1-(r^s))/(1-(r^m))
    
    paste0('Probability is :', round(p_win ,4) )
    ## [1] "Probability is :0.0203"

  1. he bets, each time, as much as possible but not more than necessary to bring his fortune up to 8 dollars (bold strategy).

    ==> This can be solved with a Binomial Distribution.

    paste0('Probability is :', round(dbinom(3,3,0.4) ,4) )
    ## [1] "Probability is :0.064"

  1. Which strategy gives Smith the better chance of getting out of jail?

    ==> Smith triples his probability of winning if he uses the bold strategy; that gives Smith the better chance of getting out of jail.