by nonameiguess · 5y ago · 0 comments
This happens to not show after only 100 trials just because some tiny number of people get really lucky and draw up the ensemble average, but if you keep going, somewhere between 200 and 500 trials, the ensemble average pretty quickly drops below the starting average wealth and stays there, asymptotically approaching 0.
People mistakenly think that if their investment made 50% and then lost 50% that they broken even, but they're actually down 25% (1.5*0.5=0.75). However, if you invest $100 and make 50%, then invest a second $100 and lose 50%, you do indeed break even.
When OP stated that the bet has a positive EV, it's for a flat $1 bet. Indeed, if you always bet $1 (or any fixed amount), it does have a positive return of $+0.05, and you should take the bet.
It's only when you change it from a $1 bet amount to an "entire bankroll" amount that you're looking at a geometric mean of 0.949 return per bet. That number is simply the geometric mean of the two possible returns, 1.5 and 0.6.
So the actual EV is sqrt(1.5*0.6)-1.00 = $-0.051 per bet (normalized to $1.00).
I don't understand the point this article is trying to make about anything else. The entire effect here is explained either by misstating the problem or by using the wrong type of mean for the EV calculation.
The idea that some lucky people will make money while the rest lose is explained by simple luck. Run the simulation longer and they will all lose out to the law of large numbers.
The median outcome is indeed negative, for the reason you give. But the mean outcome is positive, because some players become exceedingly rich.
You can try it at home, here's some Julia which runs it over 1M people, each with 1K flips:
using Distributions
n = 1000
d = Binomial(n, 0.5)
to_wealth(heads) = 1.5^heads * 0.6^(n - heads)
rand(d, 1_000_000) .|> to_wealth |> mean
You can keep running that, it's above 1 almost all the time.To look at this another way — would you take the other side of the bet? Someone on average has to be making money, and the other side is clearly losing money.
import numpy as np
import pandas as pd
n_subjects = 100
n_trials = 1000
start = 10.0
win = 1.5
loss = 0.6
prob = 0.5
results = np.ones((n_trials, n_subjects)) * start
for trial in range(1, n_trials):
wins = np.random.binomial(1, prob, n_subjects) == 1
results[trial, wins] = results[trial - 1, wins] * win
results[trial, ~wins] = results[trial - 1, ~wins] * loss
ax = pd.DataFrame(results).plot(legend=False, figsize=(18,10), logy=True, linewidth=0.5)
ax.plot(results.mean(axis=1), color='red', lw=2, linestyle='--')
The mean always trends to 0 and every single player eventually loses. There are never any winners at all past around 500 trials or so. Not sure how you're getting a different result as I have never used Julia and can't tell what your code is doing (except apparently something different).Looking at the Julia code, I think what he is doing wrong is making all wins worth $.50 and all losses worth $.40, but the bet computes a win or loss based on your current wealth, not your starting wealth. His formula would work if you were always betting $1 no matter what your bankroll was, but that isn't what the actual post stipulates.
n_subjects = 1000
n_trials = 100
For a bet of $X, the expected value is: (1.5 * X) * 0.5 + (0.6 * X) * 0.5 => 1.05 * X. The ensemble average per round is positive (1.05) and over multiple rounds smoothly tends to infinity with the number of bets. (Definition here: https://en.wikipedia.org/wiki/Expected_value).
The time average for any specific person betting in this game is 0.95 * X (for the reasons you mention) and tends to zero with the number of bets.
So let's go through a few specifics of your comment:
> He actually picked bad numbers. That is a losing bet even on average.
The point of this article is that "on average" is trickier than people tend to assume. There are different ways of taking averages. If you do the expected value calculation and get a positive number, you might (as other comments have said explicitly) expect that a participant repeatedly engaging such a bet would have his wealth trend toward infinity. But, they are wrong (as shown in the article).
> This happens to not show after only 100 trials just because some tiny number of people get really lucky and draw up the ensemble average, but if you keep going, somewhere between 200 and 500 trials, the ensemble average pretty quickly drops below the starting average wealth and stays there, asymptotically approaching 0.
The ensemble average is positive and monotonically increases w/ the number of rounds of betting.
But I can also clearly see that never actually happens, and I do think I can explain it. The measure of people with any positive expected return at all after a large enough number of trials is so small that they eventually drop out of any actual simulation just because nobody ever gets that lucky, even though theoretically it is possible. You eventually reach a point after a large enough of trials (apparently about 500) where if anybody at all was actually hitting the 400+ heads out of 500 trials requires to still be above water, enough of them would be so fabulously wealthy that they'd draw up the entire average. But the probability of these trials ever happening is so low that we can run simulations for thousands of years and never see it happen, so what we see instead is nothing but common cases. Everyone after 500 trials is overwhelmingly within +/- 50 of 250 heads and 250 tails, and if you're in that range, you're a loser.
It also may be the case that the way these pseudorandom number generators work makes it completely impossible to ever see 400 heads out of 500 trials no matter how many simulations you run since they aren't actually random, but even if they were, practically speaking, I wouldn't be the least bit surprised if an any trial ever run of 500 consecutive fair coin tosses, nobody for as long as humans have existed has ever hit 400+ heads. If you try to analytically compute the probability and store it in a floating point number, it just rounds to 0 because we can't store a probability that low.
This becomes very large as the number of trials increases (likely approximately exponential)
There is one assymmetry at the zero point (assuming people can’t recover from bankruptcy by borrowing another dollar) but that’s easily fixed by adding a simple bet strategy e.g “bet at most 1/10 your bankroll on each bet”.
This is wrong. The bet as described has a positive EV and the time average for a single player tends to zero as the bet is repeated.
> There is one assymmetry at the zero point (assuming people can’t recover from bankruptcy by borrowing another dollar) ...
The result is not due to zero being an absorbing value. In the setup you can go arbitrarily small and come back without issue. The result is the same.
This is a bet of 0.4.
With 2.0 odds the payout would be 0.8, and here it is 0.9? That looks like odds over 2.0 for 50/50 chance.
So the individual bet is positive EV but the EV of an infinite sequence of such bets is still zero and that’s without the zero limit? There is just nothing in the article that begins to explain how that works. Maybe the video is better
After 2 tosses, the probable outcomes are 25% 2.25, 50% .9, and 25% .36, giving an expected value of 1.1025 interestingly enough. Overall a 75% chance of losing money.