TheAlgorithms / C-Plus-Plus

Collection of various algorithms in mathematics, machine learning, computer science and physics implemented in C++ for educational purposes.
https://thealgorithms.github.io/C-Plus-Plus
MIT License
30.79k stars 7.29k forks source link

feat: Add Pareto Distribution #2878

Open LidiaDomingos opened 4 weeks ago

LidiaDomingos commented 4 weeks ago

Description of Change

This feature proposes implementing the Pareto distribution to generate random numbers or model data in circumstances where the 80/20 rule applies (https://en.wikipedia.org/wiki/Pareto_distribution). When modeling phenomena with a heavy tail, including wealth distribution, natural phenomena, or other skewed distributions where a few number of occurrences account for the majority of the effect, the distribution is especially helpful. The feature should offer capabilities for sampling from the distribution and let users set the shape parameter (α) and scale (xm) parameter.

Checklist

Notes: I think the Pareto distribution is important because it is used in various disciplines, including economics, finance, and environmental research. In my instance, I used for modeling data where a small subset of the population has a significant impact, such as income distribution or asset allocation.

LidiaDomingos commented 4 weeks ago

fixed compile checks