next up previous index
Next: G101 Inverse of Up: CERNLIB Previous: F500 Linear Homogeneous

G100 Upper Tail Probability of Chi-Squared Distribution

Routine ID: G100
Author(s): G. Folger, K.S. KölbigLibrary: MATHLIB
Submitter: Submitted: 21.08.1971
Language: FortranRevised: 15.01.1994

Function subprogram PROB computes the probability that a random variable having a χ2 -distribution with N ≥1

degrees of freedom assumes a value which is larger than a given value X ≥0 , i.e.

Q(X|N) = {12N Γ({12}N)} ∫X&inf;e-{12}t t{12}N-1 dt.

Structure:

FUNCTION subprogram
User Entry Names: PROB
External References: ERFC, DERFC (C300), MTLMTR (N002), ABEND (Z035)

Usage:

In any arithmetic expression, PROB(X,N) has the value Q(X,N) .

PROB and X are of type REAL and N is of type INTEGER.

Method:

See Ref. 1, formulae Nr. 26.4.4, 26.4.5 and, for N>300, No. 26.4.14.

Accuracy:

For N ≤300 , PROB has an accuracy of about six digits. For N>300 , the accuracy decreases for X>N with increasing X.

Error handling:

Error G100.1: N<1 .
Error G100.2: X<0 .
In both cases, the function value is set equal to zero, and a message is written on Unit 6, unless subroutine MTLSET (N002) has been called.

References:

  1. M. Abramowitz and I.A. Stegun (eds.), Handbook of mathematical functions with formulas, graphs, and mathematcal tables, 9th printing with corrections, (Dover, New York 1972).

G101


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995