The modules in this package contain tools to calculate unified confidence intervals in different situations. For each situation a single module exists:
- simple_gaussian
Expectation value of a Gaussian distributed variable with known variance constrained to the positive domain.
- simple_poisson
Expectation value of Poissonian with known background.
- hybrid_poisson
Expectation value of Poissonian with unknown background.
The modules offer a more-or-less uniform interface to calculate the lower and upper bounds of unified confidence intervals as well as to calculate the necessary intermediate results (e.g. likelihood ratios, critical values):
- lower_limit(...)
- upper_limit(...)
- confidence_interval(...)
- critical_value(...)
- likelihood_ratio(...)
The simple_* cases above are the ones discussed in the original paper "Unified approach to the classical statistical analysis of small signals" by G.Feldman and R.Cousins arXiv:physics/9611021. For a introduction to confidence intervals see e.g. Wikipedia.
The hybrid_* cases use hybrid resampling to treat nuisance parameters, see e.g. [SWW2009] and [CL2000].
The code is running with Python 2 and 3. Except for the functions defined in unified_ci/tools.py and general dependances on NumPy and SciPy, each module is self sufficient and can be used by copying it to your respective source tree.
If you want to use the complete package it can be installed by:
Get the source code by cloning the repositiory:
git clone https://github.com/eikevons/Unified_CI.git
Install by calling setup.py inside `Unified_CI`:
python setup.py install
Test the installation:
python -c "import unified_ci; print(unified_ci)"
- CL2000
Chunag, Lai (2000) "Hybrid Resampling Methods for Confidence Intervals". In: Statistica Sinica 10(1)1-50. http://www3.stat.sinica.edu.tw/statistica/oldpdf/A10n11.pdf
- SWW2009
Sen, Walker, Woodroofe (2009) "On the unified method with nuisance parameters". In: Statistica Sinica 19(1)301--314. http://www3.stat.sinica.edu.tw/statistica/oldpdf/A19n116.pdf