

File indexing completed on 20210214 12:50:06
0001 #ifndef ChiSquared_H 0002 #define ChiSquared_H 0003 0004 /** \class ChiSquared 0005 * Constructed with total chisquared value `value` and number of degrees 0006 * of freedom `ndf`. <BR> 0007 * 0008 * Computes chisquared upper tail probability, 0009 * i.e. the probability that an observation, correctly described by 0010 * a model with nrDOF, will give rise to a chisquared larger than the one 0011 * observed. From this, one can interpret this probability as how likely 0012 * it is to observe as high (or higher) a chisquared. <BR> 0013 * 0014 * Also computes the natural logarithm of that probability, 0015 * useful to compare very unlikely events, for which the probability 0016 * is rounded off to 0. 0017 */ 0018 0019 class ChiSquared { 0020 public: 0021 ChiSquared(float value, float ndf) : theValue(value), theNDF(ndf) {} 0022 0023 float value() const; 0024 float degreesOfFreedom() const; 0025 float probability() const; 0026 float lnProbability() const; 0027 0028 private: 0029 float theValue, theNDF; 0030 }; 0031 0032 #endif
[ Source navigation ]  [ Diff markup ]  [ Identifier search ]  [ general search ] 
This page was automatically generated by the 2.2.1 LXR engine. The LXR team 