102 comments

[ 1.3 ms ] story [ 163 ms ] thread
> Wealth in this scenario is non-ergodic, since the wealth in the future depends on the wealth of the past (path dependence).

Perhaps we should find a tax rule which makes wealth ergodic.

That's a straightforward proposal. Making wealth non-path dependent means seizing and redistributing it periodically or continuously. That would tend toward economic equality, but since it has the side effect of suppressing the incentive to create wealth, it's an equality of poverty.
I mean, all you'd need is a damping factor via a wealth tax, above some threshold that's still motivating enough. I doubt anyone would call everyone having 1 million dollars "equality of poverty", and you can make it so that if you are really good at business, you can outrun the wealth tax up to say 100 million $. Oh, and 100% inheritance tax on estates above 1 million, with a buyback right for familiy businesses that allows you to buy back the business at it's current market value over X years (so you actually benefit from inflation).

IFF implemented globally, would you truly argue this disincentivizes creation of wealth? Add inflation and exchange rate adjustments and I honestly don't buy that argument anymore.

NOW, will you have selfish actors trying to game the system and evade these taxes through all means possible? Yes, but that's why I think anyone who supports the protection of private property through state violence and democracy at the same time needs to do some heavy gymnastics to justify tax evasion and dynasty enabling tax policies (i.e., anything that doesn't at least do the 100% inheritance/gift tax bit). And of course you'd need to implement it either globally or at least in economic powerhouse blocks like EU+US+Canada.

I wonder if that’s not necessarily a negative thing. Much of the beauty of the open-source ecosystem comes from its (typical but not guaranteed) lack of explicit wealth incentives. It feels to me like the idea that wealth redistribution necessitates widespread poverty is almost purely speculative, though I’m happy to be corrected.
We could also say that much of the beauty of the open-source ecosystem comes from top 1% earners (software developers) having cushy jobs and some free time to invest in common good.
I think open source is an example of how any set of incentives cuts both ways, it is just prioritizing different things. Incentives are offsetting; things like wealth incentives are often valuable to encourage people to do important things they otherwise would have no incentivize to do in open source.

For example, a well-known issue with open source data infrastructure is that it often has much lower performance and efficiency than equivalent proprietary software. There are many dis-incentives in the open source ecosystem to producing software that is highly performant and efficient, not the least of which is development complexity and sophistication level required to contribute. Open source developers do not pay the operational cost of wasteful data infrastructure but they do pay the cost of their time, and prioritize accordingly. Proprietary data infrastructure is explicitly motivated by wealth incentives to be highly efficient, which is why companies invest in it even though open source equivalents exists.

The relative wastefulness of open source in terms of computing resources is increasingly perceived as bad for the environment, so it isn't just a money motivation. Incentives are a powerful thing and it is evident that open source lacks incentives to produce some important outcomes.

This sounds like a just-so story about incentives and open-source software, and seems to ignore some of the significant motivations actually at play, as well as some fairly glaringly obvious historical examples. What are the specific examples you have in mind here?
The idea that our society must necessarily be based around wealth is what we need to move past. Open source and free software have demonstrated that wealth is not the only incentive that can drive progress and innovation. In fact, the incentive of wealth accumulation is frequently an obstacle to progress. We can make all manner of technical advances in medicine, food production, or energy generation, but while the primary determinant in decision making is whether an activity is profitable, that progress can be effectively nullified. If it's more profitable to withhold medical care, or destroy food, or burn coal, or exploit workers, or sell customer data, or compromise safety, what should we do? Do we need complex wealth redistribution regimes or could we perhaps rise above this fundamentally flawed and increasingly dangerous incentive of wealth?
Not necessarily, society could decide what a value of “I win“ income is.

Maybe it’s $1 billion, after which you hit a ceiling function or wealth becomes ergodic, and you earn a badge that says “you won” (in the context of this society).

If you earn such a badge, society would call on you for advise (if you are a non-inheritor).

I love this idea of giving people a badge or even better a sticker if they hit some particular level above which we take their excess. It's hilarious.
The value should be low enough as to make capture of the political system at the national level by small groups of wealthy individuals impractical.
> That's a straightforward proposal. Making wealth non-path dependent means seizing and redistributing it periodically or continuously. That would tend toward economic equality, but since it has the side effect of suppressing the incentive to create wealth, it's an equality of poverty.

Did you consider the case where A works twice as hard as B and ends up with twice the wealth of B?

That would mean banning inheritance and standardizing child-rearing or at expenses.

Yes, the latter is a leftist boogieman. But the non-ergodicity of wealth is really scary! We got along fine pre agriculture (little wealth differences), and then with wars and famines to reset, but surely we banning private school is better than more of those?!

Keep in mind non-ergodicity is also good. Socialized infrastructure like public transit for example:

- The risk / lack of extractive fees to make profitability makes it impossible to do well privately

