This package provides the PERT (also known as beta-PERT) distribution.
Both the PERT distribution and its generalization, the modified PERT distribution, are provided.
The distributions work exactly like SciPy continuous probability distributions. They are subclasses of rv_continuous
.
Installation
# or `poetry add betapert`
pip install betapert
Usage
from betapert import pert, mpert
dist = pert(10, 30, 90)
dist = pert(mini=10, mode=30, maxi=90)
dist.pdf(50)
dist.cdf(50)
dist.mean()
dist.rvs(size=10)
pert.pdf(50, mini=10, mode=30, maxi=90)
pert.cdf(50, mini=10, mode=30, maxi=90)
pert.mean(mini=10, mode=30, maxi=90)
pert.rvs(mini=10, mode=30, maxi=90, size=10)
mdist = mpert(10, 30, 90, lambd=2)
assert (1 - mdist.cdf(80)) > (1 - dist.cdf(80))
Tests
A thorough test suite is included.
❯ pytest
=============== 250 passed in 3.52s ===============
tests/test_frozen.py
tests/test_generalization.py
tests/test_mpert_parametrized.py
tests/test_special_cases.py