The Pareto distribution follows Pareto’s law, also known as the 80-20 rule (where 20% of factors account for 80% of the outcome).
It has two parameters:
a (shape parameter): Determines the distribution’s steepness.
size: Specifies the shape of the returned array.
Generate a sample from the Pareto distribution with a shape parameter of 2 and a size of 2×3.
from numpy import random x = random.pareto(a=2, size=(2, 3)) print(x) |
from numpy import random import matplotlib.pyplot as plt import seaborn as sns sns.distplot(random.pareto(a=2, size=1000), kde=False) plt.show() |