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

Built distribution (wheel)

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

Total release size: 23.3 kB

Release files / gaffke-0.1.0.tar.gz

Download URL gaffke-0.1.0.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
42b9ee74a7811c8399a4c7154d6b27b9da343f72ee910d57cc05c254220f270a
BLAKE2b-256 checksum
How to use checksums
d7d1560cb7bc628f889bc8dcc41a8257128e713a7fad1d9d3d8438718935f839
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.0-py3-none-any.whl

Download URL gaffke-0.1.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c149985aa7da7ba8fee29d509c9c67aca17092c06aeb2fcac3d682c8522c671
BLAKE2b-256 checksum
How to use checksums
e05080ef906b72c69b5d11484b6073aa130a3a5934598c2d7da3b2c778419c6c
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.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.

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