- The benefits of pooled risk apply to even the richest people, who might with conventional econ think they are stuck at best with a noblesse oblige.

Agricultural, colonialism, and industrialization are massive qualitative shifts that non-ergodic models also do better justice.

ergodic example: Rolling a die. If you roll a die 1e6 times in a row, you will get each number approximately 1e6/6 times. If you roll 1e6 dies once all at the same time, you will get each number approximately 1e6/6 times. Same thing basically.

non-ergodic example: Russian roulette. If you play russian roulette 1e6 times in a row, you will always be dead at the end. If 1e6 people play Russian roulette at the same time, 1e6*(5/6) people will be alive at the end, and only 1e6/6 people will be dead.

Thank you! That's... well, beautiful isn't the right word, given nature of example... But I was hoping to find a simple non-ergodic example.

The situation the article explores was interesting, but made the jump to something mathematically complex before I sunk my teeth into the fundamental bit.

As I understand it, the difference is basically whether it is possible to end up in a situation where you are out of the game going forward. E.g. with repeated bets, you eventually hit zero money, and then you are stuck at zero forever.
There could also be attractor states that reduce the risk. For example in this case (if the numbers are taken to be such that the EV is positive) then you can also end up with a lucky player getting rich. The chance of that player going bust goes down much lower than the chance for a new player starting with $1. So while individual players may tend to go bust reliably, the total pool of wealth can still grow beyond any set upper boundary. Over time each player tends to get fabulously rich or go bust, so the game is mostly one of whether an initial run of luck gets you out of the danger zone before running into zero.

If you added some effects on what kind of gambles are available to players at different levels, you can create several different attractor states.

Ergodicity is a nice property of models like molecules of gas bouncing around a room, which means that statistical mechanics is practical. If one percent of the molecules tended to end up with all the kinetic energy, while the other molecules gradually one by one reached a complete standstill, then statistical mechanics wouldn't work.

Since the very simple process shown in the article doesn't have this property, it means some familiar statistical tools can't be used naively with these models, or to extrapolate a little bit, to any model of any human activity that tends to these kinds of capturing, fixed-point, attractor outcomes.

Update: the first paragraph above was not quite right for the system described here. It's more about the EV calculation involving ever growing outcomes multiplied by ever shrinking probabilites, with the mean still growing without bound, while in any cohort of practical size you'll never see any of these outcomes. So it's not necessary for any player to go to zero to see the behavior. Of course there are also martingale systems that work the other way and they are also non-ergodic.

So in fact regardless of the initial run of luck, every player still goes to zero with probability one. The youtube video that another commenter linked to actually explains the 40% and 50% example much better.

Brilliant, this should be the top comment. A simple and powerfully intuitive example.

Made it click straight away for me.

This example assumes you only have $1 to bet, and if you lose it, you’re out of the game. I wonder what happens to the simulated outcome if you can keep betting, even if you lose.
Not quite.

> Everyone starts with $1, gets 50% profit if they win, and pays 40% of their bet if they lose.

From the wealth-over-time graph, it looks like the bet is sized such that it's always 100% of what you have (per some trajectories going as small as 10^-7).

My read is that while each individual bet looks good in isolation, the fact is that one win and one loss puts you in the red overall -- when dealing with this iterated experiment you want to look not at E[X] = 0.05, but at E[log(X)] = -0.05 to get a sense for how your assets evolve each round.

For some intuition: if you win once and lose once, your net result is 1.5 * 0.6 = 0.9, so you've lost 10% of your starting money.

To expand on this further, and to plug the Kelly Criterion which the author mentions having written a former blog post on:

Suppose instead of betting all your money every round, you instead decide to bet 10 cents each time. Now, instead of being essentially guaranteed long-term ruin, you can and most likely will be able to continue making money indefinitely. (In fact, your chance of ever dipping below, say, $0.50 is finite even when extending your rounds played arbitrarily.)

The Kelly Criterion for this scenario actually dictates that you should bet 25% of your money each round. Using this betting strategy, somewhere around 70% of people end up making money off this game when run for 100 rounds (1% end up ending up with a respectable $25 or more, while about as many end up with <$0.15). You even have an opportunity for redemption -- when we drag out the horizon to 5000 rounds played, somewhere around 90% of individuals become billionaires, even as 30% of people were behind after 100 rounds (so 2/3 of those redeemed themselves).

On the other hand, with the all-or-nothing solution outlined in the article, about 13% of the population coming out ahead (around 1% of the population gets really rich, ending up with >$200, while more than half end up with less than a penny). Meanwhile, the odds get worse as the game goes on, as at just 500 rounds, >80% of players have been reduced to less than a penny.

That's a long-winded way of saying that the amount you bet is really important.

