Also if anyone can do the calculations and show their work I'd be thankful.
Can you use 25,000 wager with 1.21x multiplier, plug it into a formula and show me how the calculator gives the player a 81.675% probability of winning. Also plug it into equations that show House Expected Return of 45.8125 and House Margin of 0.18325%?
Here's how the calculator gets the numbers it displays:
>>> winProb = 0.99 * 0.99 / (1.21-0.01)
>>> winProb
0.81675
>>> expRet = 0.01 * 25000 - winProb * (0.01 * 25000 + 25000 * (1.21 - 1)) + (0.99 - winProb) * 25000*0.99
>>> expRet
45.8125
>>> margin = 100 * expRet / 25000
>>> margin
0.18325
The expected return is found like this:
houseExpectedReturn: function(amount, cashOut) {
var p1,p2,p3;
var v1,v2,v3;
// Instant crash.
p1 = 0.01;
v1 = amount;
// Player win.
p2 = this.winProb(amount,cashOut);
v2 = - 0.01 * amount - this.profit(amount,cashOut);
// Player loss.
p3 = 1 - p1 - p2;
v3 = 0.99 * amount;
// Expected value.
return p1 * v1 + p2 * v2 + p3 * v3;
}
I'm not convinced it's right, because it's not clear how to say
that what part of the bonus pool you expect to get if you win or lose. I think I would prefer to see the calculator ignore the bonus completely, since it's almost a zero sum game.
99 times out of a hundred the game pays out an extra 1% as bonus prizes, and the other 1 time it keeps all the bets.
Suppose every round had a total of 100 bits bet. 99 rounds in a hundred will pay 1 bit in bonuses, and the other round will keep all 100 bits.