Skip to main content

binconfint banner PyPI version Python versions License GitHub stars

binconfint - Python based confidence Interval for binomial data

Use Cases

Communications/Signal Processing

Estimate bit error rate (BER) from test results with statistical confidence:

from binconfint import berconfint

# After transmitting 1,000,000 bits, 15 errors detected
ber, ci = berconfint(15, 1_000_000)
ci_lower, ci_upper = ci
print(f"BER: {ber:.2e} with 95% CI: [{ci_lower:.2e}, {ci_upper:.2e}]")

Quality Control/Testing

Estimate defect rates with confidence intervals:

from binconfint import berconfint

# 3 defective units out of 500 tested
ber, ci = berconfint(3, 500, level=0.99)
ci_lower, ci_upper = ci
print(f"Defect Rate with 99% CI: [{ci_lower:.4f}, {ci_upper:.4f}]")

Clinical Trials / Medical Statistics

Calculate success rate confidence intervals:

from binconfint import berconfint

# Treatment success: 42 out of 50 patients
success_rate, ci = berconfint(42, 50, level=0.95)
ci_lower, ci_upper = ci
print(f"Success Rate with 95% CI: [{ci_lower:.4f}, {ci_upper:.4f}]")

Algorithm Details

The confidence intervals use the F-distribution method, which is more accurate for extreme cases (0 errors or all errors) compared to normal approximation.

References:

  • Johnson, Norman L., Kotz, Samuel, & Kemp, Adrienne W., "Univariate Discrete Distributions, Second Edition", Wiley 1992 p. 124-130.
  • Abramowitz, M. and Stegun, I. A., "Handbook of Mathematical Functions", Government Printing Office, 1964, 26.6.2

Metadata

Release files for binconfint 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 binconfint 0.1.2
File Size Uploaded
binconfint-0.1.2.tar.gz 5.4 kB Details

Built distribution (wheel)

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

Total release size: 10.1 kB

Release files / binconfint-0.1.2.tar.gz

Download URL binconfint-0.1.2.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4aa4590c5619f171da3b02a48698c3fa29ab57bb45be0b0c4545a54a5308f47b
BLAKE2b-256 checksum
How to use checksums
5b7d99c223cd21564f623aac198e83091c9c94d87855514bea9a6930c9e4e6a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / binconfint-0.1.2-py3-none-any.whl

Download URL binconfint-0.1.2-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bea088d60e8314335f47f123993249d9bd891067312d94914e3da69b87cea1c6
BLAKE2b-256 checksum
How to use checksums
08f492c50059c297929eb15ade37d329b5eea9f6dd540dc60211f4ed20d2bc46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

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