Find the probability that he wins 8 dollars before losing all of his money if
he bets 1 dollar each time (timid strategy). Answer = 0.0203
states <- c("0", "1", "2", "3", "4", "5", "6", "7", "8")
trans_mat <- matrix(c(1, 0, 0, 0, 0, 0, 0, 0, 0,
0.6, 0, 0.4, 0, 0, 0, 0, 0, 0,
0, 0.6, 0, 0.4, 0, 0, 0, 0, 0,
0, 0, 0.6, 0, 0.4, 0, 0, 0, 0,
0, 0, 0, 0.6, 0, 0.4, 0, 0, 0,
0, 0, 0, 0, 0.6, 0, 0.4, 0, 0,
0, 0, 0, 0, 0, 0.6, 0, 0.4, 0,
0, 0, 0, 0, 0, 0, 0.6, 0, 0.4,
0, 0, 0, 0, 0, 0, 0, 0, 1), nrow = 9, byrow = TRUE, dimnames = list(states, states))
intial_state <- c(0, 1, 0, 0, 0, 0, 0, 0, 0)
n <- 100000
for (i in 1:n){
intial_state <- intial_state %*% trans_mat
}
intial_state
## 0 1 2 3 4 5 6 7 8
## [1,] 0.9796987 0 0 0 0 0 0 0 0.02030135
he bets, each time, as much as possible but not more than necessary to bring his fortune up to 8 dollars (bold strategy). Answer = 0.064
trans_mat <- matrix(c(1, 0, 0, 0, 0, 0, 0, 0, 0,
0.6, 0, 0.4, 0, 0, 0, 0, 0, 0,
0.6, 0, 0, 0, 0.4, 0, 0, 0, 0,
0.6, 0, 0, 0, 0, 0, 0.4, 0, 0,
0.6, 0, 0, 0, 0, 0, 0, 0, 0.4,
0.6, 0, 0, 0, 0, 0, 0, 0, 0.4,
0.6, 0, 0, 0, 0, 0, 0, 0, 0.4,
0.6, 0, 0, 0, 0, 0, 0, 0, 0.4,
0, 0, 0, 0, 0, 0, 0, 0, 1), nrow = 9, byrow = TRUE, dimnames = list(states, states))
intial_state <- c(0, 1, 0, 0, 0, 0, 0, 0, 0)
for (i in 1:n){
intial_state <- intial_state %*% trans_mat
}
intial_state
## 0 1 2 3 4 5 6 7 8
## [1,] 0.936 0 0 0 0 0 0 0 0.064
Which strategy gives Smith the better chance of getting out of jail? Answer = Bold Stratergy Provides Better Chance For Freedom.