Main Page
Namespaces
Classes
Package Documentation
src
PhysicsTools
RooStatsCms
src
ClopperPearsonBinomialInterval.cc
Go to the documentation of this file.
1
#include "Math/QuantFuncMathCore.h"
2
3
#if (defined (STANDALONE) or defined (__CINT__) )
4
#include "
ClopperPearsonBinomialInterval.h
"
5
6
ClassImp
(
ClopperPearsonBinomialInterval
);
7
#else
8
#include "
PhysicsTools/RooStatsCms/interface/ClopperPearsonBinomialInterval.h
"
9
#endif
10
11
using
ROOT::Math::beta_quantile;
12
using
ROOT::Math::beta_quantile_c;
13
14
// Language of Brown, Cai, DasGupta: p = binomial parameter, X = # successes, n = # trials.
15
16
void
ClopperPearsonBinomialInterval::calculate
(
const
double
X
,
const
double
n
) {
17
set
(0, 1);
18
if
(X > 0)
19
lower_
= beta_quantile (
alpha_min_
, X, n - X + 1);
20
if
(n - X > 0)
21
upper_
= beta_quantile_c(
alpha_min_
, X + 1, n - X);
22
}
X
#define X(str)
Definition:
MuonsGrabber.cc:48
ClopperPearsonBinomialInterval
Definition:
ClopperPearsonBinomialInterval.h:21
ClopperPearsonBinomialInterval::calculate
void calculate(const double successes, const double trials) override
Definition:
ClopperPearsonBinomialInterval.cc:16
BinomialInterval::alpha_min_
double alpha_min_
Definition:
BinomialInterval.h:86
BinomialInterval::upper_
double upper_
Definition:
BinomialInterval.h:91
gen::n
int n
Definition:
Cascade2Hadronizer.cc:79
BinomialInterval::lower_
double lower_
Definition:
BinomialInterval.h:90
ClopperPearsonBinomialInterval.h
ClassImp
ClassImp(ClopperPearsonBinomialInterval)
Generated for CMSSW Reference Manual by
1.8.11