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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7460ec5272e4a058b7d05b05fdbd92525b176cc12352f95cf38b639fb0aa128
|
|
| MD5 |
0e086b3d0709c61cb66b37b36c6198bf
|
|
| BLAKE2b-256 |
fd032fc11eaeb3cf0864f514dcc8be18aa28f7595c04718a16e230ffc6db9db6
|
Provenance
The following attestation bundles were made for count_significance-0.2.0.tar.gz:
Publisher:
publish.yml on EnzoCanonero/count-significance
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
count_significance-0.2.0.tar.gz -
Subject digest:
a7460ec5272e4a058b7d05b05fdbd92525b176cc12352f95cf38b639fb0aa128 - Sigstore transparency entry: 2300334818
- Sigstore integration time:
-
Permalink:
EnzoCanonero/count-significance@1c09170cc38c939dd6daf242c7a8ef6af9aada6f -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/EnzoCanonero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1c09170cc38c939dd6daf242c7a8ef6af9aada6f -
Trigger Event:
release
-
Statement type:
File details
Details for the file count_significance-0.2.0-py3-none-any.whl.
File metadata
- Download URL: count_significance-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db2e2249c817bbc5fd39100b3cf4a90c235d713f79b8c2b67c024aeb5bb39fcc
|
|
| MD5 |
0b7be69b38bf71c0c7e3754170659454
|
|
| BLAKE2b-256 |
7d83a0a1585de8f29fc32228da0f6a6a7d2088a84f239492744aa62b015a16c9
|
Provenance
The following attestation bundles were made for count_significance-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on EnzoCanonero/count-significance
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
count_significance-0.2.0-py3-none-any.whl -
Subject digest:
db2e2249c817bbc5fd39100b3cf4a90c235d713f79b8c2b67c024aeb5bb39fcc - Sigstore transparency entry: 2300334845
- Sigstore integration time:
-
Permalink:
EnzoCanonero/count-significance@1c09170cc38c939dd6daf242c7a8ef6af9aada6f -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/EnzoCanonero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1c09170cc38c939dd6daf242c7a8ef6af9aada6f -
Trigger Event:
release
-
Statement type: