The deviate,
${x}_{p}$, associated with the lower tail probability
$p$ of the
${\chi}^{2}$-distribution with
$\nu $ degrees of freedom is defined as the solution to
The required
${x}_{p}$ is found by using the relationship between a
${\chi}^{2}$-distribution and a gamma distribution, i.e., a
${\chi}^{2}$-distribution with
$\nu $ degrees of freedom is equal to a gamma distribution with scale parameter
$2$ and shape parameter
$\nu /2$.
For very large values of
$\nu $, greater than
${10}^{5}$, Wilson and Hilferty's normal approximation to the
${\chi}^{2}$ is used; see
Kendall and Stuart (1969).
Best D J and Roberts D E (1975) Algorithm AS 91. The percentage points of the ${\chi}^{2}$ distribution Appl. Statist. 24 385–388
The results should be accurate to five significant digits for most argument values. Some accuracy is lost for $p$ close to $0.0$.
For higher accuracy the relationship described in
Section 3 may be used and a direct call to
nag_deviates_gamma_dist (g01ffc) made.