Top-level package for beta-PERT distribution.
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file beta_pert_dist_scipy-0.1.8.tar.gz.
File metadata
- Download URL: beta_pert_dist_scipy-0.1.8.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c2224642bf0a79a198dd0ad753bd159113cb57111f6adc4d61f03f23d9f71e5
|
|
| MD5 |
0de27c566eb588db43f7a1af1f3d57a6
|
|
| BLAKE2b-256 |
64b847ecdfa41b1392a020cec5c381f7c34f6caad0a2a23bb915e4a4a70afc47
|
Provenance
The following attestation bundles were made for beta_pert_dist_scipy-0.1.8.tar.gz:
Publisher:
publish.yml on hbmartin/betapert
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
beta_pert_dist_scipy-0.1.8.tar.gz -
Subject digest:
7c2224642bf0a79a198dd0ad753bd159113cb57111f6adc4d61f03f23d9f71e5 - Sigstore transparency entry: 284352692
- Sigstore integration time:
-
Permalink:
hbmartin/betapert@3e9d2f7bcf68d86b7908940826670c64ed9e1075 -
Branch / Tag:
refs/tags/v0.1.8 - Owner: https://github.com/hbmartin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3e9d2f7bcf68d86b7908940826670c64ed9e1075 -
Trigger Event:
release
-
Statement type:
File details
Details for the file beta_pert_dist_scipy-0.1.8-py3-none-any.whl.
File metadata
- Download URL: beta_pert_dist_scipy-0.1.8-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d5ac7dead13c8a3e6265f4bea2daf110c3ff7f0fa4dfc36f7792d2efeb0cf5d
|
|
| MD5 |
bb145af34adbe6cdec1e5c38d4da7ac4
|
|
| BLAKE2b-256 |
0d635b62da6e0f2f8d0bfd64eb555e0d2682fc3cf7ea6aca14f94658d29b1c40
|
Provenance
The following attestation bundles were made for beta_pert_dist_scipy-0.1.8-py3-none-any.whl:
Publisher:
publish.yml on hbmartin/betapert
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
beta_pert_dist_scipy-0.1.8-py3-none-any.whl -
Subject digest:
7d5ac7dead13c8a3e6265f4bea2daf110c3ff7f0fa4dfc36f7792d2efeb0cf5d - Sigstore transparency entry: 284352713
- Sigstore integration time:
-
Permalink:
hbmartin/betapert@3e9d2f7bcf68d86b7908940826670c64ed9e1075 -
Branch / Tag:
refs/tags/v0.1.8 - Owner: https://github.com/hbmartin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3e9d2f7bcf68d86b7908940826670c64ed9e1075 -
Trigger Event:
release
-
Statement type: