A Money Swapping Curiosity

In summary, the conversation discusses a hypothetical scenario where a coin toss game is played among a group of people, with the loser giving a dollar to the winner. The speaker created a computer program to simulate this situation and is interested in determining the number of people who will have zero dollars at the equilibrium state. They also make observations about the distribution of money and its relation to statistical thermodynamics and entropy. Ultimately, it is determined that at equilibrium, the number of people with zero dollars will be one less than the total number of people in the game. The conversation also touches on the concept of an infinite game and the probability of players losing all their money.
  • #1
kairama15
31
0
TL;DR Summary
Interesting things happen when a bunch of people randomly give and take a dollar from one another over and over.
I wasn't sure which forum to post this topic to, so feel free to move it, mods. The topic seems to cover a lot of fields of study: economics, physics, statistics, calculus, etc. :)

I was listening to a YouTube video the other day, and the speaker presented situation where there are a thousand people, each given 10 dollars. Two random people are selected to flip a coin. The loser of the coin toss gives the other person one dollar (and if they don't have any money at all, nothing happens since they can't give a dollar to the other person). Next, two new random people are selected, flip a coin, and a dollar is given in a similar fashion. This process is repeated over and over. The video link is:
.
(Skip ahead to 5:20 if you'd to watch the part that describes this situation.)

I made a computer program to imitate this situation because I was quite interested in it. The link to the program (the program runs in the web browser) is : https://www.openprocessing.org/sketch/950688 .

I am interested in figuring out how many people (on average) will have 0 dollars after the system reaches its equilibrium state (after some time goes by). I imagine the number of people who will have 0 dollars will likely be a function of how many people there are in the system and the initial money given to each person.

My attempt at trying to figure this out:

Note 1: After the equilibrium state occurs, the rate at which people lose money is proportional to the number of people that have 0 dollars. This is because if there are a lot of people that have 0 dollars, a person that wins a coin toss has a good chance of not even getting a dollar as a result. This 'force' makes it harder to obtain more money as more people have less money.

Note 2: I noticed that, in the video link, the speaker described a 'pareto destribution'. I feel that this is the improper distribution to describe this phenomenon. You may notice that the columns that describe how many people have a certain amount of money don't quite fit the pareto distribution overlaid on the speaker's graph. I believe this distribution is more appropriately described as an exponential distribution of the form:
y = K*e^(-L*x)
where K is the number of people that have 0 dollars at the equilibrium state (since when x=0, y=K), L is a constant describing the rate that the distribution approaches 0, x is the amount of money held, and y is the number of people that hold that amount of money. On the program, I overlaid an exponential distribution instead of a pareto distribution and it fits the graph nicely.

Note 3: If the total amount of people "n" must all be in the graph, then the integral of the distribution K*e^(-L*x) dx from 0 to infinity must be equal to n. Solving this simple equation, I get: n=K/L. So, the rate that the distribution decreases "L" is related to the number of people that have 0 dollars "K". Interesting!

Note 4: There is something relating to statistical thermodynamics going on here. If I simplify the problem to only 3 people, each given 1 dollar, there is something that stands out. I notice that:
-there is only 1 arrangement of the money where all 3 people have 1 dollar
-3 ways to arrange the money where one person has all 3 dollars and the other two people have nothing
-6 ways to arrange the money where someone has 2 dollars, someone has 1 dollar, and someone has 0 dollar.
So, if there is one arrangement of the money that just by chance appears more often, then it is the likeliest to occur. This similarity to microstates and entropy may be related to this problem. A very similar situation using energy states of molecules is described here: https://ch301.cm.utexas.edu/section2.php?target=thermo/second-law/microstates-boltzmann.html
If this situation is exaggerated to 1000 people instead of 3, then the system may be acting to increase its entropy by going to its most chaotic state. After realizing this relation to entropy, I noticed that the speaker's program actually even has a graph charting entropy as the program runs! So the solution to finding how many people have 0 dollars may be seriously related to Boltzman's study of microstates.

So, how may we elucidate the number of people who have 0 dollars at the equilibrium state? Any encouraging insights about this interesting phenomenon are greatly appreciated.
 
Last edited by a moderator:
Mathematics news on Phys.org
  • #2
As soon as one person has all the money, the game stops.
Therefore, if the system reaches equilibrium, the number of people with zero dollars is N-1.

This does not say equilibrium is reached quickly.
 
  • #3
Vanadium 50 said:
As soon as one person has all the money, the game stops.
Even if we ignore the absurdly tiny probability of this happening in a reasonable number of steps: Why? As soon as that person is picked again they have a 50% chance to lose a dollar. Every exchange has a 50% chance to be in either direction (no money is exchanged if the person who needs to give a dollar doesn't have one).
 
  • #4
Let's consider an infinite game: There are so many other players that your own money is uncorrelated to the money other players will have. A fraction of p is broke. In every step you have a 50%*(1-p) chance to gain a dollar, and if you are not broke you have a 50% chance to lose a dollar. You will be broke in a fraction p of the steps, so your long-term expectation value is a constant amount of money, as expected.
Let f(n) be the chance to have n dollars at a given point. f(0)=p by definition. The distribution must be stable:
f(0)=f(0)*(0.5+0.5*p)+0.5*f(1) which simplifies to f(1)=p(1-p)
f(1)=f(0)*0.5(1-p)+0.5*f(1)*p+0.5*f(2), once we plug in what we know we get f(2)=p-2p2+p3=p(1-p)2
... and so on. I guess you can generalize this in a purely mathematical way, I used a spreadsheet to verify that we get indeed a geometric distribution. ##f(n)=p(1-p)^n##. The mean is (1-p)/p. If we fix the mean to be 10, we can solve for p=1/11.

A geometric distribution is the discrete version of an exponential function, so it's not an accident that the exponential fits so well.

A finite game will have different results, but with 1000 players and 10 dollars each you don't see that in graphs.
 
  • #5
We can write a set of equations, with ##a_k## being the proportion of people in equilibrium that have ##k## dollars.

At each time step, the probability of being selected to participate in a coin flip is ##1 - \frac1N\frac1{N-1} = \frac2N##.

For a person with no money, the probability of gaining a dollar is the prob that the other person has at least one dollar, times the prob of winning the flip, which is ##\frac12(1-a_0)##. So the set of penniless people has an expected outflow of ##a_0(1-a_0)\frac1N##.

That must equal the expected inflow, which is from the people with one dollar, flow size ##a_1\cdot \frac2N\cdot\frac12 = \frac{a_1}N##.

So we have ##a_1 = a_0(1-a_0)##.

For ##k>0## the outflow will be ##a_k\frac2N\cdot\frac12 = \frac{a_k}{N} ## from losses and ##a_k\frac2N \frac12 (1-a_0) = (1-a_0)\frac{a_k}N## from wins, a total outflow of ##(2-a_0)\frac{a_k}{N} ##.

The inflow is the flow from people with ##k+1## that lose and people with ##k-1## that win, which is ##a_{k+1}\cdot \frac2N\cdot\frac12 + a_{k-1}\frac2N(1-a_0)\frac12 = \frac1N\left(a_{k+1}+a_{k-1}(1-a_0) \right)##. This gives the equations:
$$(2-a_0)a_k = a_{k+1}+a_{k-1}(1-a_0)$$
Rewriting with the highest subscript on one side, we get, for ##j=k+1>1##:
$$a_j = (2-a_0)a_{j-1} - a_{j-2}(1-a_0)$$

We can then show by induction that ##a_k = a_0(1-a_0)^k##. This is an exponential distribution.

Any exponential distribution (ie for any value of ##a_0## in the interval ##(0,1]##) will be an equilibrium for a model of this kind. However we have one extra piece of info that allows us to identify which one will apply. That is that the average wealth is 10 dollars per person, and that cannot change, since wealth is exchanged, but not created or destroyed. So the distribution will be the exponential distribution with mean 10. The mean of an exponential distribution of this type is ##\frac{1-a_0}{a_0}##, so we have ##10 = \frac{1-a_0}{a_0}##, whence ##a_0=1/11## and the distribution is

0.091 0.083 0.075 0.068 0.062 0.056 0.051 0.047 ...

so the expected number of people with no money after a very long time is 0.091 times 1000, which is 91.

I can't help but observe the aptness of Jordan Peterson mistaking an exponential distribution for a Pareto distribution. But I didn't watch the video, so I can't be sure whether that's what he did.
 
  • Like
Likes pbuk and PeroK
  • #6
andrewkirk said:
I can't help but observe the aptness of Jordan Peterson mistaking an exponential distribution for a Pareto distribution.
And making wrong statements like "who has more money gets even more money" (not a literal quote, but it was something like that). No, if you have money then your expectation value is always negative, there are just a few outliers that are lucky.
But let's not get into his motivation to make these statements...
 
  • Like
Likes etotheipi and pbuk
  • #7
andrewkirk said:
That must equal the expected inflow, which is from the people with one dollar
Wouldn’t it be from the people with one or more dollars? So it would be
$$a_0(1-a_0)=\sum_{i =1}^k a_i$$
What am I missing?

Edit: never mind. I see you meant the outflow of people, not outflow of money.
 
  • #8
How many rounds of this game does it take before you get close to the equilibrium distribution. It would be interesting to compare this to the average time to bankruptcy, which I think is about 22 * N if you start with N dollar. (you lose N/22 on a game with a random person.)
 
  • #9
mfb said:
Even if we ignore the absurdly tiny probability of this happening in a reasonable number of steps: Why? As soon as that person is picked again they have a 50% chance to lose a dollar. Every exchange has a 50% chance to be in either direction (no money is exchanged if the person who needs to give a dollar doesn't have one).

I couldn't figure out the rule here. When you have no money are you out of the game? Or, once you have no money are you still playing (with no chance to lose a dollar but still a chance to gain one)?
 
  • #10
PeroK said:
I couldn't figure out the rule here. When you have no money are you out of the game? Or, once you have no money are you still playing (with no chance to lose a dollar but still a chance to gain one)?
I read it as aborting the transfer after the 50/50 die is rolled rather than after the pair of participants is selected.

"no money is exchanged if the person who needs to give a dollar doesn't have one"

You only need to give a dollar if the 50/50 roll goes against you.
 
  • #11
PeroK said:
Or, once you have no money are you still playing (with no chance to lose a dollar but still a chance to gain one)?
This. It can be played forever. It's always a coin toss who gives money and who gets it, but if the person who needs to give a dollar doesn't have one nothing happens.
 
  • #12
mfb said:
And making wrong statements like "who has more money gets even more money" (not a literal quote, but it was something like that). No, if you have money then your expectation value is always negative, there are just a few outliers that are lucky.
But let's not get into his motivation to make these statements...
The quote is at 6.37 "eventually what happens if you play it to its conclusion is that one person ends up with all the money". This is clearly NOT what happens.

I had not come across this charlatan before, he is clearly someone who would not let an inconvenient fact stand in the way of another book sale.
 
  • Like
Likes etotheipi and jbriggs444
  • #13
I can give extremely weak bounds on the chance that someone has all the money at a given time:
You need more and more people to go broke, making the accumulation of money harder than in the infinite game. That means the infinite game gives us an upper bound: p(1-p)1000 = 4*10-43.
Broke people are anti-correlated: If I'm broke then you are less likely to be broke. That means the chance to have 999 broke people is less than 1000(1-p)p999 = 4*10-1038
Somewhere between these numbers. Negligible, for sure.

I would expect a factor 1000 between 9999 and 10,000 dollars and a factor 500 between 9998 and 9999, give or take a factor 2. And so on. That reduces the probability by many orders of magnitude from my upper bound.
At 9999 you are 999 times more likely to lose a dollar than you are to win the last dollar.
 
  • #14
mfb said:
This. It can be played forever. It's always a coin toss who gives money and who gets it, but if the person who needs to give a dollar doesn't have one nothing happens.
That sounds like a mistake to me. Clearly anyone who gets to zero can't go into debt and must start winning again. And even if someone gets all the money that's not equilibrium. They must start losing some of it. We don't need to do any calculations to see that.
 
  • #15
PeroK said:
That sounds like a mistake to me. Clearly anyone who gets to zero can't go into debt and must start winning again. And even if someone gets all the money that's not equilibrium. They must start losing some of it. We don't need to do any calculations to see that.
Yes, certainly. If the rules are that a person with no money stays in the game and has a chance to regain money then one person with all the money is not equilibrium.

That does not make it a mistake to read the rules as they are written.
 
  • #16
jbriggs444 said:
Yes, certainly. If the rules are that a person with no money stays in the game and has a chance to regain money then one person with all the money is not equilibrium.

That does not make it a mistake to read the rules as they are written.

Where are these rules written down? The video itself certainly claims the graph is evolving into something that it isn't. He's describing one game and illustrating another.

My guess is that he forgot to take people with zero money out of the game. And didn't notice that his simulation wasn't simulating what he was talking about. That's perhaps unprofessional, to say the least.

If you stay in the game with zero money, can't lose from there and have a chance to start winning gain, then I don't see how anyone could think you'll stay with zero money. That makes no sense.
 
  • #17
PeroK said:
Where are these rules written down?
In post #1: "The loser of the coin toss gives the other person one dollar (and if they don't have any money at all, nothing happens since they can't give a dollar to the other person) "

It is quite clear here that a coin toss is made, even when one participant has no money.
It is quite clear here that the "nothing happens" applies only when the loser has no money.

In the video a different rule is spoken. "They lose, ten times in a row, 'Bang', they're done"
 
  • #18
If people with no money drop out then his graph would look very different. What he simulates is clearly what we calculate here.
 
  • #19
mfb said:
Let's consider an infinite game: There are so many other players that your own money is uncorrelated to the money other players will have. A fraction of p is broke. In every step you have a 50%*(1-p) chance to gain a dollar, and if you are not broke you have a 50% chance to lose a dollar. You will be broke in a fraction p of the steps, so your long-term expectation value is a constant amount of money, as expected.
Let f(n) be the chance to have n dollars at a given point. f(0)=p by definition. The distribution must be stable:
f(0)=f(0)*(0.5+0.5*p)+0.5*f(1) which simplifies to f(1)=p(1-p)
f(1)=f(0)*0.5(1-p)+0.5*f(1)*p+0.5*f(2), once we plug in what we know we get f(2)=p-2p2+p3=p(1-p)2
... and so on. I guess you can generalize this in a purely mathematical way, I used a spreadsheet to verify that we get indeed a geometric distribution. ##f(n)=p(1-p)^n##. The mean is (1-p)/p. If we fix the mean to be 10, we can solve for p=1/11.

A geometric distribution is the discrete version of an exponential function, so it's not an accident that the exponential fits so well.

A finite game will have different results, but with 1000 players and 10 dollars each you don't see that in graphs.

Thank you all for your well thought out responses.

1. Apologies for not being clearer. The rule I attempted to articulate was : if a person is at zero money, they can't lose any more, and they may win money again as long as they win coin flips.

2. mfb , would you mind showing some more steps of your thinking on calculating f(1) and f(2) as functions of p? Your method of showing this as a geometric ditribution is the most intuitive to me, and Id like to understand your thought process more clearly.
 
  • #20
In equilibrium the distribution is stable: Your chance to have $0 after one exchange involving you must be the same as before. You can end up with $0 in three ways:
- have $0, lose: f(0)*0.5
- have $0, win, but your partner is broke as well: f(0)*0.5*p
- have $1, lose: f(1)*0.5
The sum of these must be f(0) again.

Similar for $1. You can end up with 1 dollar in three ways:
- have $0, win while your partner is not broke: f(0)*0.5(1-p)
- have $1, win but your partner is broke: f(1)*0.5p
- have $2, lose: f(2)*0.5
The sum of these must be f(1).
 
  • Like
Likes jbriggs444
  • #21
Thank you all. Just another seemingly chaotic math problem that ends up being ordered and solvable. How beautiful.

One more thing, there seems to be some people on this thread who don't care for Jordan Peterson. I know a lot of people who get a lot from what he says; why do some of you not care for him?

As far as his obvious ignorance of the mathematical details of this particular problem: I think he was just trying to explain using the little math he had available to him to explain a trend he sees in economics. That a lot of people have little and a few have a lot. Hes not a mathmetician so the details of the trends of his computer program are quite wrong, but the natural tendency for money accumulate in the hands of a few is well articulated. He seems to believe this trend is a pattern inherent in mathematics, so it wouldbe hard to totally fix. I think that is his main point, and even though he got his specifics wrong, it seems his main idea is certainly well explained by the pattern of the simple thought experiment of money swapping.

Anyway, id like to know why some of you don't care for him. I am curious. 👍😊
 
  • #22
kairama15 said:
Anyway, id like to know why some of you don't care for him. I am curious.
I like the guy. I don't necessarily agree with his opinions outside of his field (clinical psychology), but he is articulate ; he isn't just spamming the audience with hyperbole and sloganry. That counts for a lot.
 
  • #23
If wealth within a country would follow an exponential distribution, as it does in this toy experiment, we could expect the richest households to have ~14 million in the US based on 700,000 average and a quick calculation. The chance to get anyone with a billion with this equal redistribution scheme is essentially zero. It's clearly not applicable to the real world.
And that's just the US. We have large wealth differences between countries, too.
 
  • #24
mfb said:
In equilibrium the distribution is stable: Your chance to have $0 after one exchange involving you must be the same as before. You can end up with $0 in three ways:
- have $0, lose: f(0)*0.5
- have $0, win, but your partner is broke as well: f(0)*0.5*p
- have $1, lose: f(1)*0.5
The sum of these must be f(0) again.

Similar for $1. You can end up with 1 dollar in three ways:
- have $0, win while your partner is not broke: f(0)*0.5(1-p)
- have $1, win but your partner is broke: f(1)*0.5p
- have $2, lose: f(2)*0.5
The sum of these must be f(1).
It is rather more complicated than that. You have to range through all pre-toss combinations of the wealths of the pair and see what it does to the expected overall wealth distribution.
Something like, for x>2: ##f(x)=f(x)(1-f(x))^2+(f(x)+\frac 1N))\frac 12f(x-1)(1-f(x)-f(x-1)-f(0))+(f(x)+\frac 1N))(f(x-1))^2...##
1st term: this toss involves no-one worth x, so f(x) does not change
2nd term: winner was worth x-1, loser was worth something other than 0, x-1, x
3rd term: both were worth x-1
etc., with other equations for x=0, 1, 2.
 
  • #25
You can't change your wealth by more than one dollar at a time, and the wealth of your partner doesn't matter besides the question if they are broke or not.
 
  • #26
mfb said:
You can't change your wealth by more than one dollar at a time, and the wealth of your partner doesn't matter besides the question if they are broke or not.
At a point in time, there is a probability distribution of how many have what wealth. For a statistically stable state, a transaction must not, on average, change that distribution.
 
  • #27
Yes, that's what I calculated. Everyone has the same independent probability distribution in the infinite game, so it's sufficient to look at the distribution of one participant. As I mentioned, the finite game doesn't satisfy this, although deviations will be small for 1000 participants and $10,000.
 
  • #28
mfb said:
Yes, that's what I calculated. Everyone has the same independent probability distribution in the infinite game, so it's sufficient to look at the distribution of one participant. As I mentioned, the finite game doesn't satisfy this, although deviations will be small for 1000 participants and $10,000.
You are right, that does work. But the 'p' in post #20 is the same as f(0), right?
 
  • #29
Yes. See post #4:
mfb said:
A fraction of p is broke. [...]
Let f(n) be the chance to have n dollars at a given point. f(0)=p by definition.
 

1. What is "A Money Swapping Curiosity"?

"A Money Swapping Curiosity" is a social experiment that involves two individuals swapping their money for a period of time and then exchanging it back. It aims to explore the concept of value and how it is perceived by different individuals.

2. How does "A Money Swapping Curiosity" work?

Two individuals agree to swap their money for a specific period of time, usually a day or a week. They then use each other's money for their daily expenses and transactions. At the end of the agreed upon time, they exchange the money back to its original owner.

3. What is the purpose of "A Money Swapping Curiosity"?

The purpose of this experiment is to challenge our perceptions of value and money. It aims to show that the value we assign to money is not fixed and can be influenced by various factors such as personal experiences, cultural background, and societal norms.

4. What are some possible outcomes of "A Money Swapping Curiosity"?

The outcomes of this experiment can vary greatly. It can lead to a better understanding and appreciation of different perspectives on money and value. It can also challenge our preconceived notions and biases about money. Additionally, it can spark discussions and reflections on our relationship with money and its role in our lives.

5. Is "A Money Swapping Curiosity" ethical?

As a social experiment, "A Money Swapping Curiosity" does not have a definite answer to this question. It is up to the individuals participating to decide if they are comfortable with the experiment and its potential outcomes. However, it is important for all parties involved to give their full consent and to respect each other's boundaries and beliefs.

Similar threads

  • General Math
Replies
3
Views
2K
  • Precalculus Mathematics Homework Help
Replies
7
Views
1K
Replies
1
Views
2K
Replies
1
Views
1K
Replies
5
Views
1K
  • General Math
Replies
6
Views
2K
  • Set Theory, Logic, Probability, Statistics
3
Replies
75
Views
6K
Replies
16
Views
5K
  • Programming and Computer Science
Replies
4
Views
15K
Replies
2
Views
816
Back
Top