Skip to main content

Accurate significance and p-values for count data

Project description

Count Significance

count-significance provides numerical tools for discovery significances and p-values in Poisson counting experiments.

It supports:

  • a single Poisson count with known background;
  • an on/off experiment with a Poisson control measurement;
  • exact or profiled reference calculations;
  • first-order profile-likelihood approximations;
  • higher-order Barndorff-Nielsen corrections;
  • Asimov and Monte Carlo estimates of median discovery significance.

Installation

The package requires Python 3.9 or newer.

python -m pip install count-significance

Example

from count_significance import (
    asimov_Zs_onoff,
    expected_significance_on,
    pvals_on,
    pvals_onoff_profile_sum,
)

known = pvals_on(s0=0.0, b=1.0, n=4)
onoff = pvals_onoff_profile_sum(s=0.0, n=5, m=1, tau=1.0)

known_expected = expected_significance_on(s_true=5.0, b=10.0)
onoff_expected = asimov_Zs_onoff(s_true=5.0, b=10.0, tau=2.0)

The public namespace is count_significance. The package reports one-sided discovery significances and distinguishes numerical reference calculations from asymptotic approximations.

Documentation and reproducibility

The GitHub repository contains the full mathematical overview, API notes, tests, plotting scripts, paper configurations, notebook, generated figures, and HTCondor production workflow.

This software accompanies the manuscript Discovery Sensitivity for a Counting Experiment with Background Uncertainty by Enzo Canonero and Glen Cowan.

Citation

Citation metadata are provided in CITATION.cff.

License

Count Significance is distributed under the MIT License.

Project details


Download files

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

Source Distribution

count_significance-0.2.0.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

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

count_significance-0.2.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file count_significance-0.2.0.tar.gz.

File metadata

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

File hashes

Hashes for count_significance-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a7460ec5272e4a058b7d05b05fdbd92525b176cc12352f95cf38b639fb0aa128
MD5 0e086b3d0709c61cb66b37b36c6198bf
BLAKE2b-256 fd032fc11eaeb3cf0864f514dcc8be18aa28f7595c04718a16e230ffc6db9db6

See more details on using hashes here.

Provenance

The following attestation bundles were made for count_significance-0.2.0.tar.gz:

Publisher: publish.yml on EnzoCanonero/count-significance

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

File details

Details for the file count_significance-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for count_significance-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db2e2249c817bbc5fd39100b3cf4a90c235d713f79b8c2b67c024aeb5bb39fcc
MD5 0b7be69b38bf71c0c7e3754170659454
BLAKE2b-256 7d83a0a1585de8f29fc32228da0f6a6a7d2088a84f239492744aa62b015a16c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for count_significance-0.2.0-py3-none-any.whl:

Publisher: publish.yml on EnzoCanonero/count-significance

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

Supported by

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