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')

Every result carries its estimate, its interval, the sample size and the assumption it rests on.

What it does

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

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.40
File Size Uploaded Provenance Actions
statsx-0.1.40.tar.gz 125.4 kB Without provenance Details for statsx-0.1.40.tar.gz

Built distributions (wheels)

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

Total release size: 1.8 MB

Release files / statsx-0.1.40.tar.gz

Download URL statsx-0.1.40.tar.gz
Size 125.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d7461550a64d599bf3117189542d7c437c2a48dcac31043662da9dc00ebf1624
BLAKE2b-256 checksum
How to use checksums
3f8a65d661cd25b6362a9df6f26f057720c48cc777ceed29e9addb818aef9683
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.40-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL statsx-0.1.40-cp311-abi3-musllinux_1_2_x86_64.whl
Size 433.8 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
6ce32873f4e92483792bf7d04235f1357dfa874f16b1cd24455b365b22a7f825
BLAKE2b-256 checksum
How to use checksums
6e8db0c5cb2954afbae040104ce6cb807834074ee913238bcb2bbfc6389b9eb8
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.40-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL statsx-0.1.40-cp311-abi3-musllinux_1_2_aarch64.whl
Size 417.6 kB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
6df1eac2c4d9cc03ab579bb00d6222bc3fd358c13c2a2c6e6de0c63f7bb91149
BLAKE2b-256 checksum
How to use checksums
de9a3f1b692494cbe80f5209fb64e6cc103997cbf58aa5ab4fed3fa9f91d2f7d
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.40-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL statsx-0.1.40-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 435.2 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
abb4ff4024594c5362210b0bcb340436f133b8ff344d6d2c4c77b9342b3733a9
BLAKE2b-256 checksum
How to use checksums
a5fdf7c3c3b6b1a5daf6b5fa27f2952017b1c5f1e2387f844692735e5a9a4d8e
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.40-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL statsx-0.1.40-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 419.1 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
9780e4813210a9e0a5cd01a03a15b2002a525c30a9cd9f059bddb070d22d49ad
BLAKE2b-256 checksum
How to use checksums
266707b716bc2c48fb1d880502d2b797a9058f048bf92ace57ae1eb10226db86
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}

Security for statsx 0.1.40

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.40 This release

5 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