News for hackers. Stuff that matters.
Re:The Infamous Coin Toss by jstanley on Wednesday August 02, 2023 @09:50PM (#36980389)
I think the part about the misalignment between the individual and the collective is basically wrong.

In the given game, the collective loses money just as the individual does. The collective wealth is the summation of the individuals' wealths, and both the collective and individual wealths drop over time. Write a simulation and try it if you don't believe me. I did, because I couldn't work out how the collective wealth could grow while the individual wealths drop, and the answer is that it does not.

The only way it looks like the collective makes a gain is if you try to say that x_i(t) = x_i(t-1)*1.05, but that's a simplification that doesn't hold in either the individual or the collective case.

But if you forget the part about the supposed misalignment between individual and collective, then the idea that the expected value of 1 iteration can be positive while the expected value of repeated iteration can be negative is very fascinating!

Re:The Infamous Coin Toss by ActivePattern on Wednesday August 02, 2023 @10:17PM (#36980560)
No, your expected value is indeed positive over repeated iterations: (1.05^i)*w, where i is the number of iterations and w is the starting wealth.

The intuition for why this happens is that the losses of the majority are made up by the big gains of a minority. You can even see that after two iterations:

Case 1: two heads -- 225% wealth Case 2: heads, tails -- 90% wealth Case 3: tails, heads -- 90% wealth Case 4: two tails -- 36% wealth

So, most people are losing money but a single lucky guy makes enough money that the expected value is still positive.

If you run a simulation with a low sample size, you might not see this effect because the "lucky guy" case is rare (and gets more rare with more iterations).

Re:The Infamous Coin Toss by petermcneeley on Wednesday August 02, 2023 @10:20PM (#36980578)
Note a single lucky guy is not enough. P of N heads is (1/2)^N but payout is (1.5)^N for this single lucky guy.

(The question can be reformulated such that this could be the case.)

Re:The Infamous Coin Toss by mizzao on Wednesday August 02, 2023 @10:56PM (#36980827)
Mmm, seems similar to the game of venture capital!
Re:The Infamous Coin Toss by jstanley on Thursday August 03, 2023 @03:41AM (#36982582)
Wow, great point! I had ran my simulation several times to check that it was reasonably stable and it gave me less than $1 average wealth each time, so I thought that was that. But just now I re-ran it with a much larger population and indeed the average wealth grows now instead of shrinking. Sadly I can't edit my comment above any more, but:

> that the expected value of 1 iteration can be positive while the expected value of repeated iteration can be negative is very fascinating!

is indeed untrue. Thanks!

Re:The Infamous Coin Toss by rcxdude on Thursday August 03, 2023 @06:41AM (#36983935)
Yeah, which implies for any finite N eventually the average will collapse, once the lucky guy's luck runs out.
Re:The Infamous Coin Toss by D_Alex on Wednesday August 02, 2023 @10:35PM (#36980709)
I disagree, and furthermore I think the entire article is basically wrong - in a way. Specifically, the expected average wealth of both the collective and an individual will increase every round. However the median wealth will fall.

The reason for this is that the very rare outliers will accumulate truly enormous wealth, while the rest of the players will never lose more than they start off with. You can see this in the first graph after say 250 rounds - the richest player has around 10,000x his initial wealth, even as the other 1000(or so) have very little - so on average they have 10x what they started with. And the reason no one is rich after 1000 rounds is simply that there were not enough samples. If there were say a billion samples, you might expect one to come in with say a trillion times its starting wealth, overcompensating for the other 999,999,999 losers - on average.

Re:The Infamous Coin Toss by selcuka on Wednesday August 02, 2023 @10:01PM (#36980457)
> In the given game, the collective loses money just as the individual does.

No, they don't. If 100 people starts with $100 (i.e. a total wealth of $10,000), and half of them win as expected, the total wealth at the end of first round will be $10,500.

Granted it won't be a 5% increase for the next round, and eventually collective wealth will also approach 0, but that's the point. 100 people playing 1 round is not the same as 1 person playing 100 rounds.

Re:The Infamous Coin Toss by jstanley on Wednesday August 02, 2023 @10:03PM (#36980468)
Yeah, that's after 1 round. Both the individuals and the collective expect to gain if they only play 1 round.

The interesting part is that they expect to lose money over time even though they expect to gain money if they only play once. But that holds for both the individuals and the collective.

A less confusing game with the same mechanism is "flip a coin, if it's heads I give you 1000x your initial investment, if it's tails I wipe you out completely" - you expect to make a massive gain on any given turn, but if you play enough rounds you'll eventually lose everything.

Re:The Infamous Coin Toss by pclmulqdq on Wednesday August 02, 2023 @10:30PM (#36980667)
The collective also gains in round 2, and each subsequent round. From the intuition that you have about the first round, treat each group with the same amount of money separately, and you will see that money grows in every round. Example:

Round 1: 100x$100 (total $10000) -> 50x$60 + 50x$150 (total $10500)

Gain of $500 total

Round 2: 50x$60 ($3000) -> 25x$90 + 25x$36 ($3150)

50x$150 ($7500) -> 25x$225 + 25x$90 ($7875)

Gain of $150+$375=$575.

Round 3: 25x$36 ($900) -> half $54 and half $21.60 ($945 total) And so on.

Each round, the collective wealth goes up 5%, no matter how many rounds you run.

Re:The Infamous Coin Toss by selcuka on Thursday August 03, 2023 @12:14AM (#36981284)
No, it will approach zero like the individual one.

Think of it this way: If everyone's individual wealth approaches zero, why would the total go up?

Just run the following simulation in a python REPL:

    import random
    
    POPULATION = 100
    INITIAL_MONEY = 1000
    ROUNDS = 10000
    
    wallets = [INITIAL_MONEY for _ in range(POPULATION)]
    
    for iteration in range(ROUNDS):
        for person in range(POPULATION):
            if random.random() > 0.5:
                wallets[person] = wallets[person] * 1.5
            else:
                wallets[person] = wallets[person] * 0.6
        print(f"{sum(wallets)=}")
Re:The Infamous Coin Toss by jstanley on Thursday August 03, 2023 @03:45AM (#36982620)
Try it with a larger population and a smaller number of rounds. It turns out the mean gain actually is positive, but the median gain is negative.
Re:The Infamous Coin Toss by nhinck on Thursday August 03, 2023 @05:30AM (#36983423)
The claim was: "Each round, the collective wealth goes up 5%, no matter how many rounds you run. "

And this isn't true.

Re:The Infamous Coin Toss by kgwgk on Thursday August 03, 2023 @05:49AM (#36983572)
Do you mean that it's not true that "in one round, the collective wealth goes up 5%"?

I could agree with that.

(However, if you add "in expectation" it will be true for one round and for each round no matter how many rounds you run.)

Re:The Infamous Coin Toss by nhinck on Thursday August 03, 2023 @05:55AM (#36983625)
For a finite population and starting wealth, the collective wealth will tend to 0 given enough rounds.
Re:The Infamous Coin Toss by kgwgk on Thursday August 03, 2023 @06:00AM (#36983663)
So you say that it's false that "in one round, the collective wealth goes up 5%", right?

However you agree that it's true that "in one round, the collective wealth goes up 5% in expectation", right?

(I agree that "for a finite population and starting wealth, the collective wealth will tend to 0 given enough rounds ALMOST SURELY". The last bit is important though. Otherwise it's like saying that if you flip a coin enough times you will get heads - which is not exactly true.)

Re:The Infamous Coin Toss by nhinck on Thursday August 03, 2023 @06:11AM (#36983741)
Yeah I would say "in one round, the collective wealth goes up 5% in expectation" but "for a finite population and starting wealth, the collective wealth will tend to 0 given enough rounds" not almost, but absolutely.
Re:The Infamous Coin Toss by kgwgk on Thursday August 03, 2023 @06:18AM (#36983779)
Maybe you're not aware but almost surely is a technical term - which makes the statement correct.

Just like you cannot be absolutely certain to get heads if you flip a coin enough times even though it will happen almost surely.

Re:The Infamous Coin Toss by kybernetikos on Thursday August 03, 2023 @06:25AM (#36983825)
I think that the effect is from the fact that you're sampling from all possible outcome history paths. To realise the positive expected value, your sample needs to include some of the increasingly rare possibilities where you gain enormously. This means that if your population is large compared to the number of branches (2^rounds) then you probably do sample that and the overall gain is positive. If your number of branches is large compared to your population, you probably don't sample the branches where you make lots of money, and your overall gain is negative.
Re:The Infamous Coin Toss by pclmulqdq on Thursday August 03, 2023 @12:19PM (#36987926)
The total goes up because not everyone loses wealth at each round. Wealth just gets more concentrated in the hands of the people who win the most.

Also, "5% per round" assumes an infinite number of people. If you run this with 100 people, by the 3rd round, the expected group sizes are non-integers, so you will diverge from the "infinite people" case.

Re:The Infamous Coin Toss by selcuka on Wednesday August 02, 2023 @10:05PM (#36980479)
Ah, I get your point now. True, there is no need to consider multiple people, the expectation is the same for a single person, too.

The collective wealth calculation just makes it easier to visualise.

Re:The Infamous Coin Toss by didgeoridoo on Wednesday August 02, 2023 @10:00PM (#36980448)
Take a simplified system: two players, both with $10. Flip a coin. Let’s say one comes up heads, the other tails. Total is now $15 + $6 = $21. A $1 increase for the whole system.

I agree the distinction is not at all between individual and collective, but rather between one-off and repeated games.

Re:The Infamous Coin Toss by petermcneeley on Wednesday August 02, 2023 @10:13PM (#36980534)
This simulation is the collective wealth over N players for M times. It is increasing. https://coin-n.streamlit.app/?utm_medium=oembed
Re:The Infamous Coin Toss by selcuka on Thursday August 03, 2023 @12:21AM (#36981320)
If every individual in a population is definitely doomed to lose all their wealth, how could the collective wealth increase?
Re:The Infamous Coin Toss by petermcneeley on Thursday August 03, 2023 @12:35AM (#36981405)
For infinite rounds in a finite population yes they will all lose their wealth. But if the population >> rounds this is not true.
Re:The Infamous Coin Toss by selcuka on Thursday August 03, 2023 @12:41AM (#36981450)
I don't think population >> rounds is a general rule. It only works (most of the time) for this case because +50% and -40% are relatively close to each other.

If you change the rules to, say, +100% and -90%, they lose even when population > 20 * rounds. I'm sure there is a statistical formula that can be used to estimate the optimal number of rounds.

Re:The Infamous Coin Toss by dongobread on Wednesday August 02, 2023 @11:07PM (#36980889)
I tried this and collective wealth does increase: https://imgur.com/a/Zc2aApj

The median person does get poorer over time though, a small percent get extrmeely wealthy: https://imgur.com/a/v2AVyrv https://imgur.com/a/7pPfKk6

Re:The Infamous Coin Toss by jstanley on Thursday August 03, 2023 @03:47AM (#36982635)
Thanks, it turns out to really matter how big the population is, otherwise you aren't likely to have enough lucky members to bring the mean up.
Re:The Infamous Coin Toss by civilized on Wednesday August 02, 2023 @11:11PM (#36980911)
Any finite collective eventually loses almost surely, but the larger the collective, the longer it takes, and the greater the inequality in the meantime, before everyone loses. In the limit, an infinite collective exhibits the paradoxical behavior from the article: expected value goes up forever, but almost every individual eventually loses.

An ever smaller slice of huge winners is pulling up the average, but in any finite population this slice disappears in finite time. Only in an infinite population can it persist indefinitely.

All of this is fairly straightforward for a mature student of probability. If enough folks want, maybe I could write up the details to prove these things.