Risk of Ruin
1r. Gambler's Ruin in R. Basic probabilities and average number of games to play for success or ruin.
This section uses a Markov chain method, creating a transition matrix and completing the math.
gambler.ruin2 <- function(p, bankroll_target, title, Printprint)
call with : gambler.ruin2(244/495, 20, "craps pass line. No odds", 0)
gambler.ruin2(prob of success, betting units, "title", print data table)
*****
The bankroll target is in units. For example, if you have $1,000 and flat betting $25 that gives you 1000/25= 40 betting units. That is exactly the same as $200 bankroll and betting $5 each bet or with a stake of $40 and betting $1 at each bet.
Printprint = 1 (0 does not print = default) is for printing a table of data up to the target from the lower Stakes.
Default data is to double the starting stake (bankroll)
One does not specifically enter a starting unit bankroll (stake) but can on line 5. example would be at Line 5; bankroll_start <- (bankroll_target/2) could be: bankroll_start <- 4#(bankroll_target/2) . Print = 1 is for all starting stakes in a data table.
2r. Gambler's Ruin formulas below in the R code produce
goal and ruin probabilities as well as
average games to either or to goal given goal is achieved and ruin, given ruin is attained.
Call example: gambler.ruin(10, 20, 18/37, "0 Roulette evens bet")
gambler.ruin(win goal (in units), stake - what one can lose(in units), probability of one trial success, "title")
Some Goal / Risk of Ruin tables in Google
These are built using Markov chains in R program and moved into Excel then into Google.
STILL Under Construction
link for above sheet
craps pass line with 345x odds
50 unit target and 50 wagers (N = 50, N = number of bets)
link for above sheet
craps pass line with 0x odds (No odds, just flat betting)
240 unit target and 30, 60 and 120 wagers (N = number of bets)