If the loss amount is adjusted to 33%, then on average over time individuals will make a net profit. A 50% win will more than compensate for a 33% loss (0.67 * 1.5 = 1.005).
Yes. Given 1000 players and 1000 turns, if each player starts with $100 in capital under your chosen parameters:

    import random

    l = 0.33
    w = 0.5
    c = 100
    m = 1000
    p = {k: c for k in range(m)}
    n = 1000

    for k in range(n):
        for j in range(m):
     if random.choice([0,1]):
         p[j] += (w * p[j])
     else:
         p[j] -= (l * p[j])

    print(sum([p[k] for k in p]) / len(p))

    print(sum(1 for k in p if p[k] > c) / len(p))

I wrote this up quickly so there might be an error, but under your stated parameters the average wealth increases over time and most people end up wealthier than they started. Specifically, the number of people who will be wealthier at the end seems to converge to somewhere between 57-60%.

NB: This assumes you bet your entire capital each round instead of a constant bet size. In the presence of non-ergodicity you wouldn't want to do this, but that just means it's an even stronger result that most people come out ahead.

In fact 33% happens to be the maximum loss percentage this system (win rate, win percentage, bet = total capital) can tolerate while still exhibiting higher wealth for most players over time :)

The greater the edge, the more you can bet on one occurrence. Easier to understand if you look at binary events: double your bet with a win, lose your bet with a loss.
This one took me way too long to get intuition for and I don't think OP's explanation would have helped me grok it. I wonder if it's like monads, in that the intuition is really simple, but it's a very unique concept; so unusual that the intuition is hard to convey to the uninitiated. But the intuition really is simple, so the initiated feel compelled to try to convey how simple it is.

My intuition for it is like a particular kind of spread out mixing. Imagine a giant bowl with a bunch of crazy high powered pinball bumpers [0] at the bottom, randomly jostling the pinballs around, sometimes kicking them out where they started, but they always come back eventually.

If you roll a ball into it, it doesn't matter where you start. It'll get lost in the mix eventually. (it "mixes" sufficiently).

And no matter where you start, those high powered bumpers will eventually happen to kick a pinball all the way out there again, given long enough. (The "mixing" spreads things out sufficiently and occasionally sends things all the way to any point in the bowl).

By contrast, a bowl that's just high friction, where everything ends up stopped at the bottom wouldn't work, even though it makes it not matter where you started, because it doesn't "spread." It just sinks things to the same spot. An inverted bowl/a dome wouldn't work because starting on opposite sides means you'll just roll away from each other and never come together (no "mixing" at all). A bowl without bumpers would have you coming back where you started, but not "mixing" around to all the other spots.

You need both elements. It has to not matter where you started specifically by getting back to where anyone started.

Rereading my comment now, it really does come off as "a monad is like a burrito," doesn't it. But screw it, I'll hit post and maybe it helps somebody.

[0] This kind of bumper: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQa3gvh...

I found this helpful. Not because it has helped me to grok ergodicity yet, but because it's another foothold on my way to climb the mountain. At some point it will click, and your pinball-bowl mixer will help, I'm sure.

I'm also happy for the link to "a monad is like a burrito"!

Here’s the essence of non-ergodicity: the “typical” result (technically the mode, but practically the median is acceptable) is very different from the “mean” result. The language of “time” -vs- “ensemble” averages is simply about whether to include only the “typical” possibilities or to also include corner cases which have extremely low probability but extremely high payoffs. The technical point is that unless you get to play the game (“sample the process”) absurdly many times (comparable to the total number of possibilities), you will never access the corner cases, and so the averaging over the “typical” results corresponds better to reality. The “mixing” idea means that if you run the process “long enough” then there won’t be any corner cases — the extreme possibilities will thoroughly mix with the typical possibilities, so both kinds of averaging will lead to the same (correct) answer.

If you grok this, everything else is technical detail and window dressing.

The thrust of the point is that while the wealth of a group will rise on average when playing a game with positive expected value, individuals with significant upfront losses will lose over time if the reward percentage is too close to the loss percentage. Because your future wins depend on your present capital, which in turn depends on your past wins. This becomes an optimization problem!

This does not mean that you shouldn't play a game with positive expected value. Expected value is still the salient framework with which you should judge risk. It just means that the size of your bet needs to be considered in conjunction with your total capital, not just whether any individual bet is more likely to win than lose.

The author states this seems to not be well known in finance, but in point of fact this is very well known in both literature and practice. A trading strategy with positive expected value has additional considerations before you execute on it, including your total capital and liquidity.

Well, not just upfront losses, since it's commutative. You break even if you have 10 wins for every 9 losses, which will happen to very few people with enough flips – but the amount you win if you have more victories than that threshold is quite large, while you can only lose $1 at most.
Unless I'm very mistaken the example they give is not a dynamic system, so asking whether it's ergodic doesn't make sense. For it to be a dynamic system it would need to have an invariant measure, which I can't even begin to figure out from their description.

