Reliable Statistics
Statistics often get bad rap for being inaccurate or misleading. They are after all guesses. We can improve their quality by adding information about confidence in these numbers. This project provides tools to compute the confidence levels. Example of usage in real-life situations is reliability engineering.
Reliability engineering deals with estimating parameters or qualities of a product or process or experiment. For simplicity, we assume that all units of a product or results of an experiment are random variables. Collectively, let’s call them samples. We assume that the samples are independent (one sample has no effect on another sample) and identically distributed (the reliability or properties of underlying random variable stay the same for each sample).
Concepts
Reliability is probability of success. The math assumes infinite number of samples, but we can get access to only a finite number of samples. Therefore, we can compute only an estimate of the actual reliability. Based on the number of samples, we qualify the quality of this estimate using confidence.
Confidence in reliability is probability that the actual reliability of the population is at least the provided reliability level. For example, we can say “If we see zero failures in 10 samples of a success-failure experiment, we have 95% confidence that the reliability is at least about 74%”.
Assurance simplifies reliability and confidence by setting both of them the same. The result is just one number that is easier to communicate. For example, 90% assurance means 90% reliability with 90% confidence. Given the number of samples and number of failures, assurance is just one number.
This library provides methods to calculate these statistics for infinite and finite population sizes.
Example usage in a python file:
from relistats.binomial import assurance
n = 22
a = assurance(n, 0) or 0
print(f"Assurance at {n} good samples: {a*100:.1f}%")
References
S.M. Joshi, “Computation of Reliability Statistics for Success-Failure Experiments,” arXiv:2303.03167 [stat.ME], March 2023.
S.M. Joshi, “Computation of Reliability Statistics for Finite Samples of Success-Failure Experiments,” arXiv:2305.16578 [cs.IT], May 2023.
Jupyter notebooks showing how to use this library relistats_notebook
Interactive online versions of the Jupyter notebook on Google Colab.
Additional documentation.
Usage for installation and how to use.
Background for concepts and mathematical background.
CHANGELOG.md for revision history.
Credits
This package was originally created with Cookiecutter and the sourcery-ai/python-best-practices-cookiecutter project template. Later modified by author.
Metadata
Release files for relistats 1.2.0
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 |
|---|---|---|---|---|
| relistats-1.2.0.tar.gz | 543.5 kB | Without provenance | Details for relistats-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| relistats-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for relistats-1.2.0-py3-none-any.whl |
Total release size: 555.1 kB
Release files / relistats-1.2.0.tar.gz
| Download URL | relistats-1.2.0.tar.gz |
|---|---|
| Size | 543.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51281cb0ee69111f6b9f13a326475a0222cd9a4d5dd81a2621a7e058c8b390d9
|
|
BLAKE2b-256 checksum How to use checksums |
896db611ef37df5dc0937ea55aa20d6d686acad9ce2ddbb5a8040db16ce21bbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.2
|
Release files / relistats-1.2.0-py3-none-any.whl
| Download URL | relistats-1.2.0-py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9dc56e568be667055867f158048c4e5d69931f10c711c44fce806468ef01431f
|
|
BLAKE2b-256 checksum How to use checksums |
4cd6a796d2885f2d633a68859cca96f509036ece8d952cdce467888fb95fdf4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.2
|
Security for relistats 1.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.