Skip to main content

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

binconfint-0.1.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

binconfint-0.1.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file binconfint-0.1.1.tar.gz.

File metadata

  • Download URL: binconfint-0.1.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for binconfint-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4822610b9f85de8c90d50c3f67f4fd9dc6fe06dd8f584cf16257494a2f9203de
MD5 0c3dbac54b6b1c453810b26a85cb8635
BLAKE2b-256 8e5b6e16d7c3f523e9507c2bb720050516287b79d316edb7000b10f2e7d8cec8

See more details on using hashes here.

Provenance

The following attestation bundles were made for binconfint-0.1.1.tar.gz:

Publisher: publish.yml on usmandroid/binconfint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file binconfint-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: binconfint-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for binconfint-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fdae8483da9f92fb409e41d09e4246812920e819b07e88342c220e01ac7f9df5
MD5 a2239d3418bdcd0b4afb9f7f39bafef4
BLAKE2b-256 2977a4e1a78be0e0b8a5d402969259ea11fd1d0b1c7093ec8fbc0ea816606558

See more details on using hashes here.

Provenance

The following attestation bundles were made for binconfint-0.1.1-py3-none-any.whl:

Publisher: publish.yml on usmandroid/binconfint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page