The CHISQR_CVF function computes the cutoff value V in a chi-square distribution with Df degrees of freedom such that the probability that a random variable X is greater than V is equal to a user-supplied probability P.

This routine is written in the IDL language. Its source code can be found in the file chisqr_cvf.pro in the lib subdirectory of the IDL distribution.

Examples


Use the following command to compute the cutoff value in a chi-square distribution with three degrees of freedom such that the probability that a random variable X is greater than the cutoff value is 0.100. The result should be 6.25139.

PRINT, CHISQR_CVF(0.100, 3)

IDL prints:

6.25139

Syntax


Result = CHISQR_CVF(P, Df)

Return Value


Returns computes the cutoff value V in a chi-square distribution with Df degrees of freedom such that the probability that a random variable X is greater than V is equal to a user-supplied probability P.

Arguments


P

A non-negative single- or double-precision floating-point scalar, in the interval [0.0, 1.0], that specifies the probability of occurrence or success.

Df

A positive integer, single- or double-precision floating-point scalar that specifies the number of degrees of freedom of the chi-square distribution.

Keywords


None.

Version History


4.0

Introduced

See Also


CHISQR_PDF, F_CVF, GAUSS_CVF, T_CVF