The process of simply flipping coins, even a biased coin, does correspond to a dynamic system where the space is all infinite sequences of heads and tails, the invariant measure is the joint probability, and the operator is the left-shift (i.e. if you sample 1 series of coin flips and throw away the first result you still end up with a sample of the same distribution).

But this doesn't translate at all to their proposed scenario of starting everyone at 1 and letting the results diverge from there.

An you example I always liked: baggage fees at airlines. On average a $25 bag fee is the same. For 4 business travelers. For a family of four while the dollar amount is the same it effects the family much more.
I'm confused, what's that got to do with ergodicity?
Why isn't a dynamic system?

A given point has current wealth as it's level and moves randomly up and down in that level according to a process that's random.

https://en.wikipedia.org/wiki/Dynamical_system https://en.wikipedia.org/wiki/Random_dynamical_system

Well dynamical systems aren't usually random for a start.

I suppose you can make it fit the definition for the random dynamical system, though in that case the underlying dynamical system is ergodic.

A dynamic system is a system whose evolution doesn’t simply depend on its input at time t, but also to its internal state. In this case the wealth at time t does not simply depend on the outcome of the coin toss, you also need to know the value of the wealth before the coin toss.
A dynamical system is typically 100% internal state. It's just

1. A state space X

2. An evolution map f: X -> X

3. A measure \mu on X, preserved by f (such that f_*\mu = \mu) and where \mu(X) = 1.

To represent a series of i.i.d. random variables you can typically just represent them as a sequence of values with a joint probability distribution as the invariant measure.

If you've got a space X of such sequence you can also add the current value to it to get IR x X, with a map f: (x,t) -> x * 1.5 if t[0] is heads & x * 0.6 otherwise. But you'll have to tell me it's invariant measure because I can't come up with one.

He actually picked bad numbers. That is a losing bet even on average. You can see that pretty easily by just assuming you get exactly the opposite result each time. 1.5 * 0.6 = 0.9, so no matter how you start, you're behind with an equal number of wins and losses. Naively, you might think "50% is more than 40%," but that isn't how percentages work. You need win and loss proportions with a geometric average of 1 for a breakeven expectation (percentages are multiplicative, not additive). In this case, 3/2 and 2/3 is what you'd need.

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.

It’s just a really weird way of expressing the bet. This bet either has a positive EV or a negative one and if it’s positive it’s going to tend to infinity when repeated.

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 bet either has a positive EV or a negative one and if it’s positive it’s going to tend to infinity when repeated.

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.

For a 50% chance you need odds of over 2.0 (regardless of bet size) to have positive EV.

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

If I just stay away from the 0 point (by betting a fraction of the bankroll) then regardless of sequence length the ensemble stats positive. I must simply not be understanding the rules of the simulation.

https://dotnetfiddle.net/5r4ARk

This is wrong and misses the point of the post.

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.

I did run this many times by adapting the OP's own code (and vectorizing it, which he asked someone to do). Here it is:

    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).
I think your n_subjects is too low. You need that to be high enough or you'll miss those low-probability winners that bring up the average.
I did it with more subjects and it doesn't make a difference. The only reason I reduced to 100 is because the plot is unreadable otherwise.

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.

You're so fixed to your conclusion that you're now reading code wrong.

If you don't trust the Julia code, try running with the same parameters in Python.

I don't understand why you think changing the number of participants changes the ensemble average. I just ran it with 1,000,000 participants and 1,000 trials and ended up with an ensemble average of $0.07 on the 1,000th trial, trending toward 0. The only difference is the simulation took longer. The curve looks exactly the same. The ensemble average trends upward until about 500 trials, then trends downward and keeps doing so forever.

My code is right up there and you can run it. You can even just run the OP's notebook that he provided but increase the number of trials. Change the "num_flips_per_sim" parameter he provides in cell 6 to anything over 500 and you will always get sum(count_lose_capital) == everyone.

Take the outside view here — 3-4 people have commented, all disagreeing with you. One of them has offered an explanation of why you're experiment is poorly designed, and I've given you code which produces a different result.

The appropriate response to that is introspection, not repetition.

(comment deleted)
No matter how many test subjects you use, if you run the experiment for a very long time, everyone goes bankrupt and will never recover.

More precisely there is a finite time after which no-one ever passes above $0.0000000000000001.

That is a mathematical theorem.

This doesn’t depend on the number of test subjects, and you can add as many zeroes as you want.

Therefore in the long run the mean outcome is 0.

Forgive me if I have misinterpreted what you are are trying to say.

Edit: I’ve just realized that I have indeed missed your point.

No matter for how long you run the experiment if you use enough subjects some of them will win an absurdly large amount of money and the sample mean will converge to the mean of the distribution (which grows exponentially with time).

