The Right Multiplier

in #dicebot8 years ago

Ever since I started working on DiceBot I've been thinking about how to calculate the idea multiplier for a certain chance to win, because I noticed that for everything except x2 payout, the obvious settings does not work that well.

For example, when betting at 25% chance to win, the first thought is that you should increase your bet by 25% after each loss, or to use an equivalent multiplier of 1.25, to maintain a constant profit after your eventual win. Except that it doesn't work. Take a look at the table below:

NoBetTotal WageredBet ProfitActual Profit
1113.962.96
21.252.254.952.7
31.56253.81256.18752.375
41.9531255.7656257.7343751.96875
52.441406258.207031259.667968751.4609375
63.05175781311.2587890612.084960940.826171875
73.81469726615.0734863315.106201170.032714844
84.76837158219.8418579118.88275146-0.959106445
95.96046447825.8023223923.60343933-2.198883057
107.45058059733.2529029829.50429916-3.748603821

As you can see, after a few losses in a row (8), you start losing instead of making profit, and at 25% chance to win, you will regularly have more than 8 losses in a row. I've always just kind of winged it and set it to much higher than it needs to be, but this is riskier because the bets become much larger much quicker in a long losing streak. And I've never bothered doing the math to figure out what it should be.

The Math

So today I sat down and did it. And here's what I came up with:1.3378378378378378378378378378378
That is the ideal multiplier for 25%.

The formula to calculate the idea multiplier for any chance to win or payout is extremely simple and I cannot believe it took me this long to sit and and figure out it. The formula is simply:

Multiplier = Payout / (Payout -1)

From one of my previous articles DIceBot Math I explain how to convert between chance to win and payout. So using that formula, converting from 25% chance to win, on a site using 1% house edge:

payout = (100-1)/25=3.96

So the ideal multiplier would be :

Multiplier = 3.96/(3.96-1)=3.96/2.96=1.3378378378378378378378378378378

Converting this back to chance increase gives you an increase of 33.78378378378% increase on each loss, not 25% as one would expect.

And now, the profit stays constant much much longer (it will start to increase/decrease a bit eventually because of precision limitations imposed by computers and operating systems):

NoBetTotal WageredBet ProfitActual Profit
1113.962.96
21.3378378382.3378378385.2978378382.96
31.789810084.1276479187.0876479182.96
42.3944756486.5221235669.4821235662.96
53.2034201249.7255436912.685543692.96
64.28565665214.0112003416.971200342.96
75.73351362919.7447139722.704713972.96
87.67051147727.4152254530.375225452.96
910.2619004937.6771259440.637125942.96
1013.7287587651.405884754.36588472.96
1118.3668529469.7727376472.732737642.96
1224.5718708294.3446084697.304608462.96
1332.87317853127.217787130.1777872.96
1443.97898209171.1967691174.15676912.96
1558.83674631230.0335154232.99351542.96
1678.71402547308.7475409311.70754092.96
17105.3066016414.0541425417.01414252.96
18140.8831563554.9372988557.89729882.96
19188.4788172743.4161159746.37611592.96
20252.1540932995.5702092998.53020922.96
21337.34128691332.9114961335.8714962.96
22451.30793791784.2194341787.1794342.96
23603.77683582387.996272390.956272.96
24807.75549653195.7517663198.7117662.96
251080.6458674276.3976334279.3576332.96
261445.728935722.1265635725.0865632.96
271934.1508667656.2774297659.2374292.96
282587.58021310243.8576410246.817642.96
293461.76271713705.6203613708.580362.96
304631.27714818336.8975118339.857512.96
316195.89780624532.7953124535.755312.96
328289.10652532821.9018432824.861842.96
3311089.4803543911.3821943914.342192.96
3414835.9264258747.308658750.26862.96
3519848.0637278595.3723278598.332322.96
3626553.49065105148.863105151.8232.96
3735524.26452140673.1275140676.08752.96
3847525.70523188198.8327188201.79272.96
3963581.68673251780.5194251783.47942.96
4085061.9863336842.5057336845.46572.96
41113799.1438450641.6496450644.60962.96
42152244.8005602886.4501602889.41012.96
43203678.8548806565.3049806568.26492.96
44272489.27871079054.5841079057.5442.96
45364546.46741443601.0511443604.0112.96
46487704.05781931305.1091931308.0692.96
47652468.94212583774.0512583777.0112.96
48872897.63883456671.693456674.652.960000001
491167795.494624467.1794624470.1392.960000001
501562320.9936186788.1736186791.1332.960000001

This works for all payouts. Lets take the most iconic one, 49.5% chance to win, or x2 payout:
Multiplier = 2/(2-1) = 2/1= 2
Or, a 100% increase on loss.

For 95% chance to win:
Payout = (100-1)/95=1.1042105
Multiplier=1.042105/0.042105=24.75

For those interested, here's a LUA function you can use in the programmer mode to automatically calculate the multiplier:

function getmulti()
payout=(100-1)/chance
return payout/(payout-1)
end

--You can use this like follows:
nextbet=previousbet*getmulti()

I hope you find this information useful in your gambling endeavors.

Sort:  

Congratulations @seuntjie! You have received a personal award!

Happy Birthday - 1 Year on Steemit Happy Birthday - 1 Year on Steemit
Click on the badge to view your own Board of Honor on SteemitBoard.

For more information about this award, click here

By upvoting this notification, you can help all Steemit users. Learn how here!

Coin Marketplace

STEEM 0.22
TRX 0.12
JST 0.029
BTC 66093.99
ETH 3559.79
USDT 1.00
SBD 3.13