[ View menu ]
Main

Counterintuitive problem: Everyone in a room keeps giving dollars to random others. You’ll never guess what happens next.

Filed in Encyclopedia ,Ideas ,R
Subscribe to Decision Science News by Email (one email per week, easy unsubscribe)

SURPRISING POLICY EFFECTS

When we were giving a talk at the Department of Electrical Engineering and Computer Science at Northwestern we met Uri Wilensky, who shared with us a simulation he likes to assign.

Imagine a room full of 100 people with 100 dollars each. With every tick of the clock, every person with money gives a dollar to one randomly chosen other person. After some time progresses, how will the money be distributed?

If on quick reflection you thought “more or less equally”, you are not alone. I asked 5 super-smart PhDs this question and they all had the same initial intuition.

How does the distribution look? Play the movie above to see. Here’s how it works.

The movie shows 5,000 clock ticks in less than a minute.

The Y axis shows the number of dollars each person has. It starts at 45 dollars each.

On the x-axis we have 45 people.

The red bars show the wealth of each person at each tick of the clock.

The blue bars are the same as red bars, but sorted to show how wealth is distributed. The rightmost blue bar is the height of the highest red bar, and so on down.

Don’t believe it? Play with R and tidyverse and gganimate code yourself.

Inequality can arise from seemingly innocuous policies — you need to keep an eye on it.

ADDENDUM

There’s some confusion in the comments below and on other sites that we thought we’d address. The point is not that some people become rich and never lose their top position. This runs infinitely and will contain every possible sequence of good and bad luck for every person. The richest will become the poorest, everyone will experience every rank, and so on. The interesting thing is that this simple simulation arrives at a stationary distribution with a skewed, exponential shape. This is due to the boundary at zero wealth which, we imagine, people don’t consider when they think about the problem quickly.

See this paper and see mathematician Jordan Ellenberg’s post on this post

