SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 2 Vol 1

NCCPDF

Name:
    NCCPDF (LET)
Type:
    Library Function
Purpose:
    Compute the non-central chi-square cumulative distribution function with degrees of freedom parameters nu and with non-centrality parameter lambda.
Description:
    If U1, U2, ...., Uv are nu independent standard normal random variables, then

      SUM[i=1 to v][U(i)**2]

    follows a central chi-square distribution.

    This can be generalized with

      SUM[i=1 to v][(U(i) + lambda(i))**2]

    That is, the normal random variable Ui has a location parameter lambdai. The above sum follows a non-central chi-square distribution with non-centrality parameter

      lambda = SUM[i=1 to v][lambda(i)]

    The probability density can be given as

      f(x;nu,lambda) = EXP[-(lambda+x)/2]*(1/2)*(x/lambda)**((v-2)/4)*
 I((v-2)/2)(SQRT(lambda*x))
 x, nu > 0; lambda >= 0

    with nu and lambda denoting the shape parameters and Ia)(x) denoting the modified Bessel function of the first kind of order a.

    The non-central chi-square distribution is also referred to as the Rayleigh, Rayleigh-Rice, or Rice distribution in the literature.

Syntax:
    LET <y> = NCCPDF(<x>,<v>,<lambda>,<loc>,<scale>)
                            <SUBSET/EXCEPT/FOR qualification>
    where <x> is a positive number, variable or a parameter;
                <v> is a positive number, parameter or variable that specifies the degrees of freedom parameter;
                <lambda> is a non-negative number, parameter or variable that specifies the non-centrality parameter;
                <loc> is a number, parameter or variable that specifies the location parameter;
                <scale> is a number, parameter or variable that specifies the scale parameter;
                <y> is a variable or a parameter (depending on what <x> is) where the computed pdf value is stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    Note that the location and scale parameters are optional.

Examples:
    LET A = NCCPDF(0.7,1,1)
    LET A = NCCPDF(3,10,10)
Note:
    DATAPLOT uses algorithm AS 170 (see the REFERENCE section below) obtained from the statlib archive to compute the non-central chi-square cdf. It uses the DGAMI and DLNGAM routines from the SLATEC library rather than the corresponding algorithms from the Applied Statistics series to compute the log gamma and incomplete gamma functions.
Note:
    To generate non-central chi-square random numbers, enter the commands

      LET NU = <value>
      LET LAMBDA = <value>
      LET Y = NON-CENTRAL CHI-SQUARE RANDOM NUMBERS ...
        FOR I = 1 1 N

    To generate an non-central chi-square probability plot or an non-central chi-square Kolmogorov-Smirnov or chi-square goodness of fit test, enter the following commands

      LET NU = <value>
      LET LAMBDA = <value>
      NON-CENTRAL CHI-SQUARE PROBABILITY PLOT Y
      NON-CENTRAL CHI-SQUARE KOLMOGOROV SMIRNOV ...
        GOODNESS OF FIT Y
      NON-CENTRAL CHI-SQUARE CHI-SQUARE GOODNESS OF FIT Y

    To generate a PPCC or Kolmogorov-Smirnov plot, enter the following commands

      LET NU1 = <value>
      LET NU2 = <value>
      LET LAMBDA1 = <value>
      LET LAMBDA2 = <value>
      NON-CENTRAL CHI-SQUARE PPCC PLOT Y
      NON-CENTRAL CHI-SQUARE KS PLOT Y

    The default values for NU1 and NU2 are 5 and 15. The default values for LAMBDA1 and LAMBDA2 are 0 and 10.

Default:
    None
Synonyms:
    None
Related Commands:
    NCCCDF = Compute the non-central chi-square cumulative distribution function.
    NCCNCP = Compute the non-central chi-square non-centrality parameter function.
    NCCPPF = Compute the non-central chi-square percent point function.
    CHSPDF = Compute the chi-square probability density function.
    NCFPDF = Compute the non-central F probability density function.
    NCBPDF = Compute the non-central beta probability density function.
    NCTPDF = Compute the non-central t probability density function.
    NORPDF = Compute the normal probability density function.
Reference:
    "Computation of Probability and Non-centrality Parameter of a Non-central Chi-squared Distribution", Narula and Desu, Applied Statistics, Vol. 30, No. 3, 1981, pp. 349-352.

    "Continuous Univariate Distributions--Volume 2", Second Edition, Johnson, Kotz, and Balakrishnan, Wiley, 1994, chapter 29.

    "Statistical Distributions", Third Edition, Evans, Hastings, and Peacock, 2000, chapter 9.

Applications:
    Distributional Modeling
Implementation Date:
    2004/5
Program:
    LABEL CASE ASIS
    Y1LABEL Probability
    X1LABEL X
    X1LABEL DISPLACEMENT 12
    Y1LABEL DISPLACEMENT 12
    YLIMITS 0  0.2
    TITLE DISPLACEMENT 2
    MULTIPLOT CORNER COORDINATES 0 0 100 95
    MULTIPLOT SCALE FACTOR 2
    MULTIPLOT 2 2
    TITLE LAMBDA = 0
    PLOT NCCPDF(X,5,0) FOR X = 0.01  0.01  10
    TITLE LAMBDA = 0.5
    PLOT NCCPDF(X,5,0.5) FOR X = 0.01  0.01  10
    TITLE LAMBDA = 1
    PLOT NCCPDF(X,5,1) FOR X = 0.01  0.01  10
    TITLE LAMBDA = 2
    PLOT NCCPDF(X,5,2) FOR X = 0.01  0.01  10
    END OF MULTIPLOT
    CASE ASIS
    JUSTIFICATION CENTER
    MOVE 50 97
    TEXT Non-Central Chi-Square PDF (NU = 5)
        
    plot generated by sample program

Date created: 7/7/2004
Last updated: 7/7/2004
Please email comments on this WWW page to alan.heckert@nist.gov.