UNDOCUMENTED.
Prototypes | |
double | XLALLogChisqCCDF (double chi2, double dof) |
Compute the natural logarithm of the complementary cumulative probability function of the \(\chi^{2}\) distribution. More... | |
double XLALLogChisqCCDF | ( | double | chi2, |
double | dof | ||
) |
Compute the natural logarithm of the complementary cumulative probability function of the \(\chi^{2}\) distribution.
Returns the natural logarithm of the probability that \(x_{1}^{2} + \cdots + x_{\mathrm{dof}}^{2} \geq \chi^{2}\), where \(x_{1}, \ldots, x_{\mathrm{dof}}\) are independent zero mean unit variance Gaussian random variables. The integral expression is \(\ln Q = \ln \int_{\chi^{2}/2}^{\infty} x^{\frac{n}{2}-1} \mathrm{e}^{-x} / \Gamma(n/2) \, \mathrm{d}x\), where \(n = \mathrm{dof} =\) number of degrees of freedom.
Results agree with Mathematica to 15 digits or more where the two have been compared and where Mathematica is able to compute a result. For example, it does not seem to be possible to obtain a numerical result from Mathematica for the equivalent of XLALLogChisqCCDF(10000.0, 8.5) using any number of digits in the intermediate calculations, though the two implementations agree to better than 15 digits at XLALLogChisqCCDF(10000.0, 8.0)
Definition at line 54 of file XLALChisq.c.