contrib/mul/vpdfl/vpdfl_prob_chi2.h
Go to the documentation of this file.
00001 #ifndef vpdfl_prob_chi2_h
00002 #define vpdfl_prob_chi2_h
00003 
00004 //:
00005 // \file
00006 // \author Tim Cootes
00007 // \date 12-Apr-2001
00008 // \brief Functions for Chi distribution
00009 
00010 //: P(chi<chi2)
00011 // Calculates the probability that a value generated
00012 // at random from a chi-square distribution with given
00013 // degrees of freedom is less than the value chi2
00014 // \param n_dof  Number of degrees of freedom
00015 // \param chi2  Value of chi-squared
00016 double vpdfl_cum_prob_chi2(int n_dof, double chi2);
00017 
00018 
00019 
00020 //: Returns X such that P(chi<X | dof==n)==p
00021 // The value of Chi-Squared such that the probability
00022 // that a random variable drawn from a chi-2 distribution
00023 // is less than Chi_Squared is p.
00024 // \param p  Target probability
00025 // \param n  Number of dimensions
00026 // \param tol  Tolerance of result (default = 0.001)
00027 double vpdfl_chi2_for_cum_prob(double p, int n, double tol=0.001);
00028 
00029 #endif
00030