Skip to main content

statsx

pipeline status PyPI version Python versions License: MIT

Statistics for Python with its own Rust core: Bayesian inference, forecasting, causal impact, tests and design, with NumPy as the only dependency.

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

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

Interval results such as this one carry the estimate, the interval, the sample size and an assumption field. Fitted models (fit_trend, fit_bradley_terry) 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 is written in Rust from a published paper, and its docstring lists the references. The methods pages state the model, the formulas and the guarantee.

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

Contributing

Developer setup, the dev loop, and the release process live in CONTRIBUTING.md. In short: uv sync && make install-hooks, then make check runs the same gate CI runs.

License

MIT © 2026 Jorge Cardona (see LICENSE).

Metadata

Release files for statsx 0.1.58

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.58
File Size Uploaded Provenance Actions
statsx-0.1.58.tar.gz 144.8 kB Without provenance Details for statsx-0.1.58.tar.gz

Built distributions (wheels)

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

Total release size: 2.8 MB

Release files / statsx-0.1.58.tar.gz

Download URL statsx-0.1.58.tar.gz
Size 144.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c98f68c971bc2bf398957459bc6feab3f6dc8f3a5fa01dfef1178debe9380498
BLAKE2b-256 checksum
How to use checksums
d6dc24b9ce3df2a6fd0d5c019b3ac426d4e34ec0fa37d255337a97071f9665db
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.58-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL statsx-0.1.58-cp311-abi3-musllinux_1_2_x86_64.whl
Size 455.9 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
f4de740573cbae0436d16dca1b0f727099f08c8e15039eb9ab97cf4530698203
BLAKE2b-256 checksum
How to use checksums
0c850ec3e4ef22f86b9a13dddc1b6d60ef5472bb64c540dd74358cf587c8adef
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.58-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL statsx-0.1.58-cp311-abi3-musllinux_1_2_aarch64.whl
Size 439.5 kB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
9148aa0be0699c446c1d2a25c2e3f45eb8534aaaa5ce24c024b52be14820e57e
BLAKE2b-256 checksum
How to use checksums
1ed9ed2a369e9d9d801bdd8a96ad45b8c7ab06cbf3fdae7ed6ee5d9409aea1e9
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.58-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL statsx-0.1.58-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 457.3 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
628a5e5e4de249d2b5fb57a5cf570759c196e2e927a131079806a4006afd292c
BLAKE2b-256 checksum
How to use checksums
0bd7a48adf6bf2e219d1fa911e62e79e90a072ea8b1da37b4c81d45a5b7f9143
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.58-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL statsx-0.1.58-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 440.8 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
2aa15c0dd4972b092a52e6fbc16ffed0cc98ca465ae65b45185f3a6dfcb894df
BLAKE2b-256 checksum
How to use checksums
acf1ef209f0f46a18a777fa1825cc49595fa761af612445c3ef280b4663fb690
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.58-cp311-abi3-macosx_11_0_x86_64.whl

Download URL statsx-0.1.58-cp311-abi3-macosx_11_0_x86_64.whl
Size 458.8 kB
Tags CPython 3.11 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
5158ec94cef0c0c567192be297dd40754cd7bcd4160b32eb2013e44af7a65798
BLAKE2b-256 checksum
How to use checksums
a9aff0b8b4a82aa047f9cd8dbe5398be8a45e8757a31b298b12bbbca3077ca58
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.58-cp311-abi3-macosx_11_0_arm64.whl

Download URL statsx-0.1.58-cp311-abi3-macosx_11_0_arm64.whl
Size 445.0 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e98e9dc95f49395c05b68c909a337ee0f6491174f1bd068127d7662b9981d91d
BLAKE2b-256 checksum
How to use checksums
3cf65afc2341b34a722b2b84be5542bce4627d499a5cdce3b97f62b1c7511a64
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.58

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