It’s a mathematical theorem. (I would be curious to see a proof of your theorem, by the way.)

The mean converges exponentially to zero with time. It doesn’t grow exponentially. So the theorem you cited also goes in the same direction of my statement.
> The mean converges to zero with time. It doesn’t grow exponentially.

  t=0 mean(w) = 1
  t=1 mean(w) = 1/2*1.5 + 1/2*0.6 = 1.05
  t=2 mean(w) = 1/4*1.5*1.5 + 1/2*1.5*0.6 + 1/4*0.6*0.6 = 1.1025
  ....
  t   mean(w) = 1.05^t
Don’t you agree?
You’re right. I made a mistake - I thought you were trying to contradict the theorem I stated. I’ve just realized you were saying something orthogonal.

As for the proof of my theorem, By taking logarithms, the process becomes an additive random walk with negative drift (log 1.6 + log 0.5 < 0). This is well known to converge to negative infinity almost surely. After exponentiating to undo the logarithm, this is exactly the statement I made.

It does not matter how many test subjects there are ( as long as there’s finitely many) because, informally speaking , you can just wait for each of them to become irrevocably bankrupt in turn.

I think we agree then:

- for a fixed sample size we can find a time large enough that the probability of the sample mean being above $1 is as low as we want

- for a fixed time we can find a sample size large enough that the probability of the sample mean being below $1 is as low as we want

- when both the sample size and the horizon grow without limit which effect dominates will depend on how we make it happen

Adding "almost surely" to "everyone goes bankrupt and will never recover" or "there is a finite time after which no-one ever passes above $0.0000000000000001" is a subtle change but it's enough to allow for someone to go to infinity with infinitesimal probability.

This is why the distribution mean can grow exponentially, it wouldn't be possible if the everyone and no-one in those quotes were strictly true.

I agree with the first 3 statements.

Just to confirm, I am using 'almost surely' in the technical sense, which means 'with probability 1.'

Consider the following statement:

If you keep flipping a fair coin every day, it is almost sure that after some day you will have gotten a tails.

This is the same 'almost surely' that I am referring to.

We agree!

The point was that you didn't specify "almost surely" previously, that's why I asked for a proof to understand what did you mean exactly when you said that "everyone goes bankrupt and will never recover" and "or "there is a finite time after which no-one ever passes above $0.0000000000000001".

The mean of a random variable that is close to zero is close to zero, the mean of a random variable that is almost surely close to zero can be anything.

Look at my other reply, which was above but is now below. The number of participants required to be likely to find any who stay above water gets very high eventually, much higher than 1,000,000. This can just be calculated.

After 500 trials, you need 279 heads to stay above $1 net wealth. 1.5^278 + 0.6^222 = 0.50 and 1.5^279 + 0.6^221 = 1.26, so that's your breakeven point. The probability of getting at least 279 heads in 500 coin flips is 0.005364, so with 1,000 participants, you expect to see about 5 still above water.

At 1000 trials, the breakeven point becomes 558 and the probability of getting at least that many heads in 1000 flips is 0.00013614. So the expected number of people who stay above water in a pool of 1000 participants is 0. Out of 1,000,000, it is 13, so you're right, there are some, but at that point it's not nearly enough and we're not sampling the ones whose wealth is enough to actually bring the mean back up, so it keeps trending to 0 in any sample of a practical trial size.

This is a pretty interesting property of this problem, really. It's not related to ergodicity, but just the relative proportion of probability mass represented by above 1 and below one itself trending asymptotically toward 0 even though the analytical expectation trends toward infinity. I don't know that there is even a word for that, but seemingly which of those moves faster toward its limit would determine what sample ensemble average you really see when the number of realized states is far less than the number of possible states.

This probably has some implications for Pascal's Mugger type problems in decision theory. If some course of action has potentially infinite future payoff and destroys expected utility calculations because of that, but the expected number of possible universes in which a positive outcome happens at all trends toward 0 faster than the expectation trends toward infinity, that gives a decision rule. In this specific case, don't take this bet, at least not in an indefinitely repeating form.

Thanks for the thoughtful reply. The breakeven analysis is good!
The number of possible outcomes grows exponentially with time, and so does the ensemble size required to capture the extremal behaviour. Repeated losses bring you closer to zero, which is relatively well sampled by many realisations, but repeated wins produce exponentially larger returns, and so missing out on these realisations catastrophically affects the ensemble average.

A shorter run (say 100 steps) would be more likely to capture enough realisations to produce a reasonable estimate. You could assess this behaviour yourself, for very low step numbers, by calculating the variability in a sampled ensemble average, relative to the exhaustive (i.e. true) ensemble average.

This particular problem is another consequence of the properties dynamical system being examined, but not quite the same as the issues caused by its non-ergodicity.

