Pareto Distribution
The Pareto distribution is a heavy-tailed distribution named after the economist Vilfredo Pareto, who noticed that a small share of the population owned most of the land. It models situations where a few items are huge and most are small: wealth, city populations, file sizes, insurance claims, the number of followers on social media.
It is behind the famous 80-20 rule: roughly 80 % of the effects come from 20 % of the causes.
| Parameter | Meaning |
|---|---|
a |
shape α (> 0). A smaller a means a heavier tail (more extreme values) |
size |
output shape |
NumPy's version: Lomax (Pareto II)
rng.pareto(a) returns samples of the Pareto II (Lomax) distribution, which starts at 0. To get the classical Pareto distribution starting at a minimum value m, use (rng.pareto(a) + 1) * m:
import numpy as np
rng = np.random.default_rng(42)
print(rng.pareto(a=3, size=6).round(3)) # Lomax: starts at 0
m = 20_000 # minimum income
incomes = (rng.pareto(a=1.5, size=6) + 1) * m # classical Pareto, >= m
print(incomes.round(0))[1.229 1.179 1.214 0.098 0.029 0.623]
[ 51198. 160549. 21086. 40183. 20962. 41337.]
Heavy tails in numbers
In a heavy-tailed sample, the maximum is enormous compared with the typical value, and the mean is dragged far above the median:
import numpy as np
rng = np.random.default_rng(42)
normal = rng.normal(50_000, 10_000, 100_000)
pareto = (rng.pareto(1.5, 100_000) + 1) * 20_000
for name, x in [("normal", normal), ("pareto", pareto)]:
print(f"{name:7} median {np.median(x):>10,.0f} mean {x.mean():>10,.0f} max {x.max():>14,.0f}")normal median 49,910 mean 49,958 max 100,072
pareto median 31,637 mean 59,560 max 78,176,788
The normal sample's maximum is only a few standard deviations above its mean. The Pareto sample contains values thousands of times larger than its median.
The 80-20 rule
In theory, a Pareto population with shape α ≈ 1.16 gives the top 20 % about 80 % of the total. Let's measure a simulated population of one million:
import numpy as np
rng = np.random.default_rng(1)
wealth = (rng.pareto(1.16, 1_000_000) + 1) * 1000
wealth_sorted = np.sort(wealth)[::-1] # richest first
top20 = wealth_sorted[: len(wealth) // 5].sum() / wealth.sum()
top1 = wealth_sorted[: len(wealth) // 100].sum() / wealth.sum()
print(f"top 20 % own {top20:.0%} of the total")
print(f"top 1 % own {top1:.0%} of the total")top 20 % own 91% of the total
top 1 % own 79% of the total
The simulation shows an even larger share than the theoretical 80 %. With α this close to 1, a handful of gigantic values dominate the total, so shares measured on a sample swing a lot from one seed to another. That instability is itself a lesson: totals and averages of heavy-tailed data are unreliable.
Visualising
A heavy tail is easier to see on a log scale. On log-log axes, the tail of a Pareto density is a straight line:
import numpy as np
import matplotlib.pyplot as plt
rng = np.random.default_rng(42)
bins = np.logspace(0, 3, 40) # 1 to 1000, log-spaced
plt.figure(figsize=(6, 3.5))
for a, color in [(1, "#e07a5f"), (2, "#4dabcf"), (3, "#81b29a")]:
x = rng.pareto(a, 100_000) + 1 # classical Pareto, m = 1
plt.hist(x, bins=bins, density=True, histtype="step", linewidth=1.5,
color=color, label=f"a = {a}")
plt.xscale("log")
plt.yscale("log")
plt.xlabel("value (log scale)")
plt.ylabel("density (log scale)")
plt.legend()
plt.tight_layout()
plt.show()
print("Plotted Pareto distributions with a = 1, 2, 3 on log-log axes")Plotted Pareto distributions with a = 1, 2, 3 on log-log axes
The smaller a, the flatter the line and the more probability lies far out in the tail.
Test yourself
Which situation is typically modelled by a Pareto distribution?
- Heights of adults
- Wealth across a population
- Coin tosses
- Measurement errors
How do you get classical Pareto samples with minimum m from NumPy?
- rng.pareto(a) * m
- (rng.pareto(a) + 1) * m
- rng.pareto(a) + m
- rng.pareto(a, m)
What does a smaller shape parameter a mean?
- A lighter tail
- A heavier tail with more extreme values
- A symmetric distribution
- Smaller maximum values