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.0.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.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: binconfint-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 a1cd038162d916664ae42b5c68a5889c603fc60a1053b5249a1a5008c54ca77a
MD5 31598d9a03d65f1b1cb841507c6265df
BLAKE2b-256 9d48abb6672b3002749216bc060f355327da818edbfbcd47512165c5386bd1d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for binconfint-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: binconfint-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce5f4cd04edb00130001a25aac33a5f8c57eaa5026ae3189f4f108181be22524
MD5 b08e9d207b21f08c7ff05e5b5f32e2b6
BLAKE2b-256 2caf71ac9882091edfe237925d5e4249cb76926b0efe843d49b7689f0bc304f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for binconfint-0.1.0-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

0.1.1

2 files

This release

0.1.0 This release

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