Probability integral for Chi-squared distribution.
Loading LOADSUB ALL FROM "IGAMMA.HTS"
or LOADSUB FROM "MATHLIB.HTS"
Usage INTEGER N
REAL X,Y
Y=FNP_chi2(N,X)
Description
FNP_chi2returns the value of the probability integral of the univariate chi-squared (χ²) probability density function with parametern. This integral,P(x;n), is defined by the expression
Xis often written as ²; among other uses, this notation emphasizes the fact that this integral is only nonzero for values ofx0. AlthoughPis sometimes defined forn< 0, most implementations, including this one, restrictPto being defined forn0.
P(x;n)
Errors
FNP_chi2causes an HTBasic error if its arguments are not of the types listed in the USAGE section, above, or ifnis negative.