DiceBot Math

in #gambling6 years ago (edited)

Here's a list of useful formulas you can use to calculate a few things in the bot and convert between a few things when you're using dicebot:


Basics

Converting between payout and chance to win:

Chance to win = (100-edge)/Payout

For example: Chance = (100-1)/2=(99)/2=49.5%


Payout = (100-edge)/(chance to win)

For example: Payout = (100-1)/49.5=(99)/49.5=2


Convert between multiplier and percentage increase

Percentage increase  = (multiplier*100)-100

For Example (1.25 multiplier): (1.25*100)-100=(125)-100=25%


Multiplier = (100+(percentage increase))/100

For Example (30% increase): (100+30)/100=(130)/100=1.3



Convert between Divide by and multiplier

Divide by = 1/multiplier

For example (multiplier 0.25): 1/0.25=4


Multiplier = 1/(Divide By)

For example (divide by 10): 1/10=0.1



Some of the more complex math

Size of bet for n losses in a row in martingale: 

BaseBet*(Multiplier^(n))

For example (multiplier 2, base 0.01) 0.01(2^(1))=0.01(1)=0.02

0.01(2^(5))=0.01(32)=0.32

n is your losses in a row. So you are calculating the size of the bet for the sixth (6th) bet in the sequence in the last example.


Frequency of losing streaks

Frequency of losing streak of size n = 1/(((chance to win)/100)^n)

For Example (chance of 50%, 10 losing streak) 1/((50/100)^10)=1/((0.5)^10)=1/0.0009765625=1024

That means you can expect to see a 10 loss streak at 50% once every 1024 bets.



I'll post some more formulas and calculations at a later stage.


Sort:  

Hi. There is something wrong with formula for frequency of loosing streak. For most time i play on payout 11x (9% chance).
Your formula "says" that 20-long loosing streak will happend once for:
1/((9/100)^20)=822 526 333 996 995 908 128 rolls
Such streak can be seen couple times per 1000 rolls.
Do I count it corectly?

Coin Marketplace

STEEM 0.22
TRX 0.07
JST 0.030
BTC 20511.55
ETH 1194.31
USDT 1.00
SBD 2.96