Post
Topic
Board Service Discussion
Re: Satoshi Dice -- Statistical Analysis
by
dooglus
on 08/01/2013, 19:36:06 UTC
Hmmm, what I think you're seeing is actually satoshidice fudging the payout multiplier and to make nice even numbers

I wasn't using the published multipliers, because as you say they're rounded.  I was calculating the actual multipliers using a formula which I derived like this:

Code:
(lessthan * payout + (65536 - lessthan) * 0.005) / 65536 = 0.981    (multiply both sides by 65536)
(lessthan * payout + (65536 - lessthan) * 0.005) = 0.981 * 65536    (subtract (65536 - lessthan) * 0.005 from both sides)
(lessthan * payout) = 0.981 * 65536 - (65536 - lessthan) * 0.005    (divide both sides by lessthan)
so, payout = (0.981 * 65536 - (65536 - lessthan) * 0.005) / lessthan

If you compare the values that gives you for the payout multiplier with the published values, you find it's very close in every case except for the "lessthan 1", where the site is actually a little over generous (but that's deliberate - they state the hose edge is slightly smaller for that bet):

Code:
>>> for (lessthan, actual) in [(64000, 1.004), (60000, 1.071), (56000, 1.147), (52000, 1.235), (48000, 1.338), (32768, 1.957), (32000, 2.004), (24000, 2.670), (16000, 4.003), (12000, 5.335), (8000, 8.000), (6000, 10.666), (4000, 15.996), (3000, 21.326), (2000, 31.987), (1500, 42.647), (1000, 63.968), (512, 124.933), (256, 249.861), (128, 499.717), (64, 999.429), (32, 1998.853), (16, 3997.701), (8, 7995.397), (4, 15990.789), (2, 31981.573), (1, 64000.000)]:
...   print "lessthan %5d payout %9.3f (error %9.6f)" % (lessthan, actual, actual - (0.981 * 65536 - (65536 - lessthan) * 0.005) / lessthan)
...
lessthan 64000 payout     1.004 (error -0.000424)
lessthan 60000 payout     1.071 (error -0.000052)
lessthan 56000 payout     1.147 (error -0.000199)
lessthan 52000 payout     1.235 (error -0.000060)
lessthan 48000 payout     1.338 (error  0.000435)
lessthan 32768 payout     1.957 (error  0.000000)
lessthan 32000 payout     2.004 (error  0.000152)
lessthan 24000 payout     2.670 (error -0.000131)
lessthan 16000 payout     4.003 (error  0.000304)
lessthan 12000 payout     5.335 (error -0.000261)
lessthan  8000 payout     8.000 (error -0.000392)
lessthan  6000 payout    10.666 (error  0.000477)
lessthan  4000 payout    15.996 (error  0.000216)
lessthan  3000 payout    21.326 (error -0.000045)
lessthan  2000 payout    31.987 (error  0.000432)
lessthan  1500 payout    42.647 (error -0.000091)
lessthan  1000 payout    63.968 (error -0.000136)
lessthan   512 payout   124.933 (error  0.000000)
lessthan   256 payout   249.861 (error  0.000000)
lessthan   128 payout   499.717 (error  0.000000)
lessthan    64 payout   999.429 (error  0.000000)
lessthan    32 payout  1998.853 (error  0.000000)
lessthan    16 payout  3997.701 (error  0.000000)
lessthan     8 payout  7995.397 (error  0.000000)
lessthan     4 payout 15990.789 (error  0.000000)
lessthan     2 payout 31981.573 (error  0.000000)
lessthan     1 payout 64000.000 (error 36.859000)

What happens with your strategy if you try a martingale on the less than 2 (ignoring mins and max bets for hypothetical purposes)?

Let's not ignore the mins and maxes.  They're currently 0.01 and 0.1844 (though they seem to change every few seconds now).

Here's a strategy to win 319 BTC betting on lessthan 2 in 91761 bets, starting at min bet and working up to max bet:

Code:
win on turn  1 : bet =   0.01000000, spent =   0.01050000, win = 319.81523000, lose =   0.00000001, back =   0.00000000, profit = 319.80473000 (99.997% to lose all)
win on turn  2 : bet =   0.01000033, spent =   0.02100033, win = 319.82573031, lose =   0.00000001, back =   0.00000001, profit = 319.80472999 (99.994% to lose all)
win on turn  3 : bet =   0.01000066, spent =   0.03150098, win = 319.83623095, lose =   0.00000001, back =   0.00000002, profit = 319.80472999 (99.991% to lose all)
win on turn  4 : bet =   0.01000099, spent =   0.04200197, win = 319.84673192, lose =   0.00000001, back =   0.00000003, profit = 319.80472998 (99.988% to lose all)
win on turn  5 : bet =   0.01000131, spent =   0.05250328, win = 319.85723322, lose =   0.00000001, back =   0.00000004, profit = 319.80472998 (99.985% to lose all)

win on turn 91757 : bet =   0.18437485, spent = 5580.49620770, win = 5896.59719089, lose =   0.00042187, back =   3.70328891, profit = 319.80427210 ( 6.080% to lose all)
win on turn 91758 : bet =   0.18438062, spent = 5580.68108832, win = 5896.78164963, lose =   0.00042190, back =   3.70371078, profit = 319.80427209 ( 6.079% to lose all)
win on turn 91759 : bet =   0.18438638, spent = 5580.86597470, win = 5896.96611411, lose =   0.00042193, back =   3.70413268, profit = 319.80427209 ( 6.079% to lose all)
win on turn 91760 : bet =   0.18439215, spent = 5581.05086685, win = 5897.15058433, lose =   0.00042196, back =   3.70455461, profit = 319.80427209 ( 6.079% to lose all)
win on turn 91761 : bet =   0.18439792, spent = 5581.23576477, win = 5897.33506029, lose =   0.00042198, back =   3.70497657, profit = 319.80427209 ( 6.079% to lose all)

It risks 5581.23576477 to win 319.80427209 and has a 6.079% chance of losing everything.

That's a payout of 1.057x and has the same risk as "lessthan 61552" (if it existed):

Code:
>>> 319.80427209 / 5581.23576477 + 1
1.0572999037433028
>>> 65536 * (1 - 6.079/100)
61552.06656

If satoshidice offered "lessthan 61552", they'd payout 1.044x on it:

Code:
>>> lessthan = 65536 * (1 - 6.079/100); (0.981 * 65536 - (65536 - lessthan) * 0.005) / lessthan
1.04417121836437

So again it's better to martingale a series of high-multiplier bets than to play a single large low-multiplier bet.

Why??