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

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.42
File Size Uploaded Provenance Actions
statsx-0.1.42.tar.gz 130.5 kB Without provenance Details for statsx-0.1.42.tar.gz

Built distributions (wheels)

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

Total release size: 2.7 MB

Release files / statsx-0.1.42.tar.gz

Download URL statsx-0.1.42.tar.gz
Size 130.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8c70f6e4d9a673552c26715668beb1077f856d0d3bcbbfd0f0046e30f98247dc
BLAKE2b-256 checksum
How to use checksums
1c4d661910b83bad7a6e3faa2dffd3019415c78c6bd3166f8cce2cabbecee9f8
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.42-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL statsx-0.1.42-cp311-abi3-musllinux_1_2_x86_64.whl
Size 439.6 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
85e9ae0b8e2edf6a28fbe7427412609d41f28c3f1ad0621f99ac53838c156bd0
BLAKE2b-256 checksum
How to use checksums
3c1bcae983f4c5e36e21820a5707997f5e769fcf51f41f5afc0be0ae89b4f4a6
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.42-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL statsx-0.1.42-cp311-abi3-musllinux_1_2_aarch64.whl
Size 423.5 kB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
3100403bf4a8a91e547d50758da302eca98175452bbf22788db7cfac6616c084
BLAKE2b-256 checksum
How to use checksums
a8d64f26a6c0536a84676f09eabae3a813a13e757919509b6c3059427c1367f4
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.42-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL statsx-0.1.42-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 441.0 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
74b4cf1c3b610242682b0b660c7b07548bb6575ef5794d7359768ef2d9bd6a75
BLAKE2b-256 checksum
How to use checksums
bbe15a0dfa445066e03edde75610a1cc58f90fccdca2e8b8ebd13e82911ad908
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.42-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL statsx-0.1.42-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 424.8 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
62294326a51138a9c81e74b7008a3181828f928d73547ad1ad277bf1c8b78538
BLAKE2b-256 checksum
How to use checksums
1d2e8b5ad08219f087fedfe95628ad8bf17d599d050d9fc3c4cbb0240faf5e63
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.42-cp311-abi3-macosx_11_0_x86_64.whl

Download URL statsx-0.1.42-cp311-abi3-macosx_11_0_x86_64.whl
Size 442.5 kB
Tags CPython 3.11 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
076fbf9c70c4a03c118d7b3a1dc48b86ab23bca15ac6b14d151c8f63612383c0
BLAKE2b-256 checksum
How to use checksums
cbae8d99a8b5c334d2aba129a787d947cb0afea21c9cb8d6d3a3a3ffa6c18955
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.42-cp311-abi3-macosx_11_0_arm64.whl

Download URL statsx-0.1.42-cp311-abi3-macosx_11_0_arm64.whl
Size 429.2 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
74c4c79dd637f2b3ee623ad0f0e6540c3a06a84e88dc61edb26dc91685084ed7
BLAKE2b-256 checksum
How to use checksums
cd9f2438e64050a35910dd9a713563580d2c8bb7099be9c546088af317c8920f
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.42

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