NumberCountingUtils.h

Go to the documentation of this file.
00001 // @(#)root/roostats:$Id: NumberCountingUtils.h 29179 2009-06-23 18:39:27Z brun $
00002 // Author: Kyle Cranmer   28/07/2008
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef RooStats_NumberCountingUtils
00013 #define RooStats_NumberCountingUtils
00014 
00015 //_________________________________________________
00016 /*
00017 BEGIN_HTML
00018 <h2>NumberCountingUtils</h2>
00019 <p>
00020 These are  RooStats standalone utilities
00021 that calculate the p-value or Z value (eg. significance in
00022 1-sided Gaussian standard deviations) for a number counting experiment.
00023 This is a hypothesis test between background only and signal-plus-background.
00024 The background estimate has uncertainty derived from an auxiliary or sideband
00025 measurement.
00026 </p>
00027 <p>
00028 This is based on code and comments from Bob Cousins 
00029 and on the following papers:
00030 <p>
00031 <ul>
00032 <li>Evaluation of three methods for calculating statistical significance when incorporating a
00033 systematic uncertainty into a test of the background-only hypothesis for a Poisson process<br />
00034 Authors: Robert D. Cousins, James T. Linnemann, Jordan Tucker<br />
00035 http://arxiv.org/abs/physics/0702156<br />
00036 NIM  A 595 (2008) 480--501</li>
00037 
00038 <li>
00039 Statistical Challenges for Searches for New Physics at the LHC<br />
00040 Authors: Kyle Cranmer<br />
00041 http://arxiv.org/abs/physics/0511028
00042 </li>
00043 <li>
00044  Measures of Significance in HEP and Astrophysics<br />
00045  Authors: J. T. Linnemann<br />
00046  http://arxiv.org/abs/physics/0312059
00047 </li>
00048 </ul>
00049 <p>
00050 The problem is treated in a fully frequentist fashion by 
00051 interpreting the relative background uncertainty as
00052 being due to an auxiliary or sideband observation 
00053 that is also Poisson distributed with only background.
00054 Finally, one considers the test as a ratio of Poisson means
00055 where an interval is well known based on the conditioning on the total
00056 number of events and the binomial distribution.
00057 </p>
00058 
00059 <p>
00060 In short, this is an exact frequentist solution to the problem of
00061 a main measurement x distributed as a Poisson around s+b and a sideband or 
00062 auxiliary measurement y distributed as a Poisson around tau*b.  Eg. 
00063 </p>
00064 END_HTML
00065 BEGIN_LATEX
00066 L(x,y|s,b,#tau) = Pois(x|s+b) Pois(y|#tau b)
00067 END_LATEX
00068 BEGIN_HTML
00069 <pre>
00070 Naming conventions:
00071 Exp = Expected
00072 Obs = Observed
00073 P   = p-value
00074 Z   = Z-value or significance in sigma (one-sided convention)
00075 </pre>
00076 END_HTML
00077 */
00078 //
00079 
00080 #include "Rtypes.h"
00081 
00082 
00083 namespace RooStats{
00084 
00085    namespace  NumberCountingUtils {
00086 
00087   
00088   // Expected P-value for s=0 in a ratio of Poisson means.  
00089   // Here the background and its uncertainty are provided directly and 
00090   // assumed to be from the double Poisson counting setup described in the 
00091   // BinomialWithTau functions.  
00092   // Normally one would know tau directly, but here it is determiend from
00093   // the background uncertainty.  This is not strictly correct, but a useful 
00094   // approximation.
00095      Double_t BinomialExpZ(Double_t sExp, Double_t bExp, Double_t fractionalBUncertainty);
00096 
00097   // See BinomialWithTauExpP
00098      Double_t BinomialWithTauExpZ(Double_t sExp, Double_t bExp, Double_t tau);   
00099 
00100   // See BinomialObsP
00101      Double_t BinomialObsZ(Double_t nObs, Double_t bExp, Double_t fractionalBUncertainty);
00102 
00103   // See BinomialWithTauObsP
00104      Double_t BinomialWithTauObsZ(Double_t nObs, Double_t bExp, Double_t tau);
00105      
00106   // See BinomialExpP
00107      Double_t BinomialExpP(Double_t sExp, Double_t bExp, Double_t fractionalBUncertainty);
00108 
00109   // Expected P-value for s=0 in a ratio of Poisson means.  
00110   // Based on two expectations, a main measurement that might have signal
00111   // and an auxiliarly measurement for the background that is signal free.
00112   // The expected background in the auxiliary measurement is a factor
00113   // tau larger than in the main measurement.
00114      Double_t BinomialWithTauExpP(Double_t sExp, Double_t bExp, Double_t tau);
00115 
00116   // P-value for s=0 in a ratio of Poisson means.  
00117   // Here the background and its uncertainty are provided directly and 
00118   // assumed to be from the double Poisson counting setup.  
00119   // Normally one would know tau directly, but here it is determiend from
00120   // the background uncertainty.  This is not strictly correct, but a useful 
00121   // approximation.
00122      Double_t BinomialObsP(Double_t nObs, Double_t, Double_t fractionalBUncertainty);
00123 
00124   // P-value for s=0 in a ratio of Poisson means.  
00125   // Based on two observations, a main measurement that might have signal
00126   // and an auxiliarly measurement for the background that is signal free.
00127   // The expected background in the auxiliary measurement is a factor
00128   // tau larger than in the main measurement.
00129      Double_t BinomialWithTauObsP(Double_t nObs, Double_t bExp, Double_t tau);
00130       
00131 
00132    }
00133 }
00134 
00135 #endif

Generated on Tue Jul 5 14:26:25 2011 for ROOT_528-00b_version by  doxygen 1.5.1