Skip to content

eikevons/Unified_CI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unified CI: Tools to calculate unified confidence intervals

Introduction

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].

Installation

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:

  1. Get the source code by cloning the repositiory:

    git clone https://github.com/eikevons/Unified_CI.git
  2. Install by calling setup.py inside `Unified_CI`:

    python setup.py install
  3. 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

About

Unified Confidence Intervals

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published