Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap2_198111 - decus/20-0026/cdtr.doc
There are 2 other files named cdtr.doc in the archive. Click here to see a list.
SUBROUTINE CDTR

PURPOSE
   COMPUTES P(X) = PROBABILITY THAT THE RANDOM VARIABLE U,
   DISTRIBUTED ACCORDING TO THE CHI-SQUARE DISTRIBUTION WITH G
   DEGREES OF FREEDOM, IS LESS THAN OR EQUAL TO X.  F(G,X), THE
   ORDINATE OF THE CHI-SQUARE DENSITY AT X, IS ALSO COMPUTED.

USAGE
   CALL CDTR(X,G,P,D,IER)

DESCRIPTION OF PARAMETERS
   X   - INPUT SCALAR FOR WHICH P(X) IS COMPUTED.
   G   - NUMBER OF DEGREES OF FREEDOM OF THE CHI-SQUARE
	 DISTRIBUTION.	G IS A CONTINUOUS PARAMETER.
   P   - OUTPUT PROBABILITY.
   D   - OUTPUT DENSITY.
   IER - RESULTANT ERROR CODE WHERE
       IER= 0 --- NO ERROR
       IER=-1 --- AN INPUT PARAMETER IS INVALID.  X IS LESS
		  THAN 0.0, OR G IS LESS THAN 0.5 OR GREATER
		  THAN 2*10**(+5).  P AND D ARE SET TO -1.E75.
       IER=+1 --- INVALID OUTPUT.  P IS LESS THAN ZERO OR
		  GREATER THAN ONE, OR SERIES FOR T1 (SEE
		  MATHEMATICAL DESCRIPTION) HAS FAILED TO
		  CONVERGE.  P IS SET TO 1.E75.

REMARKS
   SEE MATHEMATICAL DESCRIPTION.

SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
   DLGAM
   NDTR

METHOD
   REFER TO R.E. BARGMANN AND S.P. GHOSH, STATISTICAL
   DISTRIBUTION PROGRAMS FOR A COMPUTER LANGUAGE,
   IBM RESEARCH REPORT RC-1094, 1963.