Skip to main content

methodeutics

Anytime-valid evidence as a running bet. The e-value bankroll, in three lines:

from methodeutics import Bankroll, bernoulli

b = Bankroll(bernoulli(p0=0.5, p1=0.6), alpha=0.05).extend(observations)
b.plot()  # pip install methodeutics[plot]

Start with one dollar. Each observation multiplies your bankroll by the likelihood ratio the alternative assigns against the null. If the null is true, no strategy grows the dollar on average, and the bankroll crosses 1/alpha with probability at most alpha, no matter when or how often you look (Ville's inequality). If the null is false, the bankroll compounds. Look every day. Stop whenever you want. The guarantee holds.

b.e           # current e-value
b.trajectory  # e-value after each observation
b.threshold   # 1/alpha, pre-committed
b.decided     # crossed the threshold? (remembered even if it later falls)
b.compose(b2) # evidence from an independent bankroll: multiply, no correction

Models: normal(null_mean, alt_mean, sd), bernoulli(p0, p1), categorical(null, alt), or any callable lr(x) returning a likelihood ratio.

This is the companion package to chapters 9-10 of the Methodeutics textbook, where the bankroll is derived from scratch and the three guarantees (anytime validity, optional stopping, composition) are stated with their lineage: Ville 1939, Doob 1953, Shafer 2021, Ramdas 2023, Grünwald 2024.

Not the epidemiology E-value (VanderWeele & Ding's sensitivity-analysis quantity). Same letter, unrelated concept.

See also: confseq (confidence sequences, the reference implementation), expectation (a fuller e-process library), savvi (anytime-valid inference for specific models).

AGPL-3.0-or-later license.

Metadata

Release files for methodeutics 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for methodeutics 0.1.0
File Size Uploaded Provenance
methodeutics-0.1.0.tar.gz 134.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for methodeutics 0.1.0
File Interpreter ABI Platform
methodeutics-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 151.8 kB

Release files / methodeutics-0.1.0.tar.gz

Download URL methodeutics-0.1.0.tar.gz
Size 134.1 kB
Tags Source
SHA-256 checksum
How to use checksums
18b705805b4879d19abc4b2a7a5f7f819b0e24bd40c5a00098c1e5dc596649b2
BLAKE2b-256 checksum
How to use checksums
fcc2aa6a0f6c26f8998d855cb37f4b40bf0775d8bf11dd3b1476e08a2bf1a48a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / methodeutics-0.1.0-py3-none-any.whl

Download URL methodeutics-0.1.0-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c9fb27ea4089ca0db499a1fd9f7da26079c87dbf59ec3804ed645b2cd92c207
BLAKE2b-256 checksum
How to use checksums
f15f6d547ba7130ae61191f0a071b1a9719bf0dae336faaac0129fba56fff4c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for methodeutics 0.1.0

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

2 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