invChiSquareDistribution

fun invChiSquareDistribution(p: Double, dof: Double, maxSeriesIterations: Int = CHISQ_CDF_SERIES_MAX_ITERATIONS, maxIncGammaIterations: Int = INC_GAMMA_MAX_ITERATIONS, EPS: Double = KSLMath.defaultNumericalPrecision): Double

Algorithm AS 91 Appl. Statist. (1975) Vol.24, P.35

To evaluate the percentage points of the chi-squared probability distribution function.

logGammaFunction(v/2.0))

Incorporates the suggested changes in AS R85 (vol.40(1), pp.233-5, 1991)

Auxiliary routines required: PPND = AS 111 (or AS 241) and GAMMAD = AS 239.

Return

The quantile at p

Parameters

p

must lie in the range 0.0,1.0

dof

must be positive, degrees of freedom

maxSeriesIterations

must be greater than 0. Maximum number of iterations permitted in the series computation, default is 500

maxIncGammaIterations

maximum number of iterations for incomplete gamma computation

EPS

the numerical precision for convergence of series/continued fraction evaluation