
Counterintuitive problem: People in a room keep giving dollars to random others - aqsalose
http://www.decisionsciencenews.com/2017/06/19/counterintuitive-problem-everyone-room-keeps-giving-dollars-random-others-youll-never-guess-happens-next/
======
jordigh
This is an irreducible Markov chain (i.e. it's possible to go from any state
to any other with positive probability in a certain number of steps) on a
finite state space (because money never enters or leaves the system). This
means that every state is recurrent, i.e. will happen if you wait long enough.

This is the relevant theorem:

[https://math.stackexchange.com/questions/543051/markov-
chain...](https://math.stackexchange.com/questions/543051/markov-chain-closed-
finite-classes-are-recurrent)

This means you should eventually see each person hoard all of the money in
turn. Try it with 5 people and 5 dollars each. Then the system only has 29
choose 25 = 23751 states[1], which should give your computer enough time to
hit them all.

 _Edit_ : Here, Python "proof"

    
    
        from random import randint
    
        numpeople = 5
        initmoney = 5
    
        ledger = [initmoney]*numpeople
    
        while True:
    
            recipients = []
            for i in range(numpeople):
                if ledger[i] == 0:
                    recipient = None
                else:
                    recipient = randint(0, numpeople-2)
                    if recipient >= i:
                        recipient += 1
                recipients.append(recipient)
    
            for i, recipient in enumerate(recipients):
                if recipient is not None:
                    ledger[i] -= 1
                    ledger[recipient] += 1
    
            if max(ledger) == initmoney*numpeople - 1:
                print ledger
    
    

\----

[1]
[https://en.wikipedia.org/wiki/Stars_and_bars_(combinatorics)...](https://en.wikipedia.org/wiki/Stars_and_bars_\(combinatorics\)#Proofs_via_the_method_of_stars_and_bars)

~~~
Grue3
But there's no previous state that can result in one person (I'll name them X)
having all the money and everyone else having no money. There are 2 cases:

1) X had some money on the previous turn, giving a dollar to Y. Then Y has at
least 1 dollar.

2) X had no money on the previous turn. Then by pigeonhole principle there
exists a person Y who has at least 2 dollars. Then Y has at least 1 dollar on
the current turn.

~~~
jordigh
Oops, right. I'm counting the number of states wrong. But the general point
stands, you'll see everyone hit the maximum amount of money possible for one
individual.

~~~
subroutine
I wonder what their point is though? Like, are we supposed to be surprised
with the shape of the distribution?

Also, while I agree this is theoretically possible to "see everyone hit the
maximum amount of money possible for one individual"... given enough
individuals the possibility of someone ending up with nearly all the money is
close to zero. I've run a simulation with 500 individuals (here:
[https://github.com/subroutines/DollaBillz](https://github.com/subroutines/DollaBillz)
) and it seems like the distribution of money reaches a steady-state. What
should we make of that?

~~~
klipt
Think of it as "entropy mostly increases". It's theoretically possible that a
bowl of soup left to itself could become hot in one corner and cold everywhere
else, but it's vanishingly improbable compared to a mostly uniform temperature
distribution.

~~~
mulmen
I don't understand this example. Are you claiming the laws of thermodynamics
only work with a very high probability?

~~~
danharaj
The second law of thermodynamics is intrinsically a statistical law.

~~~
mulmen
I'm not a physicist and I probably could have phrased that a little better.
The example of a bowl of soup randomly and unevenly changing temperature
implies to me that the physical system behaves randomly which I do not believe
it does.

