Little experiment with the Pareto Distribution
80% of the outcome are due to 20% of the causes
The Pareto distribution is a probability distribution that is often used to describe the distribution of wealth in a population. It is also known as the 80/20 rule, as it states that 80% of the outcome are due to 20% of the causes. It is named after the Italian economist Vilfredo Pareto, who observed that a small number of individuals in a society tend to control a large share of the wealth.
Here are a few examples of the Pareto distribution in action:
- In a society a small number of individuals may control a majority of the wealth, while the majority of individuals have relatively little wealth.
- In a company a small number of products may generate a majority of the sales, while the majority of products have relatively few sales.
- In a population a small number of individuals may be much taller than the average, while the majority of individuals are of average height.
These are just a few examples of the Pareto distribution in action. The Pareto distribution is a widely-used model in economics and other fields, and it can help to explain the unequal distribution of wealth and other resources in a society.
If X is a random variable with a Pareto (Type I) distribution, then the probability that X is greater than some number x, i.e. the survival function (also called tail function), is given by
where xm is the (necessarily positive) minimum possible value of X, and α is a positive parameter.
Here is an example of how to generate and plot a Pareto distribution in Python:
import numpy as np
import matplotlib.pyplot as plt
# Generate 100 values from a Pareto distribution
values = np.random.pareto(1, 100)
# Plot the values on a histogram
plt.hist(values, bins = 20)
plt.show()
This code will generate 100 random values from a Pareto distribution with a parameter of 1, and then plot these values on a histogram using matplotlib. The resulting histogram should have a characteristic “long tail” shape that is characteristic of the Pareto distribution.
Here a really interesting video about Pareto principle and inequality from Dr Jordan B Peterson and Dr. Glenn Loury.
Let’s now try to simulate this experiment that Dr Jordan B Peterson used to teach his students about the Pareto principle
So we have 100 players that start with 100 USD. Randomly two players are selected and they bet 1 USD on the flip of a coin. If the outcome of the toss of the coin is head player 1 wins and if it is tail player 2 wins.
At the beginning if we plot a bar chart of the money of they players we obtain this:
Let’s run this betting game for some time and check the results.
As we can see now the distribution of the money is pretty unequal and a lot of players have 0 money.
By sorting in descending order the amount of money for each player we can see a sort of Pareto distribution. We can use also an histogram to visualize the distribution of money among the players:
As we can see the majority of players have 0 money and a tiny group of players has more than 300.
This is not part of the original experiment but just for fun now let’s apply a tax to the rich players and redistribute some money to the broke players. Let’s apply a 50% tax to the players that have more money than the median value (73.5 in this case). By doing so we collect 4785.5 USD that we will gave to the 43 broke players (So each broke player receives 111.29069767441861 USD). Since we are introducing decimal values in the experiment to avoid losing them we will use the minimum value between 1 USD and the betting players money as betting value.
So for example if Player A has 100 USD and Player B has 0.35 USD the betting value would be MIN(100, 1, 0.35) = 0.35 USD
After redistributing some money of course there are no more broke players. Let’s now run again the betting cycle and check the results:
Again the distribution of money is pretty unequal and a lot of players have 0 money.
We can also check the evolution of each player moneys:
To conclude in a Pareto distribution, a small number of items will have a large number of occurrences, while the majority of items will have a relatively small number of occurrences. This betting game is a zero sum game so the gain of one player is the loss of another one and this implies that given enough time a small group of players will have the majority of money. A Pareto distribution is a good model for this kind of scenario.
Outro
I hope the story was interesting and thank you for taking the time to read it. The code for this project can be found in this github repository and on my Blogspot you can find the same post in Italian. Let me know if you have any question and if you like the content that I create feel free to buy me a coffee.