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

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.2.tar.gz (5.4 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.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: binconfint-0.1.2.tar.gz
  • Upload date:
  • Size: 5.4 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.2.tar.gz
Algorithm Hash digest
SHA256 4aa4590c5619f171da3b02a48698c3fa29ab57bb45be0b0c4545a54a5308f47b
MD5 9afa89f6509b6c0937dfb471689f7c53
BLAKE2b-256 5b7d99c223cd21564f623aac198e83091c9c94d87855514bea9a6930c9e4e6a3

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: binconfint-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bea088d60e8314335f47f123993249d9bd891067312d94914e3da69b87cea1c6
MD5 540a42d5e7c2ce3825e8c1ebb4ee9fb1
BLAKE2b-256 08f492c50059c297929eb15ade37d329b5eea9f6dd540dc60211f4ed20d2bc46

See more details on using hashes here.

Provenance

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

This release

0.1.2 This release

2 files

0.1.1

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