I was interested in seeing the results myself, so here is some python:

    import numpy as np
    import itertools
    from matplotlib import pyplot as plt

    def ensemble_mean(outcomes):
        # Assume we are given a (K, T) array of outcomes, and compute the ensemble average
        # for T+1 time steps, starting with 1 wealth.
        K, T = outcomes.shape
        X = np.ones((K, T+1), dtype=np.float64)
        X[:, 1:] = np.where(outcomes, 1.5, 0.6)
        Z = np.cumprod(X, axis=1)
        return Z.mean(axis=0)

    time_steps = 20

    all_outcomes = np.array(list(itertools.product([0, 1], repeat=time_steps-1)))
    exhaustive_mean = ensemble_mean(all_outcomes)

    ensemble_size = 100
    ensemble_samples = 10000

    ensemble_means = np.zeros((time_steps, ensemble_samples))
    for i in range(ensemble_samples):
        print(i)
        # generate ensembles as though we were sampling (i.e. with replacement)
        J = np.random.choice(all_outcomes.shape[0], size=ensemble_size, replace=True)
        ensemble_means[:, i] = ensemble_mean(all_outcomes[J, :])

    plt.hist(ensemble_means[-1], bins=1000, histtype='step')
    plt.axvline(exhaustive_mean[-1])
    plt.title("Modal sampled ensemble mean is below true ensemble mean")
    plt.show()
So if you get lucky you de-risk and make small bets comparable to your initial winning bet, rather than betting it all.

Sounds like a good strategy whether in Vegas or Wall Street.

Try these parameters

n_subjects = 1000

n_trials = 100

(comment deleted)
OOf, yeah, expected value is a very misleading metric. Hard for me to wrap my head around it.

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.

The ensemble average is the expected value, and the expected value is positive.

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.

I'm getting too into the weeds below with these simulations, but I think it maybe speaks to this author's point. I can see you are clearly right analytically. With a positive expectation on each round, the expectation itself clearly trends to infinity.

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.

Yes, the pool of participants in your simulation must be large enough to sample all of the relevant phase space to generate the analytic solution.

This becomes very large as the number of trials increases (likely approximately exponential)

Yeah. OP might be conflating arithmetic mean with geometric mean. This is a common problem that many investors make. I see it all the time.

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.

I wrote up a jupyter notebook myself looking at this problem a couple years ago and I was thinking about cleaning it up into a blog post. Oh well. Guess that just goes to show the dangers of procrastination.

For what it's worth, my takeaway was that the "paradox" is that we aren't accounting for the nonlinear utility of money. Therefore the exponentially unlikely probabilities of winning quadrillions of dollars have exponentially large weights. But a quadrillion dollars isn't a million times more useful to me than a billion dollars. So if you account for that saturation effect and take the expected utility instead, the "paradox" goes away.

Proving that a measure is invariant is usually hard or impossible (in physics). It's useful as toy experiment but usually not for real life example.
This would be easier to understand if the author used standard vocabulary. Forget about "time average" and "ensemble average", what's important here is distinguishing the expectation of a bet, from the distribution of outcomes. In the bet he describes, the expectation is indeed greater than one, but the distribution means you'll most probably end up poorer, while a lucky few get super-rich.

Who here would take a bet where there's a 95% chance of losing their home and their well paying job, for a 5% chance of becoming a billionaire? I sure wouldn't.

My take on this: don't stop at averages, look at the whole distribution.

If there's confidence in this distribution, you make a pool of people who take these bets & divide the result
Successful societies do exactly that. It's called taxes.

