Skip to main content

statsx

Statistics for experiments, model evaluations and forecasts, where every method has a page that states what it assumes.

PyPI Python versions Pipeline License: MIT

Which method do I use? · Methods · Recipes · Changelog · Issues


Overview

statsx covers intervals, Bayesian updates, tests, sequential tests, experiment design, model comparison and forecasting of count series. Each method has a methods page with the model, the formulas and what it assumes. Part of the numerical code is a Rust extension inside the wheel, and NumPy is the only dependency.

Status: beta.

Install

pip install statsx

Requires Python 3.12 or newer. NumPy is the only run-time dependency.

Quickstart

An interval for a proportion, 7 successes in 40 trials:

from statsx.proportion import proportion_interval

result = proportion_interval(7, 40, method="wilson")
print(result.estimate)
print(result.interval)
print(result.n)
print(result.assumption)
0.175
Interval(lower=0.0874541374603592, upper=0.3194999033178771, level=0.95)
40
independent trials with one success probability; Wilson score interval

A function that returns an Estimate, such as this one, gives the estimate, the interval, the sample size and an assumption field. Fitted models (fit_trend, fit_bradley_terry) and functions that return a bare Interval do not have that field: their methods pages state what they assume.

What it does

Not sure where to start? Read Which method do I use?.

Each method follows a published paper, and its module docstring lists the references. The methods pages state the model, the formulas and the guarantee.

Of the 31 method modules, 19 import the Rust extension statsx._accel, 6 import it through another statsx module, and 6 are Python and NumPy only (allocation, alwaysvalid, groupsequential, identify, multiple, rating).

  • Forecasting: trend with forecast and anomalies, causal impact, rolling-origin backtest.
  • Duration models: estimated time to finish, from past durations and from progress.
  • Intervals: proportions, bootstrap (percentile, basic, BCa), effect sizes, credible intervals.
  • Bayes: conjugate updates, lognormal prior from an expert interval, P(A > B).
  • Tests: multiple testing, equivalence (TOST), paired tests, agreement (kappa, alpha).
  • Decisions: Monte Carlo cost, expected value of information, break-even.
  • Calibration: reliability, Brier decomposition, Platt scaling, isotonic regression.
  • Design: power, sample size, minimum detectable effect, group sequential bounds.
  • Sequential: confidence sequences, e-values, Thompson sampling, best-arm identification.
  • Distributions: fits from sufficient statistics, goodness of fit at an effective sample size.
  • Model comparison: Rasch abilities of models on shared tasks, token ratios, cost per pass.
  • Ranking: Bradley-Terry with ties, a fit per judge, Elo, Glicko-2.
  • Drift: Kolmogorov-Smirnov, MMD, classifier two-sample test, PSI.
  • MCMC checks: convergence, effective sample size, Monte Carlo standard error, simulation-based calibration.

Contributing

Developer setup, the dev loop and the release process are in CONTRIBUTING.md. In short: uv sync && make install-hooks, then make check runs lint, format check, typecheck and tests.

License

MIT © 2026 Jorge Cardona (see LICENSE).

Metadata

Release files for statsx 0.1.65

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for statsx 0.1.65
File Size Uploaded Provenance Actions
statsx-0.1.65.tar.gz 168.6 kB Without provenance Details for statsx-0.1.65.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for statsx 0.1.65
File Actions
statsx-0.1.65-cp311-abi3-musllinux_1_2_x86_64.whl CPython 3.11 abi3 Linux musl 1.2+ x86-64 Details for statsx-0.1.65-cp311-abi3-musllinux_1_2_x86_64.whl
statsx-0.1.65-cp311-abi3-musllinux_1_2_aarch64.whl CPython 3.11 abi3 Linux musl 1.2+ ARM64 Details for statsx-0.1.65-cp311-abi3-musllinux_1_2_aarch64.whl
statsx-0.1.65-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details for statsx-0.1.65-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
statsx-0.1.65-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details for statsx-0.1.65-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
statsx-0.1.65-cp311-abi3-macosx_11_0_x86_64.whl CPython 3.11 abi3 macOS 11.0+ x86-64 Details for statsx-0.1.65-cp311-abi3-macosx_11_0_x86_64.whl
statsx-0.1.65-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for statsx-0.1.65-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 3.7 MB

Release files / statsx-0.1.65.tar.gz

Download URL statsx-0.1.65.tar.gz
Size 168.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e0a8225ee2eb3890c2bff9878f57680ed054e56476e6fe1941b31746c3c27b38
BLAKE2b-256 checksum
How to use checksums
6083b7beb9da4e1391f767a4ec94c0cb044d67c1665fca1dad30191080ad6f20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / statsx-0.1.65-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL statsx-0.1.65-cp311-abi3-musllinux_1_2_x86_64.whl
Size 598.2 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
545492f305c024114b10174f132373746c73cd9553e2ad0c141b4c6576bec3f4
BLAKE2b-256 checksum
How to use checksums
0c56932dc0068c034553c7bdcfa3b746d83a91ec1770b2a2b522ed643a415a7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / statsx-0.1.65-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL statsx-0.1.65-cp311-abi3-musllinux_1_2_aarch64.whl
Size 559.5 kB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
505faaf53b0e698a2634a21f9fe273babd4b3db4dc2961796bd7360e8dae59e0
BLAKE2b-256 checksum
How to use checksums
3219cd5957475bcd9fdbcf580796ce7af706027152ca4ca49ec933c1c4e62944
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / statsx-0.1.65-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL statsx-0.1.65-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 600.0 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
cdfd1b7ba86472c11dbdf3128abc08f6f0028fcca23e5abf9088b9f940a98625
BLAKE2b-256 checksum
How to use checksums
9d836c727b01fe4c20794dca4630afd589422090b57880b7c139e7407df8c786
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / statsx-0.1.65-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL statsx-0.1.65-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 560.6 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
255b457a9d3a9999e4d6536c34788522a3d0f3e540be438765d6c40fc30474d3
BLAKE2b-256 checksum
How to use checksums
f1df273fce796936e54e016bf9ac8d728875b9c858623d1331a3a8d3a161046d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / statsx-0.1.65-cp311-abi3-macosx_11_0_x86_64.whl

Download URL statsx-0.1.65-cp311-abi3-macosx_11_0_x86_64.whl
Size 596.9 kB
Tags CPython 3.11 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
0b656f6846626f1983f8666ff37d28fdbbb3eb3ac3d6c8b48fa3c3f11e688907
BLAKE2b-256 checksum
How to use checksums
744594fa5e0aa3d7c509bc1638f62ee734d2ac12cf643550ca39fcc19604a5fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / statsx-0.1.65-cp311-abi3-macosx_11_0_arm64.whl

Download URL statsx-0.1.65-cp311-abi3-macosx_11_0_arm64.whl
Size 567.2 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
603f7230952162bc7247f54c4657fb9b87935099f927ce717b8f8383aeba1b3a
BLAKE2b-256 checksum
How to use checksums
b79fea28a9e36c8c5409892cd9602a994d8193c998e4baa16257afee7eeaec6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.7

Security for statsx 0.1.65

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.

Release history Release notifications | RSS feed

This release

0.1.65 This release

7 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page