lauztat
Pure python statistics tools for high energy physics using zfit as a backend for maximum likelihood fits.
Tests for discovery, upper limits and confidence intervals are provided based on likelihood ratios in a frequentist approach (using pseudo-experiments) or using asymptotic formulae from “Asymptotic formulae for likelihood-based tests of new physics” [arxiv:1007.1727].
lauztat has been developed at EPFL, Lausanne Switzerland (laus’ or lauz is how the cool kids call Lausanne).
Installation
Install lauztat like any other Python package:
pip install lauztat # maybe with sudo or --user, or in virtualenv
Dependencies
matplotlib (optionnal)
Getting started
Usual HEP results can be recast in terms of hypothesis testing where you have to choose a null H0 and an alternative H1 hypothesis, H0 being the one you want to disprove. To do a test you will need your data (and weights), a model, a loss function builder and a minimizer as input to a calculator (FrequentistCalculator or AsymptoticCalculator).
Discovery:
if you do a measurement to find signals S in a dataset and you find an excess, this test answers “is the data compatible with the background only ?” with:
H0: background only (S = 0)
H1: presence of a signal (S ≠ 0)
The test return a p-value or a significance Z. If Z ≥ 3 there is an evidence and if Z ≥ 5 a discovery of a signal.
Examples of significance computations for a gaussian peak over an exponential background are provided for the asymptotic calculator and the frequentist calculator and can be ran in mybinder.
Upper limit:
if you find a small signal excess in a dataset, but not enough to claim an evidence or a discovery, you can exclude large signal yields S:
H0: background + some signal (S = S0)
H1: S < S0
S0 is adjusted to a predefined p-value, typically 5%. S0 is the upper limit on the signal yield S with 95 % confidence level (CL = 1 - p ; p = 5 % ⟺ CL = 95%).
Examples of CLs upper limits on the signal yield for a gaussian peak over an exponential background are provided for the asymptotic calculator and the frequentist calculator and can be ran in mybinder.
Confidence interval:
if you do a measurement of a parameter α with an estimator ᾰ, given an observation ᾰobs what value of α are not rejected at a certain confidence level (typically 68%)?
H0: α ≤ α down or α ≥ αup
H1: αdown < α < αup
αdown and αup are adjusted such the test returns a p-value of 32%.
Examples of confidence intervals on the mean of a gaussian peak are provided for the asymptotic calculator and the frequentist calculator (Feldman and Cousins confidence interval [arxiv:9711021]) and can be ran in mybinder.
Metadata
Release files for lauztat 1.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lauztat-1.1.7.tar.gz | 15.5 kB | Without provenance | Details for lauztat-1.1.7.tar.gz |
Release files / lauztat-1.1.7.tar.gz
| Download URL | lauztat-1.1.7.tar.gz |
|---|---|
| Size | 15.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdc431db6431b9305b266e0303b7677ed103967c1cd25abe6b1eb82d9de787ee
|
|
BLAKE2b-256 checksum How to use checksums |
ffad0d54ec8e14858ece46d1e806975971b1e31068ab4cf1467037f6cc924774
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Security for lauztat 1.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.