6
$\begingroup$

On Joe Rogan's podcast #1769, Dr. Jordan Peterson said something like this:

  1. Take a population of 10 people, each starting with 100 dollars.
  2. They will "trade" based on a coin flip. Whoever "loses" has to give the other person one dollar.
  3. In the long run, all wealth will be concentrated into one pocket.

At first, I couldn't believe this was true because of the equilibrium randomness would bring to this system (compared to an "informed trader" scenario). Each player would win as much as they would lose, resulting in a zero-sum endless game.

A player's expected wealth after $ n $ trades:

$$ E[w] = w_0 + \sum_{i=0}^n {1 \over 2} \times 1 + \sum_{i=0}^n {1 \over 2} \times -1$$ $$ E[w] = w_0 + {n \over 2} - {n \over 2} $$ $$ E[w] = w_0 $$

I ran a Python simulation, and in the very first run I got this: It took 70431 individual trades for all wealth to be concentrated in one pocket.

Am I missing something here?


This is the code for the simulation: https://gist.github.com/victorvalentee/1c04b2d16005f7372273b153fe9ece23

$\endgroup$
11
  • 5
    $\begingroup$ I think Aksakal got it right - think about it this way. Given that the number of people is finite and the number of dollars is finite, BUT the number of trades is infinite, sooner or later, the extremely low probability event (all money randomly ending up in one pocket) will happen. You're not missing anything, it's just that (like Aksakal said), the threshold is breached at some point given that the low prob. event eventually happens. If you did it with more people and more dollars, the amount of trades it takes should grow exponentially (as probability of this low. prob event drops further) $\endgroup$ Commented Feb 6, 2022 at 0:23
  • 4
    $\begingroup$ I think you should add the implied rule 'if at any point a person reaches 0 dollars there are permanently out of the game'. This seems to be an assumption both in your simulation and in the answers and once you make it explicit it looks a lot more plausible that eventually there will be only one person left. Alternatively, if you allow people to accumulate debt you can still compute a probability that at a given point 9 players are in debt but that is not the most likely long time outcome. $\endgroup$
    – quarague
    Commented Feb 6, 2022 at 8:03
  • 1
    $\begingroup$ Debt is not endless. Once you are under water there’s no debt for you. So debt only will make the stopping time longer but won’t prevent it from happening $\endgroup$
    – Aksakal
    Commented Feb 6, 2022 at 15:56
  • 3
    $\begingroup$ The 2-person version is the Gambler's Ruin problem, with explicit formulas for mean 'absorption' time. $\endgroup$
    – BruceET
    Commented Feb 6, 2022 at 17:20
  • 2
    $\begingroup$ Indeed, this is the Gambler's Ruin. When playing against an opponent with infinite resources, even an informed trader with positive expected outcome from each trade will eventually and inevitably go broke. When playing against an opponent with finite resources, one of the two will eventually go broke. $\endgroup$ Commented Feb 7, 2022 at 17:31

3 Answers 3

10
$\begingroup$

it's a rigged game :) you have an absorbing state: one guy got all money. if somehow at any given moment one guy got all the money, then nobody has anything left to trade, and the game stops. it's pretty much certainty that if you play long enough this is bound to happen eventually, i.e. at some point you'll observe the sequence of trades that will lead to all money in one pocket. this is not about the equilibrium, this is related to a problem known as first-hitting-time in a random walk.

there's actually another absorbing state if we disallow short selling and margin trading: a player hits zero wealth and stops trading, while others continue trading. that's why estimating probabilities in the game with more than two traders is not straightforward, you must account for players dropping off over time

$\endgroup$
9
  • 2
    $\begingroup$ This answer is qualitatively correct, but may be quantitatively misleading: the number of possible states is roughly $1000^{10}=10^{30}$, but the expected time to a win is more like $10^5$, nowhere near enough time to sample all states. $\endgroup$
    – Matt F.
    Commented Feb 6, 2022 at 2:31
  • 1
    $\begingroup$ @MattF.luckily we don't need to sample all states, we only need to touch the threshold which is with linearly increasing variance is not as far as it seems $\endgroup$
    – Aksakal
    Commented Feb 6, 2022 at 3:01
  • 1
    $\begingroup$ This answer is misleading. There is not just an absorbing state "one guy got all the money", but several nested absorbing events "only 9 guys have money"; "only 8 guys have money"; "only 7 guys have money"; etc. Because of these nested absorbing events, the expected time to reach the end state is much much shorter. $\endgroup$
    – Stef
    Commented Feb 7, 2022 at 13:24
  • $\begingroup$ I’m not saying there’s only one absorbing state @Stef , also due to the symmetry you can actually look at just one participant if you set up the problem right. Notice that other players taking all money must lead to zero wealth of the trader confide $\endgroup$
    – Aksakal
    Commented Feb 7, 2022 at 13:26
  • $\begingroup$ @Aksakal And I am not saying that you are literally saying something wrong. I am just saying that your answer is misleading. $\endgroup$
    – Stef
    Commented Feb 7, 2022 at 13:27
6
$\begingroup$

Here is an order-of-magnitude calculation of how long it takes to have only one player remaining.

For any player, let $p$ be the probability that they have exited the game after $n$ turns. So the probability that $8$ players have exited and $2$ remain is $45p^8(1-p)^2$. The probability that $9$ players have exited and $1$ remains is $10p^9(1-p)$. The most likely scenario is that there is only one player remaining when $10p>45(1-p)$, i.e. when $p>9/11$.

