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.70

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.70
File Size Uploaded Provenance Actions
statsx-0.1.70.tar.gz 201.8 kB Without provenance Details for statsx-0.1.70.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for statsx 0.1.70
File Actions
statsx-0.1.70-cp311-abi3-musllinux_1_2_x86_64.whl CPython 3.11 abi3 Linux musl 1.2+ x86-64 Details for statsx-0.1.70-cp311-abi3-musllinux_1_2_x86_64.whl
statsx-0.1.70-cp311-abi3-musllinux_1_2_aarch64.whl CPython 3.11 abi3 Linux musl 1.2+ ARM64 Details for statsx-0.1.70-cp311-abi3-musllinux_1_2_aarch64.whl
statsx-0.1.70-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.70-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
statsx-0.1.70-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details for statsx-0.1.70-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
statsx-0.1.70-cp311-abi3-macosx_11_0_x86_64.whl CPython 3.11 abi3 macOS 11.0+ x86-64 Details for statsx-0.1.70-cp311-abi3-macosx_11_0_x86_64.whl
statsx-0.1.70-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for statsx-0.1.70-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 4.5 MB

Release files / statsx-0.1.70.tar.gz

Download URL statsx-0.1.70.tar.gz
Size 201.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5c740d8fb47c0efc269551ef4d00fd72580e40e484bef21f94a8b92ad3461a06
BLAKE2b-256 checksum
How to use checksums
7b25f9f8269167d0abbcd6006f2b321a8716092d52a1766df3a75bef4203f081
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.70-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL statsx-0.1.70-cp311-abi3-musllinux_1_2_x86_64.whl
Size 738.6 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
01ffc4eb5749bc95a4f3b5605ea6310c0cb3379b46bfd0d7088cb7fe9f0d868d
BLAKE2b-256 checksum
How to use checksums
274aa186c2f00f1b578d84c7a01eed5995d7586ede959fbfde5e3718a254c8e3
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.70-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL statsx-0.1.70-cp311-abi3-musllinux_1_2_aarch64.whl
Size 688.5 kB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
a0a83c7e114b0ccf8ec9c092d3a5604829ea5ad31270a0dfecaca6ca7459a9f4
BLAKE2b-256 checksum
How to use checksums
45bb7ab02fa4dec879d6e2172a22131959f3cc1b02e92081c1014743dc6cc866
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.70-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL statsx-0.1.70-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 740.0 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
28a46420d60bd5d0486c7e1baeb04af043b6e8e2b72b5669f62bb3d192c816f9
BLAKE2b-256 checksum
How to use checksums
ef0f58904500022656e400a2e17bcf5208d2a9bb6e9566113e0dadf1e5cdbd49
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.70-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL statsx-0.1.70-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 689.5 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
bcf3d5bc6c958c7f841a7ea27ffab48eb6e5d2063e69148fb75ee3c72b40b82e
BLAKE2b-256 checksum
How to use checksums
27f3f8a190b3d5ec08510e621edfe883a05f3e6d2eb37f4056a352ce0df5170c
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.70-cp311-abi3-macosx_11_0_x86_64.whl

Download URL statsx-0.1.70-cp311-abi3-macosx_11_0_x86_64.whl
Size 745.9 kB
Tags CPython 3.11 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
2f222432920e307788a9a253024836e593c819488862d424c1080382d11e1806
BLAKE2b-256 checksum
How to use checksums
983015eb0653fcee4be1f88f6bba83c1cfdc4078336efa160c33539c269e2e03
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.70-cp311-abi3-macosx_11_0_arm64.whl

Download URL statsx-0.1.70-cp311-abi3-macosx_11_0_arm64.whl
Size 701.0 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cea6895f8ff5b71ddd86cb0ad2a86bc55d1ab2f3bf7e636da4a309fc82a446a2
BLAKE2b-256 checksum
How to use checksums
cb186f7ebc5d6317e21620545d0b6f0a1b419ad1efa2ed382be592409ba6036a
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.70

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.70 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