This package provides the PERT (also known as beta-PERT) distribution.
Background
PERT stands for "program evaluation and review technique", the original context for which the distribution was first proposed by Clark (1962).
The PERT distribution is widely used in risk and uncertainty modelling to represent uncertain quantities where one is relying on subjective estimates. This is because the three parameters defining the distribution are intuitive to the estimator.
This package
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
uv add beta-pert-dist-scipy
Usage
from betapert import pert, mpert
# Define the distribution:
dist = pert(10, 30, 90)
# Or, using keyword arguments:
dist = pert(mini=10, mode=30, maxi=90)
# Call standard SciPy methods:
dist.pdf(50)
dist.cdf(50)
dist.mean()
dist.rvs(size=10)
# Or, you can directly use the methods on this object:
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)
# The modified PERT distribution is also available.
# A PERT distribution corresponds to `lambd=4`.
# Note that you cannot call `mpert` without specifying `lambd`
# (`pert` and `mpert` must have different signatures since SciPy does
# not support optional shape parameters).
mdist = mpert(10, 30, 90, lambd=2)
# Values of `lambd<4` have the effect of flattening the density curve
# 6% > 1.5%
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
Authors
- betapert (original) by Tom Adamczewski
- beta-pert-dist-scipy Python 3.13 drop-in replacement with adjusted beta distribution variance and kurtosis by Harold Martin
Metadata
Release files for beta-pert-dist-scipy 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| beta_pert_dist_scipy-0.2.1.tar.gz | 12.4 kB | With provenance | Details for beta_pert_dist_scipy-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| beta_pert_dist_scipy-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for beta_pert_dist_scipy-0.2.1-py3-none-any.whl |
Total release size: 18.9 kB
Release files / beta_pert_dist_scipy-0.2.1.tar.gz
| Download URL | beta_pert_dist_scipy-0.2.1.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ba33ed9d9d15e4b1ffbd50d6a0353a0c279a89fd53e3233b2a53cbdeb6c9a4b
|
|
BLAKE2b-256 checksum How to use checksums |
5994d611c4d149fdeed1429558a322ecd1ceba22d7e4154cf7bf73ab6f323462
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 18, 2025.
Transparency logRelease files / beta_pert_dist_scipy-0.2.1-py3-none-any.whl
| Download URL | beta_pert_dist_scipy-0.2.1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e879f97a139c8d0615bba736f5b67b299bd4a41f6199a9e7e6ac058b2b222deb
|
|
BLAKE2b-256 checksum How to use checksums |
243a22595ddbed932c21933360772fff7ea6e759d4ccc4b046fe0c4effe65d11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 18, 2025.
Transparency logSecurity for beta-pert-dist-scipy 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for beta_pert_dist_scipy-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 18, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.