npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
npstat::PearsonsChiSquared Class Reference
Inheritance diagram for npstat::PearsonsChiSquared:
npstat::AbsBinnedComparison1D

Public Member Functions

 PearsonsChiSquared (double minCountToUse, double subtractForNDoFCalculation, bool forUncertaintyUseReferenceOnly)
 
virtual const char * name () const
 
- Public Member Functions inherited from npstat::AbsBinnedComparison1D
template<typename T1 , typename T2 >
void compare (const T1 *data, const T2 *reference, unsigned len, double *distance, double *pvalue) const
 

Additional Inherited Members

- Static Protected Member Functions inherited from npstat::AbsBinnedComparison1D
static unsigned long realToULong (const long double d)
 
static double pvalueByPseudo (const AbsDiscreteDistribution1DDistance &c, AbsRandomGenerator &rng, const DiscreteTabulated1D &data, double dataSampleSize, const DiscreteTabulated1D &reference, double refSampleSize, double observedDistance, unsigned nPseudo)
 

Constructor & Destructor Documentation

◆ PearsonsChiSquared()

npstat::PearsonsChiSquared::PearsonsChiSquared ( double  minCountToUse,
double  subtractForNDoFCalculation,
bool  forUncertaintyUseReferenceOnly 
)

Constructor arguments are as follows:

minCountToUse – Only bins with reference counts above this cutoff (or bins with sum of reference and data above this cutoff in case the parameter "forUncertaintyUseReferenceOnly" is false) will be used to calculate the chi-square.

subtractForNDoFCalculation – The number to be subtracted from the number of bins passing the cut in order to calculate the number of degrees of freedom. This can be useful in case the reference distribution was fitted from data or normalized to the data.

forUncertaintyUseReferenceOnly – If true, only reference counts will be used to estimate variance of bin difference (otherwise the variance is set to the sum of data and reference).

Member Function Documentation

◆ name()

virtual const char* npstat::PearsonsChiSquared::name ( ) const
virtual

Printable name identifying the comparison method

Implements npstat::AbsBinnedComparison1D.


The documentation for this class was generated from the following file: