CMS 3D CMS Logo

List of all members | Public Member Functions
ClopperPearsonBinomialInterval Class Reference

#include <ClopperPearsonBinomialInterval.h>

Inheritance diagram for ClopperPearsonBinomialInterval:
BinomialInterval

Public Member Functions

void calculate (const double successes, const double trials)
 
const char * name () const
 
- Public Member Functions inherited from BinomialInterval
double alpha () const
 
bool contains (double rho)
 
double coverage_prob (const double rho, const int trials)
 
void dump (const int trials_min, const int trials_max)
 
void init (const double alpha, const tail_type t=equal_tailed)
 
double length () const
 
double lower () const
 
virtual bool neyman (const int ntot, const int nrho, double *rho, double *x_l, double *x_r)
 
void scan_ntot (const double rho, const int ntot_min, const int ntot_max, double *ntot, double *prob)
 
void scan_rho (const int ntot, const int nrho, double *rho, double *prob)
 
double upper () const
 

Additional Inherited Members

- Public Types inherited from BinomialInterval
enum  tail_type { equal_tailed, lower_tailed, upper_tailed }
 
- Protected Member Functions inherited from BinomialInterval
void set (double l, double u)
 
- Protected Attributes inherited from BinomialInterval
double alpha_
 
double alpha_min_
 
double kappa2_
 
double kappa_
 
double lower_
 
tail_type type_
 
double upper_
 

Detailed Description

Definition at line 21 of file ClopperPearsonBinomialInterval.h.

Member Function Documentation

void ClopperPearsonBinomialInterval::calculate ( const double  successes,
const double  trials 
)
virtual

Implements BinomialInterval.

Definition at line 16 of file ClopperPearsonBinomialInterval.cc.

References BinomialInterval::alpha_min_, BinomialInterval::lower_, and BinomialInterval::upper_.

16  {
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
const char* ClopperPearsonBinomialInterval::name ( void  ) const
inlinevirtual

Implements BinomialInterval.

Definition at line 24 of file ClopperPearsonBinomialInterval.h.

Referenced by config.CFG::__str__(), validation.Sample::digest(), and VIDSelectorBase.VIDSelectorBase::initialize().

24 { return "Clopper-Pearson"; }