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

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.59
File Size Uploaded Provenance Actions
statsx-0.1.59.tar.gz 146.0 kB Without provenance Details for statsx-0.1.59.tar.gz

Built distributions (wheels)

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

Total release size: 2.8 MB

Release files / statsx-0.1.59.tar.gz

Download URL statsx-0.1.59.tar.gz
Size 146.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d92b6a155ce01d3a9d37696963756fd2add8cbf5dc8a322d474d0816de1bbf60
BLAKE2b-256 checksum
How to use checksums
5dc9b66e12f0290cbcbe1aa82037f15cca76c5d0cdbaa2e0f81906f5ef06e143
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.59-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL statsx-0.1.59-cp311-abi3-musllinux_1_2_x86_64.whl
Size 456.8 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
08a9739299cffc073e1a58d7e3a6ea2a1ce32e98262f65112a649cf48a49fef6
BLAKE2b-256 checksum
How to use checksums
657163e4d04e258a8c65a9d4eb88490e3f495832cf32ced62043abd7b9963295
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.59-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL statsx-0.1.59-cp311-abi3-musllinux_1_2_aarch64.whl
Size 440.6 kB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
c52ee2f7837edec0d0f61ce6eca05ff4138907760a44401abd17016b94a39bfd
BLAKE2b-256 checksum
How to use checksums
a6a2a807909735d47fdfed475cce59b2202e60b67444fd809f2b64439c08cbb6
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.59-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL statsx-0.1.59-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 458.2 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
8b99b8b7afee89e068a9511319d6c74845baf739516eaea210e9880316c5d2d6
BLAKE2b-256 checksum
How to use checksums
f1f3e147e51e1536c300232bcb57f39ede2e16cffacdf8371d0e452f6b14166c
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.59-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL statsx-0.1.59-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 441.9 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
b6b3e576567a998b2eb1f7261137f5c8bb10ae264213c202de5a329b8cc9e5b4
BLAKE2b-256 checksum
How to use checksums
9dfc7ef6a51457bd9cc0d941c0087e28ef2c7f94ed6ff1bb3b81ae9253a0db3d
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.59-cp311-abi3-macosx_11_0_x86_64.whl

Download URL statsx-0.1.59-cp311-abi3-macosx_11_0_x86_64.whl
Size 459.8 kB
Tags CPython 3.11 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
45c199e60e1a5d0690f3bd84aaf5ac1a183f923395e1eda54c50c668e5238cd1
BLAKE2b-256 checksum
How to use checksums
57d7f29977562f7c7bdddd0d789b888fd630af2b6ff07cf8f0dabdb334131e03
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.59-cp311-abi3-macosx_11_0_arm64.whl

Download URL statsx-0.1.59-cp311-abi3-macosx_11_0_arm64.whl
Size 446.0 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cb66a5bec9333b0265025867a008ae14256cfd7eb8e9e92eb50dc0ecba9b87e3
BLAKE2b-256 checksum
How to use checksums
9dc489f52f381e4d34d532078ca4c4bc3b0b250139c8e6f320b4101b3b0f06a0
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.59

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