Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
BinomialInterval::alpha_min_
double alpha_min_
Definition:
BinomialInterval.h:85
BinomialInterval::set
void set(double l, double u)
Definition:
BinomialInterval.h:92
BinomialInterval::upper_
double upper_
Definition:
BinomialInterval.h:90
n
int n
Definition:
DTDataIntegrityTask.cc:30
BinomialInterval::lower_
double lower_
Definition:
BinomialInterval.h:89
ClopperPearsonBinomialInterval.h
ClopperPearsonBinomialInterval::calculate
void calculate(const double successes, const double trials)
Definition:
ClopperPearsonBinomialInterval.cc:16
Generated for CMSSW Reference Manual by
1.8.5