Bankroll = .00850000 BTC
Win chance = 9%
Payout = 11x
Base bet = .00000005 BTC
On loss increase bet by 12%
So how many bets will I have to lose in a row in order to kill my bankroll and what are the odds of that happening?
(a) Back to the initial bet (50 nanoBTCs)
(b) Stay the same as the previous bet
(c) Reduce the bet by 12%
Next question: at which point (either bankroll, or total number of bets) do you stop? Without a stop condition, you will lose 100% of the time.
Also, I am assuming the payout includes the initial bet (i.e. it pays 10-1) - if it pays 11-1, you have an 8% edge (in every 100 bets, you are expected to win 11 9 times, and lose 1 91 times).
The number of bets you need to lose in a row from the start in order to lose the entire bankroll (and just to clarify, your bankroll is 170,000 times your initial bet, correct?) is about 57; this has a 1/216 chance of happening.
Correction - that is for increasing the bet by 20% each time; for 12%, this is 88 consecutive bets, which is about 1 / 4020
I ran a simulation, and it is usually around 350,000 bets, but then you get that one really long run that raises the number significantly.
The probability of losing everything is 100% unless you have stopping conditions (for example, "stop after 10,000 bets," or, "stop when my bankroll doubles"). I can't determine the probability without knowing when you will stop.
Either (a) there is a glaring error in my simulating code that I can't find, (b) the RNG is off (which I doubt), or (c) given the conditions, the bankroll will double somewhere around 52% of the time. Now, keep in mind that it takes on average 40,000 bets to double the bankroll, as opposed to about 10,000 bets to lose the whole thing. but still, this seems to contradict the "no systems work" thought.
Here are the conditions I am using:
The initial bankroll is 170,000
The initial bet is 1
Each bet has a 9% chance of winning, and pays off at 10-1; this is a HA of 1% (in 100 bets, 9 win = +90, and 91 lose = -91, for a net loss of 1 per 100 bet)
The bet is increased by 12%, rounded to the nearest 0.0001, after each loss, and is reset to 1 after each win; if the bet becomes greater than the bankroll, bet the entire bankroll
Continue until the bankroll is doubled or zero
When I run my simulator with a straight Martingale, it loses well over 50% of the time.
However, when I run it with these conditions, over a total of 1 billion bets (not one billion final results, note), it wins slightly more than 51% of the time.
Note that the higher the initial bankroll, the more likely you are to double up; pretty much any initial bankroll over 40,000 doubles up more than 50% of the time, and at around 130,000, it reaches 51%.
Hi TDG,Quote: ThatDonGuyCan somebody check my numbers on this one?
Either (a) there is a glaring error in my simulating code that I can't find, (b) the RNG is off (which I doubt), or (c) given the conditions, the bankroll will double somewhere around 52% of the time. Now, keep in mind that it takes on average 40,000 bets to double the bankroll, as opposed to about 10,000 bets to lose the whole thing. but still, this seems to contradict the "no systems work" thought.
Here are the conditions I am using:
The initial bankroll is 170,000
The initial bet is 1
Each bet has a 9% chance of winning, and pays off at 10-1; this is a HA of 1% (in 100 bets, 9 win = +90, and 91 lose = -91, for a net loss of 1 per 100 bet)
The bet is increased by 12%, rounded to the nearest 0.0001, after each loss, and is reset to 1 after each win; if the bet becomes greater than the bankroll, bet the entire bankroll
Continue until the bankroll is doubled or zero
When I run my simulator with a straight Martingale, it loses well over 50% of the time.
However, when I run it with these conditions, over a total of 1 billion bets (not one billion final results, note), it wins slightly more than 51% of the time.
Note that the higher the initial bankroll, the more likely you are to double up; pretty much any initial bankroll over 40,000 doubles up more than 50% of the time, and at around 130,000, it reaches 51%.
If the only possible outcomes are double or lose all, then the probability should be well shy of 50% because of amount of action facing the house edge. So you are in the right ball park, but too high. Are you constraining the last bet so that you cannot possibly do more than double bankroll? If not, then we should expect significantly less probability of success.
P>50%, must mean you are doing something wrong, or else you have found the philosopher's stone.
First thing that came to mind was that you might be paying out 11 instead of 10.
Can we see your simulation code or pseudo-code?
Quote: OnceDearHi TDG,
If the only possible outcomes are double or lose all, then the probability should be well shy of 50% because of amount of action facing the house edge. So you are in the right ball park, but too high. Are you constraining the last bet so that you cannot possibly do more than double bankroll? If not, then we should expect significantly less probability of success.
P>50%, must mean you are doing something wrong, or else you have found the philosopher's stone.
First thing that came to mind was that you might be paying out 11 instead of 10.
Can we see your simulation code or pseudo-code?
Here it is:
long NumBets = 0L; // The number of bets made
long NumRuns = 0L; // The number of "runs" (from the starting point to double or bust)
long NumWins = 0L; // The number of runs where the bankroll was double
// The bankroll is 170,000 times the initial bet
long InitialBankroll = 170000000L;
long Bet = 1000L;
long Bankroll = InitialBankroll;
// This is the main loop - "Running" is a boolean variable that is normally true
while (Running)
{
// R.Next(100) returns a uniform random integer from 0 to 99 inclusive
if (R.Next(100) < 9)
{
// Bet wins - pay at 10-1
Bankroll += (Bet * 10L);
// If the bankroll is now at least twice what it started as, count it as a win,
// and reset the bankroll to its initial amount
if (Bankroll >= 2L * InitialBankroll)
{
Bankroll = InitialBankroll;
NumRuns++;
NumWins++;
}
// Reset the bet to its initial amount after any win
Bet = 1000L;
}
else
{
// Bet loses - increase bet by 12%, rounded to the nearest unit
Bankroll -= Bet;
Bet = (Bet * 56L + 25L) / 50L;
// If the revised bet exceeds the bankroll, bet the bankroll instead
if (Bet > Bankroll)
{
Bet = Bankroll;
}
// If the bankroll is zero, count it as a loss, and reset the bankroll
// and bets to their initial amounts
if (Bankroll <= 0L)
{
NumRuns++;
Bankroll = InitialBankroll;
Bet = 1000L;
}
}
NumBets++;
}
If it actually ran 100,000 trails only, then I'm also showing the Win% at ~52%.
HOWEVER, I suspect this NumRuns issue is the culprit... if I take the wins (52,366) out of the 110,000 runs, then I come up with a win% of 47.6%.
I also know this is a smaller number than I should run, but the computer I'm on now is nothing like my home computer, so it actually took 3min 30 seconds to just run the 100,000 (or 110,000)... Lastly, I'm not claiming this is the most efficient version of the code, but it's quick, dirty, and I tried to be exceedingly simple to avoid error while doing this as fast as possible.
I'll report more when the bug is found.
function runSimulation(){
numTrials = document.getElementById("numberOfTrials").value;
//Run for X number of trails
while (numTrials > 0)
{
//Each trial takes numerous bets to resolve (seems ~50k is the double up point of success)
while (currentSimulation)
{
//Random integer from 1 to 100 inclusive
currentResult = parseInt((Math.random()*100)+1, 10)
if (currentResult <= 9)
{
//Winning bet is paid 10-1 (i.e. $10 wager would be paid $100... Bet*10)
bankroll = bankroll + (Bet * 10);
//If the bankroll reaches the win goal, update globals and reset to run again
if (bankroll >= winGoal)
{
bankroll = initialBankroll;
NumRuns++;
NumWins++;
currentSimulation = false;
}
//Always reset bet after a win
Bet = 1;
}
else
{
//Losing bet: deduct from BR then up the next bet by 12%
bankroll = bankroll - Bet;
Bet = Bet + (Bet * .12)
//If new bet is more than current bankroll, just bet current bankroll
if (Bet > bankroll)
{
Bet = bankroll;
}
//If the bankroll is zero, count it as a loss, and reset the bankroll
//and bets to their initial amounts
if (bankroll <= 0)
{
NumRuns++;
bankroll = initialBankroll;
Bet = 1
currentSimulation = false;
}
}
NumBets++;
}
numTrials--;
currentSimulation = true;
}
//Update Results Here
alert('Number of Runs: ' + NumRuns);
alert('Number of Bets: ' + NumBets);
alert('Number of Wins = ' + NumWins);
alert('Won ' + NumWins + ' out of ' + NumRuns + ' trials.');
}
Thus, I'm getting a hair over 47% as the final return for the bankroll on a 100,000 trial run (repeated again).
NumRuns = 100,000
NumBets = 3,001,604,527
NumWins = 47,308
47.6% last 100k run.
47.3% this 100k run.
One more for good measure for now, but at lunch I'll run a 1,000,000 trial run (which should take ~35 minutes to run). Though, I'm fairly sold the numbers are converging on a ~47.5% win ratio.
NumRuns = 100,000
NumBets = 3,004,395,329
NumWins = 47,624
47.6% most recent 100k run.
Just to add, IF you continue playing even after double your start bankroll, just a matter of time before you lose it all.Quote: sleepyeyedstopping at double bankroll would be the goal. Thanks for the clarification.
that probability = 1 when playing against a house edge.
still could be lots of fun
*****
here are 10 games I played (in R)
and the results.
bummer, won 3 lost 7
> # initialize parameters
> init_start <- 170000
> init_goal <- init_start * 2
> init_bet <- 1 # initial bet value
> prob_win <- 9/100 # probability of win
> n <- 1 # simulation count
> bet_increase <- 1.12 # bet increase after a loss (factor)
> payoff_odds <- 10 # payoff odds on win
<snip code - boring>
Results:
Win probability: 1
Lose probability: 0
games played: 52044
Win probability: 0
Lose probability: 1
games played: 9265
Win probability: 0
Lose probability: 1
games played: 40029
Win probability: 0
Lose probability: 1
games played: 37898
Win probability: 0
Lose probability: 1
games played: 22212
Win probability: 1
Lose probability: 0
games played: 50108
Win probability: 0
Lose probability: 1
games played: 15390
Win probability: 0
Lose probability: 1
games played: 1342
Win probability: 1
Lose probability: 0
games played: 41080
Win probability: 0
Lose probability: 1
games played: 29777
Bold play (bet just enough to hit target on next game or bet it all)
imo
would win more often (49.6% probability to double up)
and not take that much time (bets) to double up
sounds like more fun to me
example:
start with 17000 bet
if lose
bank=153000
next bet = 18700
and so on
easy to calculate too
> pdoub = function(br,goal,max_bet,pwin,odds,thresh,prob=1) {
+ if (br < 1 | prob < thresh) return(0)
+ bet = ceiling((goal-br)/odds) # bet needed to reach goal
+ limit = min(br,max_bet) # limit = max bet possible
+ if ( bet < limit )
+ pwin + (1-pwin)*pdoubb(br-bet,goal,max_bet,pwin,odds,thresh,prob*(1-pwin))
+ else
+ pwin*pdoubb(br+odds*limit,goal,max_bet,pwin,odds,thresh,prob*pwin) + (1-pwin)*pdoubb(br-limit,goal,max_bet,pwin,odds,thresh,prob*(1-pwin))
+ }
> require(compiler)
Loading required package: compiler
> pdoubb = cmpfun(pdoub)
> p <- pdoubb(170000,340000,100000,9/100,10,0.0000001)
> p
[1] 0.4962278
may play that later.
have fun!
fun thread
Sally
That's interesting that different RNG's are giving different results. Shows you just how "random" they are I guess:Quote: ThatDonGuyI think I found my problem...apparently, it is with .NET's RNG. I think it is just a little too regular. When I switched it to one that I wrote, I now get 47.1%.
1) .NET RNG = 52%
2) JavaScript Math.Random = 47.6%
3) TDG's RNG = 47.1%
I've run nearly half a million trials on simulation and they're all converging to 47% essentially. Pretty sure that's our answer.