Metadata-Version: 2.5
Name: assayed
Version: 0.0.1
Summary: Wilson score confidence intervals for measured success rates. Dependency-free.
Project-URL: Homepage, https://everydayai.link/
Author-email: Everyday AI Ltd <mblake@everydayai.link>
License-Expression: MIT
License-File: LICENSE
Keywords: benchmark,confidence-interval,measurement,statistics,wilson
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# 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

```python
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.
