Beispiel #1
0
 /// @param pdf DhbStatistics.ScaledProbabilityDensityFunction
 /// @return double	chi2 of histogram compared to supplied
 ///											probability distribution.
 public double Chi2ConfidenceLevel(
                                 ScaledProbabilityDensityFunction pdf)
 {
     return (new ChiSquareDistribution(_contents.Length -
                                             pdf.Parameters.Length))
                     .ConfidenceLevel(Chi2Against(pdf));
 }
Beispiel #2
0
 /// @param pdf DhbStatistics.ScaledProbabilityDensityFunction
 /// @return double	chi2 of histogram compared to supplied
 /// 											probability distribution.
 public double Chi2Against(ScaledProbabilityDensityFunction pdf)
 {
     double chi2 = 0;
     for (int i = 0; i < _contents.Length; i++)
         chi2 += new WeightedPoint(1, _contents[i]).Chi2Contribution(pdf);
     return chi2;
 }