5 ms·
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.
by boothby 2y ago
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.
- fragmede 2y agoIs the lesson: choose to be born to wealthy parents?
- darkerside 2y agoOr is it to choose appropriate betting amounts based on your capacity for risk
- Onavo 2y agoIEEE-754 isn't precise enough for my capacity :( I too need rich parents.
- laidoffamazon 2y agoI guess it then does follow that having rich parents does expand your capacity for risk!
- darkerside 2y agoThis is a truism
- User23 2y agoThe lesson I'm taking away is "learn math and how to use it."
- barrenko 2y agoLearn math and discover poignantly all the situations where it is effectively useless.
- paulluuk 2y agoApplying math to a more practical betting situation, like poker, is a lot harder. You'd have to be able to calculate your exact odds of winning given only a small amount of information, without a calculator and without it taking so long that the other players notice, and then also factor in the odds that the other players are bluffing and the advantages that you might have from (not) bluffing.
- Etheryte 2y agoOr is it to choose appropriate betting amounts based on your parents?
- croes 2y agoIt’s easier to make money if you already habe money
- mannykannot 2y agoIt would really help if your parents know someone who can and will take the other side in this game.
- renewiltord 2y agoA popular view is that having wealthy parents gives one a great advantage. Another popular view is that working extraordinarily hard for money is a waste of one’s life even if one gets the money. But the two are only consistent if one believes that one’s own life is the optimization target. If I live a life of misery so that my children live a life of prosperity that would strike me as a phenomenal result. So another reading is “choose to give your children wealthy parents”.
- Rastonbury 2y agoPractically if you live life fearing a 26 red cards event something like e-15, you'd never leave the house and leave your money under your bed
- cbsks 2y agoMy 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.
- deleted 2y ago[deleted]
- boothby 2y agoNearest rounding does seem like a mistake here. Rounding down is quite safe: rather than lose it all, you end up with at least 2^26 pennies.
- xelxebar 2y agoAre 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.
- cbsks 2y agoI 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)
- xelxebar 2y agoFor anyone interested, here's a more pedagogical breakdown of the code: ⊢cards←52↑26⍴1 ⍝ We encode a red-black sequence in a bitfield 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ⊢rem←⌽⍳≢cards ⍝ Remaining card count after corresponding play 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ⊢sgn←¯1+2×cards ⍝ Contribution to re-black delta 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ¯1 ⊢del←+⍀sgn ⍝ Delta between count of red vs. black cards 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ⊢rat←0⍪¯1↓del÷rem ⍝ Our ratio is r-b delta as fraction of remaining cards after play 0 0.01960784314 0.04 0.0612244898 0.08333333333 0.1063829787 0.1304347826 0.1555555556 0.1818181818 0.2093023256 0.2380952381 0.2682926829 0.3 0.3333333333 0.3684210526 0.4054054054 0.4444444444 0.4857142857 0.5294117647 0.5757575758 0.625 0.6774193548 0.7333333333 0.7931034483 0.8571428571 0.9259259259 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ⊢pay←1-sgn×rat ⍝ Payout ratio: sgn×rat is negative on win and positive on loss 1 0.9803921569 0.96 0.9387755102 0.9166666667 0.8936170213 0.8695652174 0.8444444444 0.8181818182 0.7906976744 0.7619047619 0.7317073171 0.7 0.6666666667 0.6315789474 0.5945945946 0.5555555556 0.5142857143 0.4705882353 0.4242424242 0.375 0.3225806452 0.2666666667 0.2068965517 0.1428571429 0.07407407407 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ⊢tot←×⍀pay ⍝ Total stake is product scan over individual payout ratios 1 0.9803921569 0.9411764706 0.8835534214 0.8099239696 0.7237618452 0.6293581262 0.5314579733 0.4348292508 0.3438184774 0.2619569352 0.1916758062 0.1341730644 0.08944870957 0.05649392183 0.03359098055 0.01866165586 0.009597423014 0.00451643436 0.001916063062 0.0007185236481 0.000231781822 0.00006180848586 0.00001278796259 0.000001826851799 1.353223555E¯7 2.706447109E¯7 5.412894219E¯7 0.000001082578844 0.000002165157688 0.000004330315375 0.00000866063075 0.0000173212615 0.000034642523 0.000069285046 0.000138570092 0.000277140184 0.000554280368 0.001108560736 0.002217121472 0.004434242944 0.008868485888 0.01773697178 0.03547394355 0.0709478871 0.1418957742 0.2837915484 0.5675830968 1.135166194 2.270332387 4.540664775 9.081329549 ⊢min←⌊⌿rat ⍝ Minimum stake 1.353223554704754E¯7 ⊢start←⌈÷min ⍝ Minimum starting amount is ceil of inverse min stake 7389762 ⊢fin←⊃⌽tot ⍝ Final stake is last element of totals 9.081329549 ⌊fin×start ⍝ Gross winnings are floor of start times final stake ratio 67108864
- lawlessone 2y agoThis sounds similar to the Martingale system. https://en.wikipedia.org/wiki/Martingale_(betting_system) https://en.wikipedia.org/wiki/Martingale_(betting_system)
- deleted 2y ago[deleted]
- TeMPOraL 2y agoWhen Poland first introduced the capital gains tax in 2002, banks were quick to notice the tax law still generally required tax amounts to be rounded to nearest full złoty when accrued, so they started offering financial products with daily capitalization, which were effectively exempt from the new capital gains tax, as for most customers, the daily gain would be low enough that the tax on it always rounded down to zero. This only got corrected 10 years later. I find it fascinating that we could have a whole class of financial products hinging on something seemingly so trivial as a rounding strategy.
- deleted 2y ago[deleted]