As for what a realistic bet would look like (you're founding a startup or something), I believe the expectation is often not much greater than 1, so one does not simply found 100 startups and distribute the income of the 5 successful ones to everyone else. (And even if it is, the people capable of founding startups often have steadier, though less impressive, means of increasing their wealth. Startups are often founded for reasons other than wealth, after all.)

"Time average" and "ensemble average" are standard vocabulary in the statistical mechanics literature. Your comment is essentially a restatement of the article's point.

I think it's uncharitable to say the article would be easier to understand if it didn't use the language of ergodicity. Its explicit goal is to show how non-ergodicity leads to an example like yours.

So of course your comment seems easier to understand. But that's because you're just saying different distributions can be parameterized by the same mean. Ergodicity is about a lot more than that, and the language of ergodicity was the entire exercise here.

> "Time average" and "ensemble average" are standard vocabulary in the statistical mechanics literature

But their application to non-standard-mechanical things is very confusing.

Of course wealth is not ergodic. Ergodicity would mean that the distribution is always the same. Every point in time would be identical to every other point in time and growth would be impossible.

I agree it's not perfectly explained. But I think someone new to ergodic theory would find the article clearer (or at least more helpful overall) than your second paragraph here.
“What we're seeing is that even though the expected value is positive, and the ensemble average is increasing, the time average for any single person is usually decreasing. The average of the entire "system" increases, but that doesn't mean that the average of a single unit is increasing.”

Someone new to ergodic theory may understand from that article that if wealth was ergodic the average for every trajectory would increase like the average for the entire system. But that doesn’t make sense.

Thing is, I don't believe we even care about the time average. What we care about is the evolution of the distribution of outcomes over time.

More specifically:

- The distribution of outcomes at certain points of interest in time (like the valuation of my company when I intend to sell it).

- The probability that we cross a catastrophic threshold at some point (like bankruptcy).

Time average is a terrible metric to estimate those things. Heck, I'm not sure it can measure anything of interest, besides our own mistaken intuitions. It should probably be called something like "time average fallacy".

I'm a little confused - ergodic theory very much cares about the time average. Or do you mean the toy example of betting shouldn't care about it?

It seems like you think the problem here is too unsophisticated for ergodic theory or something. Which, fine sure. But this isn't an article intended to teach you about betting. It's an article intended to teach you about ergodicity, using betting as a toy example. The author isn't trying to introduce the best way to analyze betting strategies, they're trying to show what non-ergodicity is. And I think they basically succeed.

Just meet the article where it is, for its intended usage.

This is not about the example. What I'm saying that no betting at all should care about the time average. Betting is about having good estimation of outcomes, and time averages only helps you when the process is ergotic.

That's a very special case. For everything else (that is, non-ergotic processes), your time average is crap, and you must look at the distribution of outcomes directly. Even the ensemble average is not enough. Averages are crap at visualising skewed distributions. For those you want the median, the quartiles, sometimes even the percentiles.

---

To be honest, this "ergotic theory" shows signs of snake oil. The definition of ergodicity itself is dead simple, so it's pretty easy to evaluate. What seems pretty clear is that ergodic processes are the exception. And a pretty uninteresting one at that, since it's a class of processes that people will have good intuitions about.

It would then seem that ergodic theory is more interested in the non ergodic processes (the very point of this blog post is to warn us about them). That is, processes that lack some property —the general case. And surprise, since the time average and ensemble averages are different, and you only care about the ensemble average (well, the ensemble distribution really), the time average won't help you. Be afraid, or lose your assets.

That's why I see snake oil: what works on non-ergodic processes will also work on the ergodic ones. Unless you need to make a split second decision using your intuition (which while inadvisable is safer with ergodic processes), there's no need to make the distinction at all. Just analyse your process without without assuming it will be ergodic, the results will be applicable even if it is.

You say it’s not about the example, then go on to talk about the example...as I said, this article is only about betting insofar as it’s a toy example to illustrate ergodics. In the real world you wouldn’t analyze a bet this particular way, but that’s nitpicking and missing the point.

> To be honest, this "ergotic theory" shows signs of snake oil.

lol. Alright, I’m checking out of the discussion when a major subfield of mathematics is described as snake oil.

> You say it’s not about the example, then go on to talk about the example

I did not mention those stupid coin tosses, where did you get the impression I was talking about those specifically?

> a major subfield of mathematics is described as snake oil.

I did not say it was snake oil, just that it shows signs of being such. Then I described those signs. If you have counter arguments or pointers to such, I'd be happy to read them. I'd rather lose an argument and learn something than stay ignorant.

Yes, thank you.

This intro doesn't get to the depths of the issue. https://www.nature.com/articles/s41567-019-0732-0, by one of the pioneers of the "egondocity economics" is very nice for both going over the math and the academic history of the error.

Given the illustrious history of statistical mechanics into Modern probability theory, information theory, theoretical computer science, etc., it's a real shame Econonomics is still stuck with this bad math.

https://aeon.co/ideas/how-ergodicity-reimagines-economics-fo... the pop-sci narrative here really doesn't seem that much an exaggeration. The way non-ergonomics fixes the math and confirms some real-world intuitions is quite profound. And certainly there is a lot to critique with orthodox economics' math. (See https://themountaingoateconomics.com/ for another example.)

What is a shame is how “egondocity economics” (maybe a reference to the size of Peters’ ego?) misrepresents some things.

Are you calling “bad math” the expected utility theory developed by von Neumann (et al.)? He knew one thing or two about ergodicity, information theory, computer science, etc.

What is being mispreresented?

I read https://en.wikipedia.org/wiki/Von_Neumann%E2%80%93Morgenster..., And there's no notion of time let alone non-ergoticity in the formula. I am not familiar of with the rest of its book, but I wouldn't be surprise if it's similarly fine, building a theory similarly of rich theorems about very simple models.

If so, the problem isn't Von Neumann's math then, even if the general aim of the endever was misinspired by Bernoulli's primitive notions. The problem would be all the math cargo culters in economics who constantly try to the premise premises of math theorems as if they were broad social laws.

I mean don't get me wrong, I am no fan of Von Neumannn's politics, but obviously I am not going to fight his pure math.

The article by Peters that you linked to says that “in maximizing the expectation value — an ensemble average over all possible outcomes of the gamble — expected utility theory implicitly assumes that individuals can interact with copies of themselves, effectively in parallel universes (the other members of the ensemble).” This is nonsense.
He may be desperately trying to shoehorn frequentist statistics, which require actual samples over repeated experiments. If you take the frequentist view, then you kinda have to collect all the possible results of your bet from all the parallel universes of outcomes. Which requires interaction with those universes, and does not make any sense unless maybe you wave your hands a lot about the Many Worlds interpretation of quantum mechanics (and dammit, even if we believe in that, the parallel universes do not interact!)

If you're a reasonable person instead, you recognise that probabilities instead describe a state of partial information (that is, probability is in the mind), and the "ensemble average" really comes from a probability distribution we can compute with bog standard probabilistic counterfactual reasoning, not by actually hopping universes.

My, the abstract didn't prepare me for this.

Although these notions are standard language, I still agree with you that the author made it a bit more complicated than it needs to be. Ergodicity for a stochastic process just means the joint distribution of random variables that make up the sample space is time invariant.

For a coin toss example like this, the distribution of heads and tails in each trial is ergodic. The distribution of earnings is not. This isn't because of any difference between time average versus ensemble average. It's because the probability of winning each toss is time invariant but the amount you stand to win or lose isn't because it's a function of both the probability of winning and your current bankroll, and current bankroll is not time invariant.

Although, ironically, because of the numbers he picked, all bankrolls tend to zero eventually, so over a large enough number of trials, wealth eventually becomes an ergodic process as well. Graphing out his scenario over more trials gives a sort of heat death of the universe plot, where some players stay alive longer than others, but in the long run, the enemy always wins.

>I still agree with you that the author made it a bit more complicated than it needs to be. Ergodicity for a stochastic process just means the joint distribution of random variables that make up the sample space is time invariant.

It's funny how you say "the author made it a bit more complicated than it needs to be" and then proceed to explain it with even more jargon ("Ergodicity for a stochastic process just means the joint distribution of random variables that make up the sample space is time invariant").

Ergodicity can be explained very simply.

If you've heard of Murphy's Law, you probably already understand the principle behind ergodicity.

"If there's more than one way to do a job and one of those ways will end in disaster, then somebody will do it that way."

When you increase the number of people doing something, the number of opportunities for that somebody to do it the wrong way goes up. These are the outliers versus the normal state of affairs. These don't have to be positive or even negative, simply improbable.

Given enough players for a lottery, there will be a winner, but there will also be people that randomly get linear sequences of numbers, all primes, etc.

Why this is coming from a throwaway is that this occurs for everything in life, including, for example, schools and police shootings.

These are extremely outlying events when given the absolute number of interactions between students and police. The ergodic space allows for these to occur, and so they do, eventually.

The problem is when people start taking infrequent outlying events as the norm rather than outlying properties of the system itself.

If you give 800,000 cops guns and send them out to interact with the public tens of times per day, they will eventually shoot someone they shouldn't have. This is a normal part of the space but isn't probabilistically normal. The normal state of affairs is that they don't shoot anyone. In the rare case that they do shoot someone, it's generally because they are being shot at.

Equally, if 100 million citizens have guns, eventually one will end up in the hand of one of approximately 7.5 million (probabalistically) male high school students that is willing to use it against other students. This too is part of the ergodic space, but isn't probablistically normal. The normal state of affairs is that school shootings don't happen. The normal state of affairs is that bullied and/or mentally ill students don't seek violent retribution against their classmates.

These are simultaneously improbable and probable events. We know that they occur, but we know that they occur infrequently. Inevitably, given enough rolls of the dice, circumstances conspire to enable extremely improbable events to occur, but these should always be seen as the opposite of the norm.

The author explains, using fancy math concepts, that if investments in Capitalism were like independent rounds of betting on what you have, capital would still tend to accumulate with few people rather than be distributed evenly.

However, if you detach yourself from a distraction you would note that capitalist economies are not like independent bets at all, and much of the accumulation is due to confiscation, occupation, sabotage, undercutting to drive competitors out, propaganda (advertising), etc. - directly or by manipulating the government.

The fact that it's biased is irrelevant. The question whether it will get close to any point is quite complicated, though with it being essentially a random walk with drift the chance that will get above its initial point is probably less than 1.

This's got nothing to do with ergodic theory though, but feel free to use that word in whatever weird distorted way you like, I literally can't seem to stop you.

My take away from this is don't go "all in" on every bet. There is a floor of $0, and the probability of N bets going the wrong way is always nonzero, even if it is small depending on the game. And with repeated "all in" betting the probability of N bad bets in a row goes to 100%.