Skip to main content

gaffke (Python)

The Gaffke confidence interval for the mean of a discrete bounded variable: exact (coverage at least 1 - alpha for every sample size and every distribution), narrow (the shortest published interval with this guarantee in our experiments) and fast (under a millisecond for any n).

from gaffke import gaffke_ci

# 3 answers "1", 5 answers "2", 2 answers "3" on a 1-3 scale
gaffke_ci([3, 5, 2], [1, 2, 3], alpha=0.05)
# {'lower': 1.4276..., 'upper': 2.4186...}

For two values it is the Clopper-Pearson interval. The endpoints are quantiles of a weighted sum of Dirichlet variables; dirichlet_sum_cdf, dirichlet_sum_sf, dirichlet_sum_pdf and dirichlet_sum_ppf give this law directly.

Method, references and experiments: see the implementation note at https://github.com/louisabraham/gaffke.

Metadata

Release files for gaffke 0.1.1

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

Source distribution (sdist)

Source distribution for gaffke 0.1.1
File Size Uploaded Provenance Actions
gaffke-0.1.1.tar.gz 13.8 kB Without provenance Details for gaffke-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 23.5 kB

Release files / gaffke-0.1.1.tar.gz

Download URL gaffke-0.1.1.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
92c1ce408ab270fbf23ede9a47182f04fe061bf4610fea791c60d8c1227c3b28
BLAKE2b-256 checksum
How to use checksums
456c936dbc6819055eb24ac10344d0586ab89bfe8994e5b40dc76b20f65bca56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / gaffke-0.1.1-py3-none-any.whl

Download URL gaffke-0.1.1-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
308895012ad9bfe316e2abce11e3560c93d8c72cee8910ab7ca398491da3e824
BLAKE2b-256 checksum
How to use checksums
2c7b9f1c71e3167d552da76bd5ac64f5f319520d7b8e2b7fbcc241be0d0e00ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for gaffke 0.1.1

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.

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