TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Kelly Can't Fail

393 点作者 jmount5 个月前

24 条评论

pcthrowaway5 个月前
Note that you need to be able to infinitely divide your stake for this to work out for you all the time.<p>For example, if the deck has 26 red cards on top, you&#x27;d end up dwindling your initial $1.00 stake to 0.000000134 before riding it back up to 9.08
评论 #42467915 未加载
评论 #42467772 未加载
评论 #42480391 未加载
评论 #42468365 未加载
评论 #42468411 未加载
评论 #42471103 未加载
评论 #42470747 未加载
lordnacho5 个月前
Interesting side note on Kelly:<p>In probability theory, Proebsting&#x27;s paradox is an argument that appears to show that the Kelly criterion can lead to ruin. Although it can be resolved mathematically, it raises some interesting issues about the practical application of Kelly, especially in investing. It was named and first discussed by Edward O. Thorp in 2008.[1] The paradox was named for Todd Proebsting, its creator.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Proebsting%27s_paradox" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Proebsting%27s_paradox</a>
评论 #42469485 未加载
ilya_m5 个月前
Beautiful, thanks for sharing it!<p>I think the portfolio argument is an unnecessary detour though. There&#x27;s a two-line proof by induction.<p>1. The payoff in the base case of (0,1) or (1,0) is 2.<p>2. If we are at (r,b), r &gt;=b , have $X, and stake (r-b)&#x2F;(r+b) on red, the payoff if we draw red and win is X * (1+(r-b)&#x2F;(r+b)) * 2^(r+b-1) &#x2F; (r+b-1 choose r-1) = X * 2^(r+b) * r &#x2F; ((r+b) * (r+b-1 choose r-1)) = X * 2^(r+b) &#x2F; (r+b choose r).<p>Similarly, if we draw black and lose, the payoff is X * (1-(r-b)&#x2F;(r+b)) * 2^(r+b-1) &#x2F; (r+b-1 choose r) = X * 2^(r+b) * b &#x2F; ((r+b) * (r+b-1 choose r)) = X * 2^(r+b) &#x2F; (r+b choose r). QED
评论 #42475054 未加载
fancy_pantser5 个月前
A very similar card game played by deciding when to stop flipping cards from a deck where red is $1 and black is −$1 as described in Timothy Falcon’s quantitative-finance interview book (problem #14). Gwern describes it and also writes code to prove out an optimal stopping strategy: <a href="https:&#x2F;&#x2F;gwern.net&#x2F;problem-14" rel="nofollow">https:&#x2F;&#x2F;gwern.net&#x2F;problem-14</a>
评论 #42468277 未加载
评论 #42468005 未加载
PaulHoule5 个月前
When I was a teen I discovered that I could always guess more than half the cards right using card counting to determine what color is more common in the deck. I programmed my<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;TRS-80_Model_100" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;TRS-80_Model_100</a><p>to simulate it and it never failed. Recently I thought about it again and wrote a Python script that tried it 30 million times and... it never failed.<p>I&#x27;ve been thinking about what to do with it and came up with the options of (i) a prop bet and (ii) a magic trick, neither of which seemed that promising.<p>As a prop bet I can offer $1000 to somebody&#x27;s $10 which is not the route to great prop bet profits, also I worry that if I make a mistake or get cheated somehow I could be out a lot of money. (Now that I think of it maybe it is better if I re-organize it as a parlay bet)<p>As a magic trick it is just too slow paced. I developed a patter to the effect that &quot;Parapsychologists were never able to reliably demonstrate precognition with their fancy Zener cards, but I just developed a protocol where you can prove it every time!&quot; but came to the conclusion that it was not entertaining enough. It takes a while to go through a deck which doesn&#x27;t seem like a miracle, you will have to do it 7 times in a row to exclude the null hypothesis at p=0.01. Maybe somebody with more showmanship could do it but I gave up.
评论 #42473121 未加载
评论 #42480295 未加载
JohnMakin5 个月前
Kelly criterion is one of my favorite game theory concepts that is used heavily in bankroll management of professional gamblers, particularly poker players. It is a good way to help someone understand how you can manage your finances and stakes in a way that allows you to climb steadily forward without risking too much or any ruin, but is frequently misapplied in that space. The problem is kelly deals with binary results, and often situations in which this is applied where the results are not binary (a criteria for applying this) you can see skewed results that look almost right but not quite so, depending on how you view the math
评论 #42467902 未加载
评论 #42479441 未加载
评论 #42467965 未加载
评论 #42468559 未加载
barbegal5 个月前
It would have been a better demo if reduced to more manageable numbers e.g. a deck of 2 black and 2 red cards.<p>Turn 1 r = b so no bet<p>Turn 2 bet 1&#x2F;3 on whichever card wasn&#x27;t revealed in turn 1.<p>Turn 3 either you were wrong on turn 2 and you now have 2&#x2F;3 of your stake but you know the colour of the next two cards so you can double your stake each time to end up with 4&#x2F;3 after turn 3 or you were right and you have 4&#x2F;3 of your stake but have one of each red or black left so you don&#x27;t bet this turn.<p>Turn 4 you know the colour of the final card so you double your money to 8&#x2F;3 of your original stake.<p>And then the exercise to the reader is to prove optimality (which is fairly straightforward but I don&#x27;t believe there is a short proof)
评论 #42467429 未加载
评论 #42467312 未加载
评论 #42467997 未加载
andrewprock5 个月前
In practice, there are a number of factors which make using Kelly more difficult than in toy examples.<p>What is your bankroll? Cash on hand? Total net worth? Liquid net work? Future earned income?<p>Depending on the size of your bankroll, a number of factors come in to play. For example, if your bankroll is $100 and you lose it all it&#x27;s typically not a big deal. If you have a $1 million bankroll, then you are likely more adverse to risking it.<p>What is the expected value? Is it known? Is it stationary? Is the game honest?<p>Depending on the statistical profile of your expected value, you are going to have to make significant adjustments to how you approach bet sizing. In domains where you can only estimate your EV, and which are rife with cheats (e.g. poker), you need to size your wagers under significant uncertainty.<p>What bet sizes are available?<p>In practice, you won&#x27;t have a continuous range of bet sizes you can make. You will typically have discrete bet sizes within a fixed range, say $5-$500 in increments of $5 or $25. If your bankroll falls to low you will be shut out of the game. If your bankroll gets too high, you will no longer be able to maximize your returns.<p>At the end of the day, professional gamblers are often wagering at half-kelly, or even at quarter-kelly, due in large part to all these complexities and others.
评论 #42468913 未加载
hawkjo5 个月前
Very cool to see no variance in the outcome. But that also makes it feel like there should be a strategy with better expected return due to the unique problem structure. Do we know if the Kelly strategy is optimal here?
评论 #42468243 未加载
评论 #42467239 未加载
评论 #42467134 未加载
评论 #42469751 未加载
评论 #42468284 未加载
评论 #42467299 未加载
amluto5 个月前
&gt; The problem and solution appear to come from Thomas Cover.<p>I don’t recall this specific example, but I learned about the Kelly criterion in a class that Thomas Cover taught. He was one of my favorite teachers, and any discussion with him was guaranteed to be interesting and worthwhile. RIP.
评论 #42479652 未加载
raydiak5 个月前
As a guy named Kelly, I appreciate the vote of confidence!
评论 #42468011 未加载
Vecr5 个月前
Checks out with multiple RNG seeds.<p>It shouldn&#x27;t be a problem because the RNG is advanced each run. Might save someone a check though.
评论 #42467079 未加载
lupire5 个月前
Intuition for the bet size:<p>When the deck has d cards left, it is sensible to make d bets of 1&#x2F;d your stack, where each bet is that one specific card is next. If there are r reds and b=r+e blues, r of these bets simply cancel out r other bets, leaving e (times 1&#x2F;d) remaining to be a nontrivial bet.
im3w1l5 个月前
This article uses <i>stake</i> to mean <i>bankroll</i>, but usually it denotes <i>bet size</i>.
malisper5 个月前
I need to do some Math, but I wonder if there&#x27;s a better strategy than Kelly betting. An assumption made for Kelly betting is the bets are independent of each other. That&#x27;s not the case in the problem given.<p>After making a bet, you gain information about the contents of the rest of the deck of cards. I could see it being possible to do better by pricing in that information into your bet.
评论 #42467912 未加载
评论 #42469416 未加载
gcanyon5 个月前
I guess it&#x27;s kind of intuitive that if you are playing an exhaustive game (all 52 cards) that the optimal solution would not only be optimal but deterministically so. But I wonder if that idea just feels good and isn&#x27;t true. Is it false? Anyone have a counter-example?
bilater5 个月前
I created a simple tool to play with the optimal bet size on v0. Interesting.<p><a href="https:&#x2F;&#x2F;v0.dev&#x2F;chat&#x2F;1u6efMupysC?b=b_sxkDz7R6crr&amp;p=0" rel="nofollow">https:&#x2F;&#x2F;v0.dev&#x2F;chat&#x2F;1u6efMupysC?b=b_sxkDz7R6crr&amp;p=0</a>
siavosh5 个月前
Can anyone comment on the universal portfolio article linked in the conclusion? Asking for a friend.
评论 #42467465 未加载
bell-cot5 个月前
Interesting as a mathematical puzzle - but note that it&#x27;s difficult to find cooperative, solvent counter-parties for &quot;I can&#x27;t lose&quot; betting games.
dado32125 个月前
Very cool writeup, would’ve benefited from some LaTeX formatting.
评论 #42466958 未加载
评论 #42466926 未加载
lupire5 个月前
Corollaries, by considering different deck shufflings, such as perfectly interleaved as perfectly separated:<p><pre><code> 9.08 ~ 52&#x2F;52 × 52&#x2F;51 × 50&#x2F;50 ÷ 50&#x2F;49 × ... 2&#x2F;2 × 2&#x2F;1 = 52&#x2F;51 × 50&#x2F;49 × ... × 2&#x2F;1 = 2^52 × 26!² &#x2F; 52! = (52&#x2F;52 × 50&#x2F;51 × ... × 2&#x2F;27) × (52&#x2F;26 × 50&#x2F;25 × ... × 2&#x2F;1) </code></pre> and these equalities can also be directly verified algebraically<p>This also points to a non-&quot;many worlds&quot;&#x2F;portfolio version of the prod of zero-variance.<p>Every bet is e&#x2F;d, where e is current edge and d is current deck size. So every outcome multiplies the stack by (d + e × (-1)^i)&#x2F;d, where is ±1, depending on win or lose.<p>Note that the product of all the values of d is constant, so we can ignore the denominator.<p>Since we know (from the OP proof) that the product of these numbers is constant for all shuffles of the deck, we can split a shuffled deck anywhere such that both parts are balanced red=blue, and the total (multiplicative) return over each part of the deck is constant across all shuffling of that part of the deck. (There are at least two ways to prove this part!)<p>This is gives a further hint toward another fascinating fact: over any span of the deck between points where the deck is balanced, the numerators of the bet results double-cover all the even numbers between the starting and ending deck size.<p>To see why:<p>* A loss after a loss has a numerator (deck minus edge) of 2 less than the previous bet, as the deck size decreased by 1 and the edge has inccreased by 1.<p>* A win after a win also has a numerator (deck plus edge) of 2 less than the previous bet, as the deck size decreased by 1 and the edge has decreased by 1.<p>* A win after a loss, causes a big swing in the numerator, exactly back to the largest not yet double-covered numerator that started the streak that just ended. Then the new win streak continues making the second cover of even numerators, until... a loss after a win jumps the numerator back to continuing the sequence of decreasing even numberators, which will get their second cover later when the later wins come.<p>Since the deck is balanced, the number of wins always equals the number of losses, as long as we consider the 0 wager on a balanced subdeck to be a loss, since it increases the edge like non-degenerate losses do.<p>(When the deck is balanced, edge is 0, so the return of no-bet is same as a win is same as a loss)<p>You can visualize the numerator changes like so: a crane is driving from 52 to 0. Its arm is pointing either forward or backward, and there is a counterweight of the same length pointing in the opposite direction. At each step, the crane arm is either pointing toward 0 and stretches another step toward 0, or points backward to 52 and shrinks (toward 0 milestone and toward 0 arm length), or it swings to the other direction. Whenever the crane stretches toward 0, the counterweight stretches backward, its end not moving relative to the ground.<p>Because the deck is balanced at start and empty deck is balanced, the crane starts and ends with a 0-stretch arm. The front side is either the frame arm stepping 2 steps forward at a time relative to the ground, or holding still while the backside crane arm shrinks closer, and the crane arm occasionally flips back and forth pointing forward or ackward. And vice versa for the counterweight.<p>Over the course of the drive, the crane arm end reaches every even milestone once pointing forward and once again pointing backward.
ed-2095 个月前
why use a static seed on the random generator and could that be making this appear more interesting than it might otherwise?
评论 #42467828 未加载
moonlion_eth5 个月前
I was like &quot;oooh fun a card game&quot; then was like &quot;oh shit I&#x27;m too dumb for this math&quot;
评论 #42468239 未加载
tooblies5 个月前
It&#x27;s really disappointing that the code examples aren&#x27;t given in PyGyat.