assayed
Wilson score confidence intervals for measured success rates. No dependencies.
When you measure how often something succeeds (requests that complete, payments that settle, tests that pass), the raw rate hides how much you actually know. The Wilson score interval gives an honest range that stays inside 0 to 1 and behaves well for small samples and for rates near 0 or 1.
Install
pip install assayed
Use
from assayed import wilson_interval
low, high = wilson_interval(481, 500) # 95 percent by default
low, high = wilson_interval(8, 10, confidence=0.99)
wilson_interval(successes, trials, confidence=0.95) returns (low, high). It raises ValueError if trials is below 1, if successes is outside 0 to trials, or if confidence is not strictly between 0 and 1.
A TypeScript and JavaScript version with the same function is published on npm as assayed.
Reference
E. B. Wilson (1927), "Probable inference, the law of succession, and statistical inference", Journal of the American Statistical Association 22(158), 209 to 212.
Licence
MIT. Copyright (c) 2026 Everyday AI Ltd.
Metadata
Release files for assayed 0.0.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 | |
|---|---|---|---|
| assayed-0.0.1.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| assayed-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.5 kB
Release files / assayed-0.0.1.tar.gz
| Download URL | assayed-0.0.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3593a4766384f7977dbdabea985f21a427a6bc7c3d18bbe67a6315a55f7e6ed
|
|
BLAKE2b-256 checksum How to use checksums |
7b912a71044947b0056b9026f89c14d2b66fd0da2113a84059e89fbe3e6c9312
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / assayed-0.0.1-py3-none-any.whl
| Download URL | assayed-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a74539a1406db70f8573237ac6623645308616b5148465ca84f9e8c4d78eef54
|
|
BLAKE2b-256 checksum How to use checksums |
923cb87132e71abef5f779ed637fa726a7f8c3505336b8975749f9fd7eb3725e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|