CMS 3D CMS Logo

ClopperPearsonBinomialInterval.cc
Go to the documentation of this file.
1 #include "Math/QuantFuncMathCore.h"
2 
3 #if (defined (STANDALONE) or defined (__CINT__) )
5 
7 #else
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 }
#define X(str)
Definition: MuonsGrabber.cc:48
ClassImp(AliDaqEventHeader) ClassImp(AliDaqPosition2D) ClassImp(AliDaqPositionCOPS) ClassImp(AliDaqTilt) ClassImp(AliDaqDistance) ClassImp(AliDaqTemperature) ClassImp(CocoaDaqRootEvent) CocoaDaqRootEvent
void calculate(const double successes, const double trials)