46 Comments

  1. Philip says:

    My first thought was that it should all end up with one guy. No? Once someone is broke they will basically never get wealth again. They might get a dollar one tick but they have to move it along the next tick. And if there are two wealthy people left, one with slightly more than the other, then eventually he will get everything because both distribute money randomly to pass through broke people and they are the only sinks. And the one with less will run out first and become a pass through. So you end up in long run equilibrium with one dude having all the dough. No?

    June 21, 2017 @ 3:34 pm

  2. Philip says:

    I seem to be incorrect in the above. Tried it in Mathematica and even after millions of steps it does not converge to anything close to a single owner of all wealth.

    ReverseSort@
    Last@With[{n = 100, m = 1000000},
    NestList[
    Block[{x = #},
    Scan[(If[x[[#]] > 0, x[[#]]–;
    With[{j = RandomChoice[Delete[Range@n, #]]}, x[[j]]++]]) &,
    Range@n]; x] &, ConstantArray[n, n], m]]

    June 21, 2017 @ 6:48 pm

  3. Citizengershaw says:

    @Philip – seems you should expect a broke person to get more than one dollar from others now and then. So they don’t have stay broke. Even if one person does get all the money he or she has to give one dollar on the next tick. If it is not given back on the next tick, then that person will only have 98. So although this leads to inequality at any time don’t positions change? With those at the bottom more likely to move up and those at the top more likely to move down?

    June 21, 2017 @ 9:27 pm

  4. Dean says:

    Cute! It should converge to basically an geometric distribution with p=.01 I would expect. (No that isn’t obvious.) Can you add something like a q-q plot to test that?

    June 22, 2017 @ 12:04 am

  5. Thomas says:

    @Philip I’m curious and as @Dean notes, it should converge. So, what did the distribution look like after 1 million iterations? Was it substantially different from the PDF after 5,000?

    June 22, 2017 @ 12:38 pm

  6. Haikuuu says:

    @Dean can you cite any reference for that?

    June 22, 2017 @ 1:53 pm

  7. Bobbie says:

    My first thought was that it was going to be similar to a binomial distribution. But after seeing it run, I recognized two differences — that

    June 22, 2017 @ 10:41 pm

  8. Bobbie says:

    … (1) there does have to be as much + as – each round (unlike, e.g., coin flips, where there would not need to be the same number of heads and tails in a given round) and (2) more important, that in each round the movement for a person could range from -1 (typical for binomial distributions) to +N-1 (very different). Interesting to hear about what kind of process people’s first intuitions map onto.

    June 22, 2017 @ 10:48 pm

  9. Philip says:

    @Thomas no, not substantially different.

    The Gini coefficient seems to hit about 0.50 after about 100,000 steps and then stays there.

    The maximum wealth seems to pop up to about 1,000 or so (ie 10% of total wealth) around the 500,000 mark and then go back and forth from there, sometimes very rapidly.

    Here’s the final sorted distribution after 1 million steps of a random run:
    {440,407,371,327,282,247,231,226,226,211,197,196,195,192,178,176,173,162,156,155,149,149,144,143,141,132,123,123,120,120,119,116,116,115,112,108,107,105,102,99,98,97,97,96,94,91,88,88,86,86,86,85,84,80,79,78,74,69,68,63,60,59,57,55,55,54,51,45,45,37,36,35,32,32,31,31,31,30,29,28,26,25,23,22,22,22,21,19,14,14,13,13,11,10,9,9,7,7,2,0}

    June 23, 2017 @ 3:14 am

  10. Lucas says:

    Cool post! I tried to do the simulation based on statistics. I used the binomial distribution to model the money people obtain each round, check it out:

    https://lucasvw.github.io/main/2017/06/22/money.html

    June 23, 2017 @ 5:28 am

  11. Thomas says:

    @Philip Interesting! Thanks for following up…

    June 23, 2017 @ 7:41 am

  12. Jorge Otero-Millan says:

    It is uniform. Just has a large variance. If you give it enough time. Anybody that was up will go down.

    The graph mislead us into thinking we are looking at a distribution. But we are not. We are looking at a ranked sample.

    June 23, 2017 @ 10:00 am

  13. dan says:

    If you want to see a distribution, note that the tops of the blue bars is an empirical cumulative distribution function. Divide player number by 45 to get probability. It’s just that x and y are flipped from a conventional eCDF.

    It is true that with enough time, a player that was up will go down (and vice versa) because every sequence will occur with infinite time. So the Gini coefficient, which starts at 0, will attain 0 again, but only for brief periods. The stationary shape is not uniform.

    I recommend http://physics.umd.edu/~yakovenk/papers/EPJB-17-723-2000.pdf

    June 23, 2017 @ 11:44 am

  14. Thomas says:

    @Jorge Interesting. So, if it were possible to tag individual participants and track their evolution, it would show random fluctuations around $100?

    June 23, 2017 @ 11:13 am

  15. Philip says:

    @Jorge I think you are right and your explanation makes a lot of sense. I also just tried looking at the time series of the evolution of a few specific individuals and yes, it just bounces around, down to zero, up to 600-700 or so, and back.

    In other words, all this redistribution does is increase volatility, just as you said. Thanks for the explanation. Makes a lot of sense.

    This redistribution can be bad even if it is perfectly random and fair, and even though it doesn’t change anyone’s expected value, simply because it creates new and unnecessary and undesired risk.

    June 23, 2017 @ 11:52 am

  16. Philip says:

    I also looked at the range for each individual. Every single one of the 100 people, during the first 1,000,000 ticks, had at least one period of having zero money. And each one had at least one period of having several hundred dollars. Just pure randomness, that really is all that’s happening here

    June 23, 2017 @ 12:02 pm

  17. Russ says:

    Dean…

    here are plots animated for each round: https://github.com/un1crom/givemoneyaway/blob/master/qqplot.gif

    qqplot is geometrics with .01 p, as you asked.

    100 bucks, 100 people, 500 rounds.

    lots of code and other data:
    https://github.com/un1crom/givemoneyaway

    June 23, 2017 @ 4:24 pm

  18. Griet says:

    I suggest you look into Lokta-Volterra equations. Those are population models and end up often into a harmonic equilibrium.

    June 24, 2017 @ 5:04 am

  19. David Reiley says:

    Dan, the physics paper you cited suggests that the system should converge to an exponential distribution, where the probability of having at most m dollars is F(m)=1-exp(-m).

    Do the later rounds of your simulation fit that distribution well?

    June 24, 2017 @ 5:32 pm

  20. Henk-Otto Limburg says:

    This is exactly how this works.
    Let’s focus on the first round. For argument sake let’s assume we have 80 men this time, with all ā‚¬80.

    After the first round, we’ll have somthing close to:
    20 x 81 (gave 1, got 2)
    40 x 80 (played even)
    20 x 79 (gave 1, received 0).
    In fact, there are a few lucky ones allready on 82…but no one at 78!

    In the second round, this process is repeated.
    a few at 82 of allready even higher
    40 or slightly less @ 80
    20 x 79
    10 or less x 78, (they only gave 2 times)

    Allready now you see some graph similar to the ones above. Since luck is neutral, and it has no memory, there is no force of getting back to the initial state.

    However, repeating the same process there is every force to divide more unequal.

    This is repeated several times

    June 26, 2017 @ 10:06 am

  21. Sheldon Rampton says:

    This is an interesting simulation, but it should be noted that the algorithm could be easily tweaked to either reduce or increate the amount of resulting inequality. For example, you could change the rules so that people with > $200 have to give away two dollars instead of one, or so that the dollars are only given to people with less than $50, or people with less than $50 don’t have to give away a dollar — essentially instituting an element of progressive taxation to the system.

    The main lesson here is that it debunks the notion that life is fair in the sense of distributing rewards equally according to effort. If we think of this as a model for real life, it’s pretty clear that luck plays a big role in determining that (although obviously not the only role). The question then is how acceptable we find the resulting inequality and what we think should be done to address that.

    June 26, 2017 @ 10:43 am

  22. Robert Rounthwaite says:

    I think one conclusion could be that we should be glad that people with more money also spend more.
    If everyone spent the same amount of money on necessities, wealth imbalances would magnify.
    Instead, we see most fortunes dissipated, if not during the lifetime of the person, in the lifetime of their heirs.
    see Johnny Depp, Michael Jackson

    June 27, 2017 @ 5:57 pm

  23. Henry says:

    This is a finite state ergodic Markov chain, so all distributions should be possible. Optimistic approximations should work reasonably well, remembering that a finite simulation can only visit a few of the possible distributions

    I would agree with Dean that the distribution for an individual should approximate to a geometric random variable with mean INITWEALTH. So the sorted distribution could vary around something like

    qgeom(ppoints(NUMPLAYERS), 1/(INITWEALTH-1))

    which with arbitrarily large numbers of players and initial wealth should lead to a Gini index with a limit of 0.5

    This in turn could be approximated by an exponentially distributed random variable with the same mean, so a sorted distribution varying around something like

    qexp(ppoints(NUMPLAYERS), 1/INITWEALTH)

    which (wrongly assuming independence) would suggest that the maximum amount might be between

    -log(1-0.025^(1/NUMPLAYERS)) * INITWEALTH

    and -log(1-0.975^(1/NUMPLAYERS)) * INITWEALTH

    very roughly about 95% of the time.

    For 100 players each starting with 100 dollars, this might suggest a likely interval for the maximum between about 331 and 829. (For 45 players each starting with 45 dollars, this might suggest a likely interval for the maximum between about 114 and 337.)

    June 28, 2017 @ 4:48 am

  24. Andrei Dobrescu says:

    @Sheldon Rampton
    Distributing rewards according to effort and value is anything but random, so this simulation teaches nothing about that particular issue. The conclusion is correct though, luck plays a big part in life

    June 28, 2017 @ 5:25 am

  25. Dil Green says:

    Interesting that the experiment is explicitly set as ‘people’ doing the distribution. The (my) assumption at the outset was thus that there might be something to learn about humans. But in fact this is purely about mathematics.
    MATHEMATICS: (I am not a mathematician):
    As Jorge notes, the presentation giving only ranked and random ordering obscures the distribution (which would be revealed by plotting the number of individuals having each number of dollars), which would look like a version of a normal distribution, only skewed upward on the left (low dollars), and with an exaggerated, long and low tail at the right (high dollars).
    Although there is always as much + as – in each round, note that in some rounds, the ‘poorest’ players have nothing to give: this results in a small but consistent ‘negative’ pressure, as in these rounds players on zero dollars are very likely to receive one, and thus a non-zero player will definitely go down – this I would suggest is the mechanism whereby the skewing occurs.
    HUMANS: equating humans with random bots is a bizarre mindset.
    I am generally rather concerned at the influence of game-theory axioms outside specialist domains [https://digital-anthropology.me/2017/03/14/games-and-game-theory-the-trouble-with-paradigms/].
    Humans, given the same ground rules, would likely produce a much flatter distribution (although unlikely to be totally flat), which could be expected to vary widely on the basis of all sorts of ‘externalities’; culture, perceptions, ‘tribal’ mixes, the life experiences of the individuals involved (in general rich people are less generous than poor people, so we shouldn’t be surprised if rich people playing the game were more accepting of inequality than poor people).

    June 28, 2017 @ 9:23 am

  26. David Drascic says:

    Had trouble with the rendering to mp4, so I decided to start over using Excel, where I could put each transaction on a separate line, and chart the resulting changes of fortunes for each individual.

    Starting with the simplest case of N=3 people, where each person can pay the amount to themself (so is randomly giving the dollar to person 1, 2, or 3 with equal probability), then the results show a simple, random walk. I continued the spreadsheet for 20,000 trials, using N=3, N=5, and N=20.

    In each case, the mean value paid to any individual is $1 to 6 decimal places, which is good because otherwise the total value of the system would be changing.

    As Jorge Otero-Millan touches upon above, the process of sorting the samples and then presenting the sorted graph as a distribution is highly misleading. Throwing out the randomness of the distribution gives the illusion that there is sometime else happening.

    If you check out the images I posted on a Facebook discussion of this simulation, you will see the random walk (finite state ergotic Markov chain) nature of the transactions very clearly.

    Facebook comments and diagrams

    This is very similar to the kinetic energy stored in any particular molecule within a confined gas, which changes quickly and randomly, depending upon random interactions with other molecules. Some molecules slow down considerably, others speed up dramatically, but the over amount of kinetic energy in the system remains the same.

    When using Excel, rather than displaying the random walks as a simple XY plot, you can display them instead as STACKED charts, where each line is drawn above the other, with the space between equal to the current Y value. The very top line is always perfectly straight, at the total value of the system. The distribution of the money in the system changes randomly, and relatively slowly, in well measured steps.

    There is NO “natural” process for wealth concentration. As others have pointed out, that is an illusion.

    July 4, 2017 @ 8:51 am

  27. David Drascic says:

    Sorry, please use this link instead!

    https://www.facebook.com/alain.chesnais/posts/10154437404272811

    July 4, 2017 @ 8:54 am

  28. no_identd says:

    Properly looking at the distribution seems like the first step in the right direction, but how about going a step further and looking at the distribution *density*?

    That seems like where one’d find he meat of the matter…

    July 4, 2017 @ 9:06 pm

  29. Kent Brewster says:

    Here’s a quick & dirty version in JavaScript. Paste into a console window on any browser to play:

    https://gist.github.com/kentbrew/3764697ed8d31152b2b96531080dfe01

    July 9, 2017 @ 10:50 am

  30. Chris Stucchio says:

    I think you can solve this (at least the long run distribution) analytically.

    Let N = the # of people.

    First of all, the trajectory of an individual dollar can be represented as a markov chain. The markov matrix is equal to 1/(N-1) except on the diagonal, which is zero. It’s trivially easy to show that this has an eigenvector of (1, 1, …, 1) with corresponding eigenvalue 1.

    So that’s the ergodic distribution for any *individual* dollar bill.

    Now assuming long run independence (which I haven’t proven), we can see that there are N dollar bills, each of which has a 1/N chance of being held by any individual.

    This means the number of bills held by any individual is Binomial(N, 1/N). For N large, this converges to the Poisson distribution with lambda = N*p = 1 [1].

    This gives the probability of holding K dollars, so inverting this gives the number of people holding K dollars.

    [1] https://en.wikipedia.org/wiki/Poisson_limit_theorem

    July 9, 2017 @ 11:24 am

  31. John Jorsett says:

    It would be interesting to see a representation of the exact individual who is on top after each iteration and how that changes over time. Once firmly in the lead does the leader ever lose that position to someone else?

    July 9, 2017 @ 12:19 pm

  32. dan says:

    Yes, the top dog not only loses to someone else, but will go entirely broke. The game runs forever so every sequence of good and bad luck will occur, all possible states will be achieved.

    July 9, 2017 @ 1:01 pm

  33. Ivan says:

    I presume that with a million people instead of 100 we’d get results much closer to the expected, with the majority of people staying close to the initial amount?

    July 9, 2017 @ 1:21 pm

  34. Stephen Jones says:

    I copied Kent Brewster’s JavaScript implementation into a JS Fiddle for anyone who wants to try this out online:

    https://jsfiddle.net/jones1618/n5w5nyo6/

    July 9, 2017 @ 1:51 pm

  35. drc says:

    in social network analysis this is called “rich get richer”

    July 9, 2017 @ 1:53 pm

  36. Russ says:

    I tried various initial conditions to play with boundary conditions. I did millions of rounds/ticks of the clock in lots of configurations.

    https://github.com/un1crom/givemoneyaway

    i think the fun part of this problem is finding the distributions of all the various states (while all of them will eventually be reached with enough time)… to craft social policy one would want to map out the probabilities of each state, the time on average it would get there and stay within the bounds of that state and from all the initial conditions.

    knowing that would allow you to articulate a tax and estate policy that was “most fair for the most probable and longest lasting states of money distribution” then again, you could just rest people randomly and not worry too much about the math šŸ™‚

    July 9, 2017 @ 2:11 pm

  37. Chris says:

    For a quick python implementation, this clearly illustrates the point!

    from random import randint
    balances = [40 for i in range(40)]
    for i in range(5000):
    for j in range(40):
    if balances[j] > 0:
    recipient = randint(0,38)
    if recipient >= j: recipient += 1
    balances[j] -= 1
    balances[recipient] += 1

    for balance in sorted(balances): print(“{:4}”.format(balance) + ” ” + “=”*balance)

    July 9, 2017 @ 3:01 pm

  38. Physicist says:

    This is totally trivial and expected. The exponential (a.k.a. geometric) distribution is the maximum entropy distribution with a fixed average:

    https://en.wikipedia.org/wiki/Maximum_entropy_probability_distribution#Discrete_distributions_with_specified_mean

    July 9, 2017 @ 3:19 pm

  39. kirillseva says:

    Modified the problem from this post to also include debt. If someone doesn’t have the funds to pay during the turn, they have to borrow money from the person they should be giving it to, and pay back with interest.

    with the following parameters:
    NUM_PEOPLE = 45
    INITIAL_BANK = 45 # everyone gets 45 dollars
    INTEREST_RATE = 0.1 # 10% per turn that you didn’t pay
    ROUNDS = 5000
    RENT = 1 # how much to pay each round
    everybody’s cash goes to zero on step 1008. From that point on all trades are debt manipulations only

    Check out the source and the produced animation here:
    https://gist.github.com/kirillseva/961fa1f5b5d64254e0117caf11b64b27

    July 10, 2017 @ 12:39 am

  40. CR Drost says:

    I suppose the proper mathematical treatment is to model each person as a probability distribution of 0 wealth, 1 wealth, 2 wealth, … on. I suppose it’s not too much of a loss of generality to pretend that all of the people have the same distribution, but possibly it gives the wrong answer for small N. So then the probability that we get n dollars this turn is going to be: there are (N – 1 choose n) ways to choose n of my colleagues to give me money and N-n of my colleagues to not; the n who do each have a (1 – p0) chance of having money and a 1/(N-1) chance of giving it to me, so it’d seem like a transition probability of t(n) = (N – 1 choose n) * [(1 – p0)/(N – 1)]^n * [p0 + (1-p0)N/(N-1)]^(N – n). I’m not 100% sure that’s right but it has a plausible smell… maybe. Then one has to solve the equations:

    p0 = p0 t(0) + p1 t(0)

    p1 = p0 t(1) + p1 t(1) + p2 t(0)

    p2 = p0 t(2) + p1 t(2) + p2 t(1) + p3 t(0)

    to get to the stationary state. Because p0 is in the formula for t(n), it might make sense to think of p0 as the independent variable ranging from 0 to 1, and then deriving the average occupation from the distribution as a function of p0, before inverting it? Also there is probably a case to be made that there’s a good limit for N >> n (i.e. that t(n) becomes negligible at higher n) and so you’ve really only got to figure out t0, t1, t2 or so and then the rest of the distribution is approximately fixed by those.

    July 10, 2017 @ 12:45 am

  41. Jimmy says:

    From the problem statement we have people in a room.
    The geometry of the room and the time between ticks are not accounted for in the simulations.
    – If one can only travel a small distance between ticks there is bound to be some influence on the distribution. Those near the center might receive more than those near the corners.
    – The shape of the room will also influence the distribution.
    – If everybody is seated and not allowed to move we will have another distribution.

    July 10, 2017 @ 4:19 pm

  42. vvvvalvalval says:

    My guess is that they follow a Boltzmann distribution – https://en.wikipedia.org/wiki/Boltzmann_distribution

    July 10, 2017 @ 5:11 pm

  43. CorvusCrypto says:

    Fun fact, if you increase the starting amount of the game using the same algorithm you start loosing from the geometric distribution look and start moving toward something that looks a little more cubic. This is from my results of playing with this using a CSPRNG for random number generation rather than a more predictable Mersinne Twister or other linear generative model for random numbers.

    Also if you increase the rounds and keep going you start to see a more step-wise pattern on the graphs.

    July 10, 2017 @ 6:43 pm

  44. Tomokazu says:

    Basically it would be normal, as the trials will be sum of random numbers, but as you do not allow negative values, the bankrupt people are removed from the next trials, and they will distort the distribution.

    # You can try this, for example, by using QQplot,

    NUMPLAYERS = 1000
    ROUNDS = 5000
    INITWEALTH = 100

    # After the trials, then
    qqnorm(bank[1000,])
    abline(100, 32)
    # would be almost normal. However, more trial will increase the bankrupt people, like
    qqnorm(bank[5000,])
    abline(94, 75)
    # the lower bend will make the graph ā€œJā€ shaped.

    July 10, 2017 @ 11:52 pm

  45. Max Kummerow says:

    Useful exercise, but why not build a model more like the real world:
    a) each family has to spend a minimum of C per capita to survive or, to complicate it a bit more, x% of income, Y, with x a decreasing function of Y. (the rich can spend enough to consume it all, the poor consume 100% of income or more)
    b) each family has different numbers of children (from say 1 to 12). And let’s let fertility norms be somewhat persistent across generations–say .6 correlation or some such. (Africans still have 5 kids, Europeans and Japanese are several generations into small families.
    c) Wealth accumulation is Y-C+R
    d) Returns on assets, R, are generally positive–say 2% per year times wealth to be conservative and long run (to account for boom and bust cycles).
    Now run that and you will find that wealth will all go to a few (the rich get richer and the poor have children). And, if we need a circular flow of income to keep consumption high enough to give returns on assets that produce consumption goods (ie most assets), then the economy will collapse when wealth distribution gets too skewed. This is the basic Keynesian insight, except that Keynes proposed only a short run solution–goose demand by deficit government spending. The long run solution is progressive taxes to maintain a stable income distribution over the long run.

    September 6, 2017 @ 12:32 am

  46. Max Kummerow says:

    Sorry, meant the rich cannot spend all their income so their wealth usually increases. The poor lose assets to bankruptcy when C>Y

    September 6, 2017 @ 12:34 am

RSS feed Comments

Write Comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>