Previously, I've asked a question related to this.
But now I need to know what if there are multiple chances of winning with different scaling multiples.
The goal is still to double the original money.
Starting balance: $2,500
Starting bet: $1
On loss, increase each bet by 40%.
On win, reset bet amount.
As mentioned before, there are multiple chances of winning, with different multipliers.
Below is the win chance and win amount:
0x - 80.31447937
3.5x - 14.71022253
8x - 4.23654409
13x - 0.67893335
63x - 0.05747584
500x - 0.00230930
800x - 0.00003539
1000x - 0.00000012
Hopefully, this video makes more sense.
So, it depends on how many squares you land on. But those are the odds I listed above.
Would something like this be possible? I'm trying to code in R to simulate this but I'm not sure if it is correct. I would really appreciate any help. Thank you.
Here's my code:
compute_chances <- function(starting_balance, starting_bet,
loss_increase, win_multipliers, win_chances) {
balance <- starting_balance
bet <- starting_bet
while (balance > 0 && balance < 2 * starting_balance) {
outcome <- sample(names(win_multipliers), size = 1, prob = win_chances)
balance <- balance - bet + bet * win_multipliers[outcome]
if (outcome == 0) {
bet <- bet * (1 + loss_increase)
} else {
bet <- starting_bet
}
}
return(balance >= 2 * starting_balance)}
starting_balance <- 2500
starting_bet <- 1
loss_increase <- 0.4
win_multipliers <- c(`0` = 0, `3.5` = 3.5, `8` = 8, `13` = 13, `63` = 63, `500` = 500, `800` = 800, `1000` = 1000)
win_chances <- c(`0` = 0.8031447937, `3.5` = 0.1471022253, `8` = 0.0423654409, `13` = 0.0067893335, `63` = 0.0005747584,
`500` = 0.0000230930, `800` = 0.0000003539, `1000` = 0.0000000012)
n_runs <- 10000
successes <- sum(sapply(1:n_runs, function(x)
compute_chances(starting_balance, starting_bet, loss_increase,
win_multipliers, win_chances)))
cat(paste("Chance of doubling the original money:", successes / n_runs))
sum(win_chances)
gives $0.99979$ rather than $1$ $\endgroup$