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

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.2
File Size Uploaded Provenance Actions
gaffke-0.1.2.tar.gz 14.0 kB Without provenance Details for gaffke-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 23.7 kB

Release files / gaffke-0.1.2.tar.gz

Download URL gaffke-0.1.2.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5edfa650a9069c339991aa4f60139851a84fe5cf8be82dde0f4634d88c96e2ee
BLAKE2b-256 checksum
How to use checksums
9f9f0a4a72eff0ba6ddef5709e33f0a6d0f48d5e5733a9612936e9e76930e8f9
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.2-py3-none-any.whl

Download URL gaffke-0.1.2-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f6279d5ce21bf714f822075ef30075b802402ef75f7a0164ba4f8d01cd57e3b
BLAKE2b-256 checksum
How to use checksums
cbc3428e49c1668080fdf2ed101769f307acbefce57ab2076172e64c8ec790be
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.2

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