←back to thread

Kelly Can't Fail

(win-vector.com)
389 points jmount | 1 comments | | HN request time: 0s | source
Show context
pcthrowaway ◴[] No.42467756[source]
Note that you need to be able to infinitely divide your stake for this to work out for you all the time.

For example, if the deck has 26 red cards on top, you'd end up dwindling your initial $1.00 stake to 0.000000134 before riding it back up to 9.08

replies(7): >>42467772 #>>42467915 #>>42468365 #>>42468411 #>>42470747 #>>42471103 #>>42480391 #
boothby ◴[] No.42467915[source]
If you start out with a $1e12 stake, you're able to avoid catastrophic rounding errors even in the worst case. There's probably a life lesson here.
replies(4): >>42468021 #>>42468417 #>>42476001 #>>42481435 #
cbsks ◴[] No.42468417[source]
My simulation shows that with a 52 card deck, if you round the bet to the nearest $.01 you will need to start with $35,522.08 to win a total of $293,601.28.

If you start with $35,522.07 or less, you will lose it all after 26 incorrect cards.

replies(3): >>42468767 #>>42468808 #>>42477969 #
xelxebar ◴[] No.42477969[source]
Are you sure about those numbers? I get that the smallest fraction of original stake we hit is around 1.35E-7:

          ⊢min←⌊⌿ratio←×⍀{1-d×0⍪¯1↓(+⍀d←¯1+2×⍵)÷⌽⍳≢⍵}52↑26⍴1
    1.353223554704754E¯7
In which case we need to start with $73,897.62

          ⌈÷min
    7389762
For a total payout of $671,088.64

          ⌊(⌈÷min)×⊃⌽ratio
    67108864
Thanks for getting me to actually check this!

Note: above code is Dyalog APL.

replies(1): >>42478173 #
1. cbsks ◴[] No.42478173{3}[source]
I cannot decipher the runes you write, but your magic looks to be more powerful than mine so you are probably right. (i.e., my Python script may have errors; it was pretty hacked together)