~~~
klipt
Entropy _can_ decrease, just with vanishingly small probability:
[https://en.wikipedia.org/wiki/Fluctuation_theorem](https://en.wikipedia.org/wiki/Fluctuation_theorem)

------
AnthonyMouse
This is not surprising. Random doesn't mean homogeneous. Notice that in this
model there are rich people and poor people, but advance many iterations and
the rich people aren't the _same_ people as they were.

If you want to see the real problem, don't let the people with no money get
away with not paying the dollar. Make them borrow it with interest from
someone with money.

~~~
summer_steven
Actually, without interest people would have no incentive to lend to others.
Any loan carries a risk of not getting your money back. If interest was
illegal then the rational move would be to never loan out any money.

~~~
AnthonyMouse
> If interest was illegal then the rational move would be to never loan out
> any money.

People would still lend money to their friends and family. Stores would extend
credit to customers because they want to make sales.

But regardless, how was that supposed to dispute any part of the post you
responded to?

~~~
wdewind
> Stores would extend credit to customers because they want to make sales.

Not GP but: much less credit would be extended because many stores wouldn't be
able to do much with bookings. One reason credit cards are so ubiquitous is
because they allow even tiny stores to take advantage of extending credit
without having to worry about all the stuff that comes with it (not getting
paid soon, fraud etc.). So yeah, sure, some people would still lend to close
friends and family, but in general the credit market would get orders of
magnitude smaller, and I don't think that's good for anyone.

> But regardless, how was that supposed to dispute any part of the post you
> responded to?

Again, not GP, but he is replying to your comment implying that access to
money at interest would make things worse for the lower class in this model
and that making that change would make it more realistic. It may make it worse
for the lower class in this model because you can't inflate the number of
dollars, but in real life there's a lot of good reasons to think credit
markets are extremely helpful for everyone, including the lower class.

~~~
skybrian
As a real-world example, there are workarounds used for banking by Muslims who
don't believe in ursury.

[https://en.m.wikipedia.org/wiki/Islamic_banking_and_finance](https://en.m.wikipedia.org/wiki/Islamic_banking_and_finance)

~~~
wdewind
Murabaha is largely a semantic hand wave that really doesn't fundamentally
differ from the credit/mortgage model we have. The lender makes profit,
frequently there are late fees, the government gets involved if the loan is
not repayed (with varying consequences based on the country), the underlying
asset gets seized etc. The major difference is that you don't call the profit
'interest.'

It's really basically just a way for Islamic countries to claim that they are
adhering to Sharia law while not being completely left in the dust because
credit is so completely vital to a modern economy.

~~~
qubex
These are different forms of _yield_ , which is a superset of _interest_ (as
are _windfall_ , zero-coupon bonds, _& cetera_).

------
jldugger
IMO, this reveals more about human intuition regarding randomness than
whatever financial point it purports to make. It's still a useful point
though.

Reminds me of the load balancing literature. There, the explicit goal is to
evenly divide the burden across your fleet of servers, and having wide
distributions is a problem on both ends: you're paying for servers to sit
idle, and some are over burdened and giving customers a bad experience (high
pageload times).

By way of illustration, I took the code and made a simple modification to it,
implementing power of 2 random choice
([http://www.eecs.harvard.edu/~michaelm/postscripts/tpds2001.p...](http://www.eecs.harvard.edu/~michaelm/postscripts/tpds2001.pdf)).

Here's the video result:
[https://www.youtube.com/watch?v=94Vc7gf3ONY](https://www.youtube.com/watch?v=94Vc7gf3ONY)
Much tighter distribution, though you need to be able to identify the size of
people's bank accounts. In this model, it's very rare for anyone to give the
richest anything, unless you magically choose two people randomly tied for
richest.

~~~
execoverride
What is happening here is fairly simple: Since each state in the system occurs
with the same probability, the distribution that arises is the one that
maximizes the entropy. Since the total amount of money is conserved, this
means that the mean of the distribution is fixed. The maximum entropy
distribution in this case has a geometric shape, which is skewed:

[https://en.wikipedia.org/wiki/Maximum_entropy_probability_di...](https://en.wikipedia.org/wiki/Maximum_entropy_probability_distribution#Discrete_distributions_with_specified_mean)

~~~
pishpash
Yep, it's just a simple counting argument, you see the distribution that has
exponentially more states than any other, subject to constraints.
Specifically, you are allowing the range [0,∞). If you had constrained it to a
fixed range of money (e.g. there is corrective feedback when you get too much
money), then you would have seen a more uniform distribution.

------
pontus
As others have noted, every state in the state space will eventually be
explored and so the appearance of convergence is a little misleading.
Eventually the richest person will lose all the money and someone else will
take that place.

An interesting question is why we happen to see the system in such an unequal
state when we look at it after e.g. 10000 iterations. The reason for this, I
believe, is entropy. There are just vastly more ways to distribute the money
unequally than equally (thinking of these as macro states). For example, there
is only one (macro) state where everyone has $100, but there are 100! states
where the money is distributed in a perfectly unequal way (e.g. 0, 1, 2, ...,
99, 5050 or any other way where all the people can be distinguished). So, if
you randomly peek at the system at any given time it'd be very unlikely that
you'd see it in any way other than a highly unequal state. To be fair, this
argument neglects the dynamics (perhaps the transition probabilities to those
states are sufficiently small that the n! multiplicity is watered down,
although I suspect this is not the case.)

~~~
pishpash
In this simulation, the amount of money you have does not affect how much you
have to give away per round (until you get to $0, in which case you give away
nothing) or how much you will get per round (until some people get to $0, in
which case the money you get is less on average). So in most cases, with
whatever you have, you are expected to see a gain distribution with zero mean.
Since it's not a self correcting process other than at the $0 end, it's not
surprising to see (1) a snapshot with uneven distribution, (2) no one dropping
out permanently.

Actually I don't know what is the point they are trying to make with this
video. There is neither anything surprising in the general sense nor a solid
statement about what is specifically seen.

~~~
k__
How would it change if it was 1% instead of $1?

~~~
azza2110
I just ran it at 1% instead of $1.

On only 5% of days was the spread greater than 80 -> 120.

~~~
lou1306
I went a little further and ran a simulation [^1] with random payments in the
range from $1 to a fixed percentage of the payer's wealth.

When this percentage is in the range 2-10%, the wealth inequality is
significantly smaller than in the base case (i.e. all payments are $1). Then
it starts growing again.

[^1]:
[https://gist.github.com/lou1306/1041ed6cd4eed433cfabf45f666b...](https://gist.github.com/lou1306/1041ed6cd4eed433cfabf45f666bf298)

------
nabla9
For each person its' random walk.

Dollars received is additive process of 99 independent random variables from
[0,1].

Dollars given is -1 or 0 if there is none.

The process has memory because givers can run out of money.

~~~
arnioxux
I think this is the correct way to model it. In particular you can model it as
a markov chain (commonly studied in queueing theory):

[https://en.wikipedia.org/wiki/Birth%E2%80%93death_process#/m...](https://en.wikipedia.org/wiki/Birth%E2%80%93death_process#/media/File:BD-
proces.png)

------
detaro
Worth reading the comments under the post – e.g. people testing it and seeing
that values for individual people go from 0 to very high and back over time,
which you can't see in the histogram.

~~~
Dove
Happens in real life, too. The income level of the top 10% and the top 1% and
the top 0.1% are relatively stable in aggregate, but who is _in_ each of those
categories changes drastically over time.

~~~
lozenge
Who is in the top 1% changes drastically over time, but it is still mostly
people who were born in the top 40% or so. For example, see this chart -
[https://www.economist.com/news/united-
states/21595437-americ...](https://www.economist.com/news/united-
states/21595437-america-no-less-socially-mobile-it-was-generation-ago-
mobility-measured)

Or for example -

> Studies by the Urban Institute and the US Treasury have both found that
> about half of the families who start in either the top or the bottom
> quintile of the income distribution are still there after a decade, and that
> only 3 to 6 percent rise from bottom to top or fall from top to bottom. -
> [https://en.wikipedia.org/wiki/Socio-
> economic_mobility_in_the...](https://en.wikipedia.org/wiki/Socio-
> economic_mobility_in_the_United_States#cite_note-debate-34)

Now, you could look at how people/families move around the distribution over
longer timescales (multiple generations) but we don't really have the data
yet.

~~~
lotharbot
IMO, 3-6% moving all the way from bottom to top or top to bottom is actually
quite good. I'd be extremely concerned if it was 20%, as that would imply the
system was nearly random. I'd also be concerned if it was 0%, as that would
imply the system was static. 3-6% implies there is mobility, but it takes both
hard work and luck to make it all the way from bottom to top.

Likewise, half of families staying in either end quintile also seems healthy
to me -- it implies half of families leave those quintiles, too.

In an ideal world, what range would you like to see for those numbers?

------
scottmsul
This kind of simulation results in an exponential distribution, which is
fairly equal compared all things considered. In an exponential distribution,
most people have roughly the same order of magnitude of wealth (10s to 100s of
dollars). In real life, the bottom 99% follow an exponential distribution
pretty closely, while the 1% follow a pareto distribution, which is WAY More
unequal. The transition is very sharp too, and has been studied in
econophysics models.

Brief introduction to econophysics for the mathematically inclined:
[https://arxiv.org/abs/0709.3662](https://arxiv.org/abs/0709.3662)

------
dmurray
If you have $1, you have to give it away, but you receive less than $1 back on
average (because some people have no money to give you). So the poor get
poorer. But wait, by the same argument the rich get poorer and this simulates
a system of stochastic handouts to the very poorest - those with $0.

Alternatively, it simulates a lottery. From the point of view of any
individual, every turn you spend $1 on a lottery ticket and get a prize of
between 0 and $99. Viewed that way, it's not surprising that some people end
up rich in the simulation.

~~~
IshKebab
The poor have an advantage under this system - they always have an equal
change of receiving money but sometimes they don't have to pay any.

~~~
rtpg
Considering that in order to get this advantage you have to at one point end
up with $0, it seems like a bit of a phyrric victory

~~~
cwp
Not at all. If you want to become wealthy, being broke is way better than
being in debt.

~~~
rtpg
If you know you'll either be broke or in debt, sure. But the alternative is
making sure nobody's broke

------
Falkon1313
This is a bit too "spherical cow in a vacuum" for my tastes. As a quick
experiment, I included population growth (using average population growth rate
of the US over the last 50 years) and GDP growth (again using US average for
last 50 years). Assumptions being that new population start with $0 and GDP
growth applies equally to all as a percentage of their then-current wealth. It
substantially enhanced the inequality.

In the simple run, median/mean was 67%, but with compounded growth it was only
7.9%. Moreover, the standard deviation went from 1.31 times the median (87% of
the mean) to 17.83 times the median (141% of the mean).

[https://gist.github.com/anonymous/4f6c546a776a8ab142235c8617...](https://gist.github.com/anonymous/4f6c546a776a8ab142235c861738a5bb)

Wonder what it would be like taken further - forcing population that have $0
to take a loan from the wealthiest people and pay them interest.

~~~
kirillseva
without any cap it doesn't look fun for the unlucky person. Take a look at my
other comments on this thread, there's a link to a gist that generates an
animation with the same starting conditions as OP, but forcing the person with
$0 to borrow and introducing an interest rate of 10%. At some point the system
destabilizes and the debt of the unlucky person goes out of control.

TIL what an economic crisis is and how it happens

------
hedora
This reminds me of "power of two" balls and bins, which is useful for load
balancing. Throwing work onto a random machine doesn't work well. Picking two
random machines, and throwing the work on to the less loaded machine is
asymptotically better.

I think you'd see something very similar with this type of simulation.

~~~
SlySherZ
I've tried this and the distribution stays pretty close to constant. You can
check it out, just comment line 13 and uncomment 15-18:
[https://www.khanacademy.org/computer-programming/yet-
another...](https://www.khanacademy.org/computer-programming/yet-another-
maths-game/6013127420084224)

------
dmayle
The only reason why anyone might find this surprising or counterintuitive is
that they're using a terrible visualization. Dollars should be on the x-axis,
and number of people should be on the y-axis. If you had that, you'd see this
slowly converge to a standard distribution (bell curve).

------
colanderman
Of course it's not uniform. The number of dollars handed to any given person
each tick is a random variable drawn from some distribution (too tired to
think of which right now). An individual's final worth will probably be
selected from some sort of Gaussian, due to the trials being repeated and
summed.

Question is, why did they have to hide the solution in a _video_? Are we
allergic to static images and written text now?

~~~
bmelton
I'm usually opposed to video evidence, but in this case, I think the video was
an especially good means of illustrating the aggregation of resources to the
right in a way that a series of static images would not have captured.

A d3 animation might have done the job just as effectively, but depending on
the author's skills, might have taken a very long time to create,
comparatively.

------
js8
A similar simulation from Peter Norvig (was also on HN):
[http://nbviewer.jupyter.org/url/norvig.com/ipython/Economics...](http://nbviewer.jupyter.org/url/norvig.com/ipython/Economics.ipynb)

------
dbatten
I fundamentally disagree that the resulting distribution isn't more or less
equal. It's basically randomly distributed around 45, with a pretty small
standard deviation to boot...

~~~
jldugger
Of course it's randomly distributed around 45 -- conservation of money at work
there.

As for the std deviation, the normal rule of thumb is "95 percent of samples
fall within 2 std deviations". So basically, all but the highest and lowest.
Well maybe two highest, because of the 0 dollar lower bound. A standard
deviation of half your starting pool seems pretty high, even if we all have
equal chances of being at the far end of the spectrum of results.

------
petermcneeley
This problem lead to the discovery of Quantum physics. Simply replace the $1
with energy quantums.

[https://www.youtube.com/watch?v=SCUnoxJ5pho&feature=youtu.be...](https://www.youtube.com/watch?v=SCUnoxJ5pho&feature=youtu.be&list=PL193BC0532FE7B02C&t=239)

~~~
Nydhal
The difference I see, is that in the OP game every player is guaranteed to
give out $1 at each step, while in the video, a player is chosen at random to
give out $1. I don't know how this might change the long-term distribution.

~~~
petermcneeley
Insightful point, especially considering what the difference might mean on the
physics side. Aka a time evolved system of uniformly every particle that has
energy donating some energy to another random particle vs random particle
donating energy to another random particle.

------
kirillseva
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.

Check out the source and the produced animation here:
[https://gist.github.com/kirillseva/961fa1f5b5d64254e0117caf1...](https://gist.github.com/kirillseva/961fa1f5b5d64254e0117caf11b64b27)

~~~
kirillseva
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

edit(formatting)

~~~
e12e
> everybody's cash goes to zero on step 1008

Surely not in the highly improbable case of everyone starting with 1 dollar,
giving money to someone else in a chain that leads back to themselves?
Theoretically such a system could continue indefinitely? (a gives to b gives
to c gives to.... a)?

~~~
kirillseva
correct, if we sample without replacement here
[https://gist.github.com/kirillseva/961fa1f5b5d64254e0117caf1...](https://gist.github.com/kirillseva/961fa1f5b5d64254e0117caf11b64b27#file-
simulation-r-L18)

then we'd indeed have a balanced situation where everybody keeps their initial
balance. However, we do sample with replacement, and at some point a lucky
winner is going to start hoarding cash. Until such time when no one has cash
to pay the winner, and he's ultrawealthy... on paper

------
nsnick
We see this result because as a percentage of their total wealth, the poor are
giving away a larger portion. Try this experiment again, but instead of having
everyone give $1 to a random person, have everyone give 1% to a random person.

------
daddyo
High school diploma solution:

There are increasingly more ways to distribute wealth unevenly, than evenly.

Reduce the problem to the simplest case of 3 persons: `a`, `b`, and `c`.
Person `a` has decision to give to either `b` or `c`. Then use combinatorics:

    
    
        from itertools import product
    
        decisions_a = ['ab', 'ac']
        decisions_b = ['ba', 'bc'] 
        decisions_c = ['ca', 'cb']
    
        for combination in product(decisions_a, decisions_b, decisions_c):
            print combination
    
        >>> ('ab', 'ba', 'ca') # uneven
        >>> ('ab', 'ba', 'cb') # uneven
        >>> ('ab', 'bc', 'ca') # even
        >>> ('ab', 'bc', 'cb') # uneven
        >>> ('ac', 'ba', 'ca') # uneven
        >>> ('ac', 'ba', 'cb') # even
        >>> ('ac', 'bc', 'ca') # uneven
        >>> ('ac', 'bc', 'cb') # uneven

------
dskloet
I would have expected them to follow Zipf's law.

[https://en.wikipedia.org/wiki/Zipf%27s_law](https://en.wikipedia.org/wiki/Zipf%27s_law)

Vsauce made a video about it:
[https://www.youtube.com/watch?v=fCn8zs912OE](https://www.youtube.com/watch?v=fCn8zs912OE)

~~~
jonahrd
Is this a case of Zipf's law? It looks like it to me, can someone confirm?

~~~
pluma
Not quite. It looks pretty exponential but the highest value is not twice the
second-highest value (and so on).

------
ivoras
So I've repeated the experimental model. Yes, if at each step everyone gives
$1 to a random person, the same thing happens as in the article:
[https://www.youtube.com/watch?v=Hu0vcn_-
vX4](https://www.youtube.com/watch?v=Hu0vcn_-vX4) .

If, instead, at each step, everyone gives 1% of their currently held amount,
this happens:
[https://www.youtube.com/watch?v=N8Ce3eQTA9c](https://www.youtube.com/watch?v=N8Ce3eQTA9c)
.

The results are radically different. Draw your own conclusions.

------
kazinator
Intuitively, I would expect that we can collapse the result of doing this type
of dollar scrambling over many iterations of the simulation into a single
operation which takes a sequence of dollars and partitions it into N randomly-
sized partitions for N people.

For instance, we can arrange the dollars into a sequence and then insert N-1
randomly-placed divisions to chop up the sequence. Then each of N people in
the corresponding people sequence gets their corresponding (possibly empty)
piece of the dollar sequence.

If we distribute randomly placed chops into section of the real number line,
we end up with string lengths that follow an exponential distribution:
[https://en.wikipedia.org/wiki/Exponential_distribution](https://en.wikipedia.org/wiki/Exponential_distribution)

It is not intuitive at all to expect the pieces to be more or less identically
long (which corresponds to the wrong intuition that everyone will have more or
less their equal share of the dollars). That would mean that the chops are
evenly spaced and not random.

Randomly placing chops is a
[https://en.wikipedia.org/wiki/Poisson_process](https://en.wikipedia.org/wiki/Poisson_process)

However, part of the intuition here (possibly wrong) is that Poisson is
applicable to a crudely discrete process like this, in some approximate way.

------
daveFNbuck
Because expectation is linear and the total amount of money in play never
changes, we know that the sum of the expectations for each player over a given
turn is equal to 0. If no players have run out of money, this means that the
expected change for each player over a single turn is zero.

If instead we have m players with money and b broke players, each player still
has an equal expected number of dollars received, and the m players with money
each expect to give 1 dollar. Summing this, we have a total expected change of
(m + b)E(received) - m, which must equal zero, meaning E(Received) = m/(m +
b), so players with money expect a change of -b/(m+b) and players without
money expect a change of m/(m+b).

This tells us that the expectation for a turn is basically always zero and
never gets above zero in a way that allows accumulation of wealth for a single
player. So over long periods of time we should expect this to look like a
drunk walk with a weird distribution.

------
anigbrowl
I don't have R installed and don't want to spend the rest of teh day setting
up packages and trying to get animations underway, but I'd like to explore two
other scenarios:

a. Same rules (100 people, 100 dollars), but everyone has to give away 1% of
their wealth instead of $1 each round.

b. Same rules as the original, but anyone who has $0 at the end of a round
'dies' and is no longer able to participate.

We have simulation games like Simcity, Civilization, the Sims and so on. I
wonder why there aren't better economic simulation games. I know of various
academic tools but I mean _games_ that would be accessible and enjoyable for
consumers while also allowing them to easily explore simulation spaces. You
can mess around with tax policy in simCity type games, for example, but it's
really primitive. Academic economic simulation tools tend not to be very
engaging (since they're not built to entertain) and also have ugly visuals and
user interfaces.

~~~
plouffy
Don't need any simulations to tell you what (b) would look like. Over the long
run, you would be left with only 2 players since everyone else would
eventually die out.

------
abalone
I'm not saying I'm smarter than your average PhD but it seemed intuitive that
it would concentrate wealth, basically because you can only give out 1 dollar
per round even if you have >1 dollars.

Having said that I would not draw too much inference about economics and human
society from this. There is no such "1 dollar per round" rule in life.

~~~
robotresearcher
It does not stably concentrate wealth. It does create short-term inequality of
wealth. Every player will be the richest at some point if you play long
enough.

------
curiousgeorgio
This model essentially represents an economy wherein every person spends
exactly what they make, and in the real world, there are plenty of people who
behave that way (at every position on the wealth spectrum).

However, it also ignores the fact that for the most part, people are _not_
forced to live that way. Sure, there's a certain minimum cost associated with
simply staying alive, but there's also tremendous potential for people to save
and/or invest (a portion of) their money rather than spend it, which in turn
may increase their likelihood of being on the receiving end of other people's
"random" expenses. It also ignores the fact that for every dollar spent in
this economy, we can assume that a dollar of value is received in return. If a
person spends a dollar truly randomly (or frivolously), then that expense has
an opportunity cost, and in many cases (above a baseline for basic living
expenses), that dollar would be better spent/invested in activities that will
increase the person's future money-making power.

I suppose if all those points were included in the model, we'd probably see
even more inequality in the wealth distribution at the top end, but on the
middle-to-low end, there's no reason it couldn't be much flatter; when people
fall on hard times (as all will eventually), they can make the difficult-but-
necessary decision to spend less than they make, thereby slowing or reversing
any downward trend. Philanthropic activity would also help the unlucky few on
the extreme lower edge of the distribution to bounce back quickly.

Of course, the real problem in this scenario is that we should never
underestimate the number of people who _just don 't care_ \- or those who
spend their money more "randomly" than not, with little concern for the
future. Those are the same people who later on will be lining the streets
protesting about how "unfair" the system is when they're finally broke.

------
RodgerTheGreat
I whipped up an interactive simulation of this effect in K:

[http://johnearnest.github.io/ok/ike/ike.html?gist=f974a638c4...](http://johnearnest.github.io/ok/ike/ike.html?gist=f974a638c484cbaa810bdf98c65c4951)

Source, for the curious:

    
    
        p: 72                                       / players
        s: p#100                                    / score
        c: {(+/(!#x)=/:(+/t)?#x)-t:0<x}             / change (per round)
        
        b: {[c;p;y;x](p+0,2*y;;x#c)}                / draw bar (color;pos;y;x)
        g: {x'[!#y;_60*y%|/y]}                      / draw graph (bar;data)
        
        tick: {{s+::c s}'!20}                       / iterate several steps/frame
        draw: {g[b[3;10 10];s@<s],g[b[2;90 10];s]}  / graph sorted, raw value

~~~
froggerplayer
I'm the author of the blog post OP points to. I'm impressed and intrigued what
you've done here. Want to learn more about K.

~~~
RodgerTheGreat
As a brief summary, K is what's called a "vector-oriented" language;
functional, very concise, naturally parallel. The canonical implementation(s)
of K are commercial products sold by Kx Systems, and offer extremely high
performance. I personally maintain an open-source clone implemented in
JavaScript which is comparatively quite slow but is suitable for tinkering and
prototyping.

The above program was implemented in iKe, a browser-based livecoding
environment I built on top of my interpreter:

[https://github.com/JohnEarnest/ok/tree/gh-
pages/ike](https://github.com/JohnEarnest/ok/tree/gh-pages/ike)

The concision and flexibility of K is a huge boon for this kind of interactive
development. I wrote my simulation in a few minutes, and most of that time was
spent deciding how I wanted to draw my histograms.

If you have any more specific questions I'd be happy to try to answer them.

------
xrd
I don't understand the math here. But, it seems people are saying there is
equal probability that any state can arise. Is that correct? If so, I'm
unclear why that's true given that the state where one person has all the
dollars seems like it can only arise from a much smaller set of states (where
only one person, and there would be 99 options, had one dollar and one person
had all the rest). In comparison, wouldn't there be lots of times when the
next state (say where all the people had similar amounts of money) would be
easier to get to from multiple states. I'm saying it simplistically seems like
the extreme states are harder to get to than the "middle" states. Is than an
erroneous assumption? Is there some technique I can use to reason about this
problem in a different way?

------
Zeebrommer
Interesting phenomenon! To me it makes intuitive sense when viewed as a
uniform distribution of money between 0 and ~$100. Bottom graph approaching
linear.

In that light these kinds of posts can be a bit disappointing: "here, have a
simulation to prove the phenomenon". Yes but how does this work in general? As
others have noted, is it stable over time? Which factors play a role in the
speed of convergence? What if one introduces tax per transaction, giving the
returns to the poorest? What would be a fair percentage?

------
jwfxpr
Very interesting. I'd like to see this simulation run with different
(pseudo-)RNGs. I wonder if and how the quality of the randomness impacts the
outcome.

Can anyone with insight offer comment?

~~~
lmkg
I doubt the PRNG will have an effect, unless it's a bad one. For any
individual, the flow out is fixed at 1 dollar per round, but the flow in is
unbounded. This favors wealth accumulation. If five people happen to select
the same donor target, that person will take five rounds to get rid of that
money, during which time they are likely to receive more.

Meanwhile if someone only has one dollar, they lose their entire wealth if no
one targets them immediately. Only large amounts have staying power.

There is a second-order effect that as money becomes more concentrated there
are less donations per round. If one person has five dollars, four dollars are
not being donated. This makes being targeted for multiple donations less
likely as time goes on.

~~~
Retric
If you run this for very long time frames everyone should end up both broke
and wealthy. It's basically just several bounded random walks which will
diverge in both directions and then flip around.

And really this is just another case where random does not seem random to us.

~~~
jordigh
I want to believe that this is true because there are no absorbing states, but
it could be false. Let's not forget Pólya's theorem: random walks on integer
lattices are recurrent at dimension 1 and 2 (always come back to the origin)
and transient in any higher dimension (eventually never come back).

But the number of states for the wealth distribution problem isn't infinite,
hm, because the total amount of money never changes. Yeah, I think I just
convinced myself that you may be right, no state is absorbent so they must all
be positive recurrent.

Maybe that's how we can restore our intuition on this problem. Everyone should
be wealthy and poor, but it may take very long time to see the wealth flip
around. While we wait for that to happen, we'll see gross wealth inequality.

~~~
age_bronze
The finite states argument feels kind of wrong. You're usually interested in
the general behavior for n people, and the number of states is exponential in
n, which means that you need time exponential in n to repeat yourself. What
you're seeing here is the early behavior of the system. Your arguments is a
bit like saying every computer is actually a finite state machine, because of
the finite memory it's going to repeat itself eventually. The argument is
fundamentally flawed because you inflated one part of the question (time of
running the question) while keeping the more significant part (number of
particiants) fixed.

------
100ideas
More interesting: "wealthier" person gives 1/2 their wealth to "poorer" person
every turn.

Probably looks like Boltzman distribution describing velocity of ideal gas.

------
lohankin
Let's consider a different problem. There are 100 non-negative numbers summing
up to 10000. Let's choose a random combination of numbers satisfying this
condition. Intuitively, it's quite clear that typical case will be very
different from equilibrium (where every number=100). I fail to see how the
transfer of 1 dollar at a time is qualitatively different. So the result is
quite intuitive - contrary to what the article suggests.

~~~
recursive
A random distribution of points in a circle is different from a set of points
calculated by using a random angle and distance from the center, even though
they're both "random". How you construct your randomness is significant.

------
subroutine
I've coded this sim (ml/octave) if anyone wants to play around with other
numbers (number of people, starting amount of dollars):

[https://github.com/subroutines/DollaBillz/](https://github.com/subroutines/DollaBillz/)

The writeup there includes a clip simulating 500 people (each starting with
100 dollars) and some distribution fits.

------
pavlov
The outcome looks suspiciously like the real-world wealth distributions that
we presume to be the result of efficient free markets.

Is capitalism mostly noise?

~~~
lou1306
Except that, in the real-world, wealthy people will spend more money than the
poor. I wonder what we outcume would be if each agent spends a random amount
of money that depends on their current wealth (say, anything between $1 and 5%
of the total).

~~~
neilwilson
Another illusion. A millionaire always spends less than a million people with
a dollar.

~~~
lou1306
True, but typically he will spend more than _one_ single person with a dollar.

I created a gist
([https://gist.github.com/lou1306/1041ed6cd4eed433cfabf45f666b...](https://gist.github.com/lou1306/1041ed6cd4eed433cfabf45f666bf298))
to try and prove my point a little better: when people are only allowed to pay
$1 to one another, the resulting distribution is quite unfair (as shown in the
original post). However, when payments can be as big as, say, 2-10% of the
player's wealth, there is a noticeable decrease in the Gini coefficient.

------
nullc
I believe happens because the states where everyone has close to the same
amount of money have lower entropy e.g. there is only 1 state where everyone
has equal money, but there are by far more states where the funds are
exponentially distributed.

If it makes you feel better, in this model eventually everyone will spend time
as both rich and poor... probably not so much like the real world. :)

------
phatoni
Given the uneven distribution of wealth being more likely then an even
distribution of wealth per tick. If you now add the rule that someone having
less than $100 is unhappy and someone having at least $100 is happy you end up
with lower overall happiness on average compared to the initial state were
erveyone has $100 and would be happy with that.

------
adrianmonk
Lots of complicated explanations why this doesn't strongly tend toward being
very even. Here's my attempt to state it simply.

Every round, each person (except those who are broke) definitely gives away
$1. They may or may not get a dollar. They might even get more than a dollar.

So it's not surprising that some get a bit ahead and others fall a bit behind.

------
usaphp
> gives a dollar to one randomly chosen other person

I wonder is the person randomly chosen by the machine or is it randomly chosen
by the person who gives away the dollar? If it's the second case - I wonder
how much does personal attraction matters here. Unconsciously you would want
to give something to a person who you find more attractive...

~~~
wungsten
I'd like to see you try programming a simulation with that in mind :)

------
gus_massa
> _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._

Mmm ... What kind of PhD did they ask? Mathematicians have a strong bias for
exact solutions, and not too much intuition for this kind of problems. Have
they tried asking Physicists?

It's not surprising that the distribution is not even. I expect that the
spread increase in time. I guess something like

average + k1 * sqrt(t) * erf((n- middle) * k2)

where t is the number of simulation steps, and k1 and k2 are some magic
constants that I'm too lazy to estimate. ("Proof": Everything is a Gaussian.)

I was surprised that at some point the distribution was almost linear. Perhaps
k2 is not a constant, and the correct guesss of the estimation is

average + k1 * sqrt(t) * erf((n- middle) * sqrt(t) * k2')

This estimation fails when t is big. (And it's probably incorrect anyway.)

After some time the person with more money apparently starts to increase the
amount of money. I'd like to see a longer simulation to see if after some time
the first one accumulates most of the money.

~~~
jordigh
We mathematicians have as much intuition as anyone else. I think of this as a
random walk on a very large but finite state space with positive n-step
transition probabilities between all states for all large enough n. It's an
aperiodic irreducible Markov chain. So we should have ergodicity. My intuition
now tells me that this means every state is positive recurrent, i.e. for each
person _x_ should see _x_ hoard all of the money at some step. Given enough
time, a _very_ long time, we should see everyone eventually have all of the
money and eventually have none of it. The intermediate steps may look very
skewed, but we should see all steps happen.

I'm a bit wary about concluding that just because there's positive probability
between all states that we should see all states. At least for infinite state
spaces, we know this fails (Pólya's theorem on random walks in dimension 3 or
higher). But my intuition tells me that the finite state space should mean
that all states are positive recurrent.

Edit: Aha, here's the relevant theorem which confirms my intuition: in a
finite-state Markov chain, every closed class is recurrent:

[https://math.stackexchange.com/questions/543051/markov-
chain...](https://math.stackexchange.com/questions/543051/markov-chain-closed-
finite-classes-are-recurrent)

Untangling the jargon, if you have a random process in which you can go from
any state to any other state with positive probability after a certain number
of steps, and there are only finitely many states, then the probability of
getting to any state as the number of steps goes to infinity is 1.

~~~
gus_massa
I'm a Mathematician too (+ 1/2 Physicist).

In spite all the states have a probability 1 to be reached infinitely many
times, the frequency of each kind of state in the chain is not equal. Some
states will have a much higher frequency than the others.

In this case, the states where everyone has a number of coins that is between
average-2 and average+2 will be extremely infrequent. They will be reached,
but you probably have to wait a lot of time to see them.

But there will be some family of cases that appear very frequently after
enough time. I'm not sure if the most common case is

1) Some of the persons has 99% of the money and the rest have a tiny amount of
money

2) A few persons have almost all the money.

3) There is some kind of heavy tail distribution were everyone is expected to
have some money. If you order them by money you will see something like a
wiggly line.

I vote for 1), but I'm not sure at all.

This is similar to the typical thermodynamics problems. Imagine that you have
100 boxes in a line, were you can distribute 100000 "atoms" (or coins). In
each step the coins can go to neighbor box at random. This is not the same
problem, so it has a different solution.

But it's also ergodic and you can see all kind of weird distribution of the
coins/atoms if toy wait enough time.

If you wait enough time you can see for example that all the coins/atom went
to the leftmost box and all the other are empty. But this is not common at
all.

Most of the time all the boxes will have a number of coins/atoms that is close
to the average. (Not exactly the average obviously.)

But this is a different problem with the same state space (100 boxes/persons,
10000 atoms/coins). The rules in the Markov chain are different, so the
expected frequency of the states is different.

In the thermodynamic problem, the most frequent states are when the atoms are
almost evenly distributed. In the problem of the article, I suspect that the
most frequent state is when someone has almost all the money.

------
kharms
I love this! If I had to ELIA5 it, I would say: if you get lucky you get rich
quickly. If you get unlucky you get poor slowly. So some people will get lucky
and some will get unlucky, but the first to get unlucky will get below 100 and
the first to get lucky will get above 100, explaining the initial behavior.

~~~
tootie
Put another way, the key is that for n people and n dollars, you can receive
up to n-1 dollars in a given turn, but you can only ever lose 1. Therefore,
whoever is lucky early will accumulate faster than they can distribute.

------
unoti
The lack of money "accumulates" because you always have a chance to _receive_
money, but when you run out of money you cannot give more. So there is a lower
cap but no more upper cap.

In the real world this is even worse. Once you're out of money your chances of
getting money go down drastically.

~~~
Piccollo
What would happen if there was an upper cap?

------
rayiner
> How does the distribution look? Play the movie above to see.

How about I don't play the movie, and you use these magic things called
"words" that let you describe experimental results. Maybe we can call these
descriptions "abstracts" and put them at the beginning of articles.

~~~
albertgoeswoof
Yea you tell 'em cowboy! Yeeeeee haw!!!

------
chrisallick
I don't see why it's counterintuitive. If we know that "random" distribution
will place values on a curve, then why would it not follow that the money
would distribute this way and lead to inequality.

But I like the article! Excited to share to students.

------
raldi
I don't understand the video -- with 45 players, wouldn't one have $89 after
round 1? But that's not what we see -- it takes hundreds of rounds before the
first person breaks $80.

~~~
Klathmon
Each person chooses the person they give their dollar to independently.

It's not one chosen person getting all the money from that round.

------
qubex
I guessed an exponential distribution of wealth right after the problem was
posed. Apparently years of crying hot tears over agent-based economic
simulations served my intuition well.

------
lngnmn
"Dollar studies" is perhaps the second bullshitest part of psychology after
"infant-looking-times studies".

Artificial cartoon-like setups and biased interpretations cannot be considered
scientific or even accurate.

Babies are merely confused and overwhelmed, dollar studies are over-simplified
and sterile and does not take complex emotional and hormonal patterns (which
are much more powerful than rationality biological driving forces in real
life) into account.

Snap-judgements, jumping to conclusions, escaping from emotional pressure and
reduction of cognitive load is what derives people's behavior. Any sales or ad
professional would confirm this.

------
amelius
Now invent a tax rule that brings back the equality. And simulate it.

And then simulate how this tax rule works in a capitalist market model.

I'm curious.

~~~
qubex
You're missing a subtle point: not only is the distribution exponential, but
also as time progresses various agents exchange their positions in top and
bottom categories. So if one introduced a taxation system that redistributed
equality to create a uniform distribution, you would also enforce utter social
immobility. I doubt that is desirable (basically you'd be recreating the
drabbest kind of communist regime known to mankind).

------
ineedasername
Hmm, I ran a few trillion cycles of this and got nowhere: the average never
changed at all. :)

------
IshKebab
Without the 0 cut-off it's just the binomial distribution.

~~~
MrQuincle
No, you can receive more than you give away as well. So it's not binomial in
two ways. :-)

It's really cool though to have a skewed distribution at each time step and a
uniform distribution over the entire time series.

It's not exactly the same as just being ergodic. The probability that the
distribution is uniform at a particular time step is very small.

------
jancsika
This restatement of the problem might help:

"Imagine a room full of 100 people with 100 dollars each. With every tick of
the clock, the set of people with money each give a dollar to one randomly
chosen other person. The set of people with zero dollars simply _lose the
opportunity to give away a dollar_ and thus _decrease_ the overall chances
that any participant will receive a dollar. After some time progresses, how
will the money be distributed?"

To me this now seems intuitively obvious. Since the game creator has declared
by fiat that the number "0" gets a special branch in the program, it stands to
reason that the resulting distribution will change once any participant hits
zero and triggers that code-path.

For example-- suppose you start with game with one person who has $10,000 and
the remaining 99 people have zero. (I don't think you can arrive at that state
game organically, but it doesn't matter for the point I'm making.) The first
tick through the game all that happens is that the ten-thousandaire gives one
dollar to one marginally lucky participant while the other 99 do-- nothing at
all. Essentially the 99 all begin by losing a turn.

E.g., imagine an implementation where each tick loops through the participants
and the ten-thousandaire happens to be the first participant. If you are the
last in line, the _only_ opportunity you have to collect a dollar is when the
ten-thousandaire gives away a dollar on the very first iteration of the loop.
For the rest of the 99 iterations of the loop you have exactly 0% chance of
receiving a dollar. That means on the first tick you and all the other zero-
aires would have 1 in 99 chance of receiving a dollar. If on the other hand
you started out with everyone having a dollar you would have [some immensely
larger chance of receiving a dollar that someone who isn't lazy like me can
probably calculate here].

But it's actually worse on the first tick of this example for the ten-
thousandaire. _That_ player has a 100% chance of losing a dollar and a 0%
chance of gaining one.

I believe this "problem" essentially describes the conditions of an economic
depression. It's also a bit of a visual/conceptual illusion because we're
likely to look at that chart and see accumulation of dollars as "winning" and
zeros as "losing". But if you instead measure liquidity it should be clear
that those who accumulated dollars suffer decreased liquidity even worse than
the zero-aires.

Also if you remove the special case for zero then the intuition about "more or
less equal" distribution should be true.

Edit: change "lose a turn" to "lose the opportunity to give away a dollar" to
guard against pedantry. Also, changed "tick/turn" to "tick".

------
Kenji
> You’ll never guess what happens next.

One of the most annoying and overused phrases in the universe.

------
hasenj
I wonder what would happen if every 20 or so rounds, each player is given a
new set of dollars (say 5 dollars), to sort of simulate UBI.

------
Cosmopolitan
It is not randomly chosen by the person who gives away the dollar. Personal
attraction matters here. Unconsciously you would want to give something to a
person who you find more attractive.

~~~
PhasmaFelis
...We're not talking about actual people in an actual room with actual
dollars.

------
whatnotests
Wait wait wait wait.

You mean we don't naturally end up with 1% of the people having 99% of the
dollars??

------
curiousgal
Since people are incapable of making truly random decisions, I reckon the
person with the most pleasing physical appearance will receive most of the
money.

~~~
chki
You should probably read the article, because there are no actual people
involved.

~~~
snakeboy
I think it was a joke and not a failure to read the article. Still not
contributing to discussion though.

------
dracodoc
The policy is not symmetric:

1\. everybody need to give 1, but may receive 0 (99/100 probability) or 1
(1/100 probability)

2\. when somebody run out of money, the total give out is no longer 100
(before this, 100 changed hand in every tick), and the probability of
receiving money also changed.

So this is history dependent. The simulation need to run many rounds then
compare the results of all rounds.

~~~
pimlottc
Afaict it is possible to get a dollar from multiple players during a round.