An exit occurs when a player goes to negative wealth. By the reflection principle, a player has a $9/11$ probability of negative wealth by the $n^{th}$ turn iff they have a $9/22$ probability of negative wealth at the $n^{th}$ turn. Since the standard deviation of their wealth is $\sqrt{n}$ after $n$ turns, this happens if $$\frac{9}{22}=.409=\Phi\left(\frac{-100}{\sqrt{n}}\right)$$ $$-0.23=\frac{-100}{\sqrt{n}}$$ $$n\sim 189000$$ where $\Phi$ is the cumulative normal probability.

So, by this estimate, the modal scenario is that all but one player has dropped out after 189000 turns, which is the same order of magnitude as the 70000 that you found in your experiment.

$\endgroup$
7
  • 3
    $\begingroup$ But these probabilities are not independent are they? If one player drops out it increases the probability for the other players to be in the game. So we can not consider the distribution of the number of players in the game as a binomial/Poisson distribution (at least not of the numbers are low). $\endgroup$ Commented Feb 6, 2022 at 21:49
  • 1
    $\begingroup$ Player A has the same distribution after n turns regardless of who they are playing, so it does not matter how many of their opponents have dropped out. $\endgroup$
    – Matt F.
    Commented Feb 7, 2022 at 2:58
  • $\begingroup$ If after $n$ turns some others did bad and dropped out, then it is more likely for player $A$ to be still in the game in comparison when these others did not bad. You can not replace this game with flipping ten times a coin with probability $p$. $\endgroup$ Commented Feb 7, 2022 at 6:31
  • 1
    $\begingroup$ I agree that it might be a good order-of-magnitude estimate. I did not say this was not the case (although I have doubts). Do you agree that the correlation between individual players causes a discrepancy? It would be nice to give some estimate of how much this discrepancy plays a role. The OP is computing the situation for n=5 which might make it relevant. For n=2 we can easily compute that there is a difference, namely the probability of any of two players ending the game is $2p$ and not $1-(1-p)^2 = 2p-p^2$.... $\endgroup$ Commented Feb 7, 2022 at 11:13
  • 1
    $\begingroup$ .... another complicating factor is the growth of the standard deviation of the wealth. This is not simply $\sqrt{n}$. Not every turn a player is getting a fifty-fifty $-1$ or $+1$. There are also turns with $0$. The probability of getting $0$ depends on the number of players that are still in the game. $\endgroup$ Commented Feb 7, 2022 at 11:15
1
$\begingroup$

The answer by Aksakal already explains it enough why the wealth is ending up into one single pocket. In this answer we elaborate a bit further on the quantitative approach by Matt F.

One could compute the probability in terms of the probability of a specific player remaining in the game and consider the position of the players independent.

Then there are two ways

  • The probability that only one player is in the game is equal to the probability that a player has reached the maximum amount of money. Let's call the probability for an independent player to win $p_{win}$.

    The probability that none of the players have won is $$(1-p_{win})^n$$

  • The probability that only one player is in the game is equal to the probability that no more than $n-2$ players have lost their money yet. Let's call this probability for an independent player to loose $p_{loose}$.

    The probability that none of the players have won, is the probability that less than 9 have lost and is $$1-(p_{loose})^{n}-n(1-p_{loose})(p_{loose})^{n-1}$$

However, when I apply these formulas then I get small discrepancies. One way overestimates the number of trials before the game ends, and the other underestimates it.

The reason for the discrepancy is that the scores of the individual players are correlated. If one player has lost after $n$ games, then this reduces the probability for the other players to have lost after $n$ games.

plot

In the image, we also plotted an inverse Gaussian distribution fitted with the method of moments, and it seems to agree reasonably well with the shape of the distribution determined from the simulations. So possibly an inverse gaussian could be used as a model for the distribution (but one would still need to figure out the mean and variance).

### function to simulate game
sim = function(k=100,n=5) {
  # x: is a variable that keeps track of values, 
  # the size of this variable will reduce 
  # once participants hit zero
  x = rep(k,n)    
  ### n_active: number of active participants
  ### these equals the lenght of 'x' but we do not 
  ### want to compute that length everytime
  n_active = n
  ### counts: keeping track of the number of games
  counts = 0
  while (n_active>1) {
    counts = counts + 1
    
    ### sample two players
    s = sample(1:n_active,2)
    ### add +1 and -1 to the wealth of the players
    x[s] = x[s] + c(1,-1)
    
    ### check for zero wealth and remove the participant from 'x' if neccesary
    if (x[s[1]]==0) {
      x = x[-s[1]]
      n_active = n_active -1 
    }
    if (x[s[2]]==0) {
      x = x[-s[2]]
      n_active = n_active -1 
    }
  }
  return(counts)
}

### simulations
set.seed(1)
y = replicate(10^3,sim())

### plot histogram
hist(y, breaks = seq(0,10^6,10^4), main = "histogram of simulations \n compared with approximations")


### add estimates based on an individual's probability to loose or win after n turns
n = seq(0,10^6,10^4)

p1 = pnorm(500,mean = 100,sd = sqrt(0.4*n))-pnorm(-500,mean = 100,sd = sqrt(0.4*n))
lines(n[-1],-diff(p1^5)*10^3, col = 2)

p2 = pnorm(0,mean = 100,sd = sqrt(0.4*n))*2
lines(n[-1],-diff(pbinom(1,5,p2))*10^3, col = 3)

### add inverse gaussian curve fitted with method of moments
lines(n,statmod::dinvgauss(n, mean(y), dispersion = var(y)/mean(y)^3)*10^7, col = 4)

legend(4*10^5, 80,
       c("estimate based on probability of winning", "estimate based on probability of loosing",
         "inverse Gauss distribution"),
       cex = 0.7, col = c(2,3,4), lty = 1)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.