Martingale betting system (Roulette)

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

zealo
Posts: 321
Joined: Sun Dec 17, 2006 11:36 am UTC
Location: perth, australia
Contact:

Xanthir wrote:
phlip wrote:After 10000 simulations, that got 9874 wins of $500 each, and 126 losses of$100k, for an average loss of $12,106.30. This is the part that gets me every time. Any variant on Martingale always shows these absolutely ridiculous numbers. Win$500, or lose $100k. That's... not a well-tuned utility function. what about a worth aiming for target like 50% of your total funds? or what target gives you a 50% chance of achieving it. does the starting bet (1, 10, 100) affect the odds? ave_matthew wrote:in a perfect system a gallon of body fat is worth one third of the US GDP phlip Restorer of Worlds Posts: 7569 Joined: Sat Sep 23, 2006 3:56 am UTC Location: Australia Contact: Re: Martingale betting system (Roulette) zealo wrote:what about a worth aiming for target like 50% of your total funds? or what target gives you a 50% chance of achieving it. I'll give that a go... results should be interesting. zealo wrote:does the starting bet (1, 10, 100) affect the odds? Having a starting bet of$10 should be the same as having 1/10 of the funds available and 1/10 of the target (and 1/10 of the table limit). It probably changes your chance of winning in one way or the other, but I'm not entirely sure which way... I'd have to try it and see.

OK, so... betting strategy from my previous simulation (min(target-money,money,tablelimit)), $10,000 table limit,$100,000 funds available, $50,000 target,$1 starting bet: around 25% chance of winning $50k, 75% of losing$100k (the exact figure in my small simulations ranges between 20% and 30%... it takes too long to run a longer simulation)

Exactly the same, but with a starting bet of $10: around 30% (+/- 2 or 3 or so) chance of winning Starting bet of$100: around 36% (+/- 1) chance of winning
Starting bet of $10k (ie bet the table limit every time): 48% (+/- 1) chance of winning I also tried just betting$1k every time... and out of 1000 trials, it won twice.

So yeah, the optimum strategy seems to be "bet the biggest amount you can, until you reach your final target"... which is still far from breakeven, but significantly better than Martingale.

Also: With the same situation, starting bet of $1, but a target of about$24000, you get a 50% chance of winning.
For a starting bet of $100, the target is$35000 that gives you a 50% chance.
For just always betting the table limit of $10k, the target is around$50k.
Note that for a fair table, all these figures would be $100k... all of these are a 50% chance of losing$100k, and a 50% chance of winning significantly less than \$100k.

[edit again]
In case anyone's curious... it's not the most clean or well-optimised code ever, but still:

Code: Select all

#!/usr/bin/env python# starting money availablefundsavail = 100000# amount of money to call a "win"target = fundsavail + 50000# maximum bettablelimit = 10000# first betstartbet = 100# probability of winning a roundwinchance = (18,38) # can be changed to (18,37) for a one-zero table, or (18,36) for a fair table# number of roundsnumrounds = 1000 # higher numbers give better results, but take longerprintevery = numrounds / 10def oneround():    from random import randrange    money = fundsavail    curtarget = money + startbet    while money > 0 and money < target:        curtarget = max(curtarget, money + startbet)        bet = min(curtarget - money, money, tablelimit)        if randrange(winchance[1]) < winchance[0]:            money += bet        else:            money -= bet    return moneydef manyrounds(n):    wins = 0    losses = 0    for i in xrange(n):        if i % printevery == 0:            print i+'/'+n        result = oneround()        if result == 0:            losses += 1        elif result == target:            wins += 1        else:            # shouldn't happen usually, but can happen if, for instance, your target isn't a multiple of your starting bet            raise "Unexpected result: " + result    return (wins,losses)if __name__ == '__main__':    (wins,losses) = manyrounds(numrounds)    print wins * 100.0 / numrounds + "% win rate (" + wins + "/" + numrounds + ")"

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

qinwamascot
Posts: 688
Joined: Sat Oct 04, 2008 8:50 am UTC
Location: Oklahoma, U.S.A.

Re: Martingale betting system (Roulette)

Nebulae wrote:With an infinite bankroll, as long as you could keep playing, you always win, no matter what the Win/Loss % is.

Even if we assume %win>0, it's still a trivial winning. Your end value after any bet will still be infinite, and no larger or smaller than your starting value, so in reality you didn't really win/lose anything.

edit: also interestingly, with any %win<1 and a finite bankroll, if you play until your money runs out, you will lose it all. This is trivial to see but gamblers don't realize it.
Last edited by qinwamascot on Tue Nov 04, 2008 1:07 am UTC, edited 1 time in total.
Quiznos>Subway

phlip
Restorer of Worlds
Posts: 7569
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: Martingale betting system (Roulette)

With an infinite bankroll, you have a 0-probability chance of losing, but the amount you'd lose in that situation would be infinite. Thus, the expected value calculation has a [imath]0 \times \infty[/imath] in it. You can't just call that 0.

The limit as the bankroll approaches infinity is still an expected loss.

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

qinwamascot
Posts: 688
Joined: Sat Oct 04, 2008 8:50 am UTC
Location: Oklahoma, U.S.A.

Re: Martingale betting system (Roulette)

no reasonable casino would let you bet an infinite amount.

Random832 wrote:Um, no. Their expected value is _negative_. Did you guys both somehow forget about the existence of negative numbers? Martingale's is indeed lower (i.e. greater magnitude negative) because the expected value of each bet (being, remember, negative) is multiplied by the amount that is bet.

Depends on what you call expected value. If it includes the initial investment P as an investment, then the expected value is exactly -P. But if you count that as throw-away money, then it's 0.
Quiznos>Subway

Who is online

Users browsing this forum: No registered users and 10 guests