Dataplot Vol 2 Vol 1

# NCBPDF

Name:
NCBPDF (LET)
Type:
Library Function
Purpose:
Compute the non-central beta probability density function with shape parameters A and B and non-centrality parameter .
Description:
If and are mutually independent chi-square random variables, then

has a beta distribution with shape parameters A/2 and B/2.

If is replaced with a non-central chi-square random variable, , with non-centrality parameter , then

has a non-central beta distribution with shape parameters A and B and non-centrality parameter .

Dataplot computes the non-central beta probability density function by numerically integrating the non-central beta cumulative distribution function.

Syntax:
LET <y> = NCBPDF(<x>,<a>,<b>,<l>,<loc>,<scale>)
<SUBSET/EXCEPT/FOR qualification>
where <x> is a number, parameter, or variable containing values between 0 and 1;
<a> is a positive number, parameter, or variable that specifies the first shape parameter;
<b> is a positive number, parameter, or variable that specifies the second shape parameter;
<l> 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 = NCBPDF(0.3,10,8,1)
LET A = NCBPDF(A1,10,8,1.5)
LET X2 = NCBPDF(X1,2,6,2)
Note:
DATAPLOT uses algorithm AS 226 (see the REFERENCE section below) obtained from the statlib archive to compute the non-central beta cdf. It uses the DBETAI and DLNGAM routines from the SLATEC library rather than the corresponding algorithms from the Applied Statistics series to compute the log gamma and incomplete beta functions.

Dataplot uses the DIFF routine from the Slatec library to compute the numerical derivative.

Note:
To generate non-central beta random numbers, enter the commands

LET ALPHA = <value>
LET BETA = <value>
LET LAMBDA = <value>
LET Y = NON-CENTRAL BETA RANDOM NUMBERS FOR I = 1 1 N

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

LET ALPHA = <value>
LET BETA = <value>
LET LAMBDA = <value>
NON-CENTRAL BETA PROBABILITY PLOT Y
NON-CENTRAL BETA KOLMOGOROV SMIRNOV ...
GOODNESS OF FIT Y
NON-CENTRAL BETA CHI-SQUARE GOODNESS OF FIT Y
Default:
None
Synonyms:
None
Related Commands:
 NCBCDF = Compute the non-central beta cumulative distributiuon function. NCBPPF = Compute the non-central beta percent point function. BETPDF = Compute the beta probability density function. NCFPDF = Compute the non-central F probability density function. NCTPDF = Compute the non-central t probability density function. NCCPDF = Compute the non-central chi-square probability density function. GAMPDF = Compute the gamma probability density function. NORPDF = Compute the normal probability density function.
Reference:
"Computing Noncentral Beta Probabilities", Lenth, Applied Statistics, Vol. 39, No. 2, 1987, pp. 241-244.

"Continuous Univariate Distributions--Volume II", Second Edition, Johnson, Kotz, and Balakrishnan, Wiley, 1994, pp. 502-504.

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

Applications:
Distributional Modeling
Implementation Date:
2004/5
Program:
```
LABEL CASE ASIS
Y1LABEL Probability
X1LABEL X
X1LABEL DISPLACEMENT 12
Y1LABEL DISPLACEMENT 12
TITLE DISPLACEMENT 2
Y1LIMITS 0 2
Y1TIC OFFSET 0 0.2
MULTIPLOT CORNER COORDINATES 0 0 100 95
MULTIPLOT SCALE FACTOR 2
MULTIPLOT 2 2
TITLE LAMBDA = 0
PLOT NCBPDF(X,2,4,0) FOR X = 0.01  0.01  0.99
TITLE LAMBDA = 1
PLOT NCBPDF(X,2,4,1) FOR X = 0.01  0.01  0.99
TITLE LAMBDA = 2
PLOT NCBPDF(X,2,4,2) FOR X = 0.01  0.01  0.99
TITLE LAMBDA = 5
PLOT NCBPDF(X,2,4,5) FOR X = 0.01  0.01  0.99
END OF MULTIPLOT
CASE ASIS
JUSTIFICATION CENTER
MOVE 50 97
TEXT Non-Central Beta PDF (A = 2, B = 4)
```

Date created: 7/7/2004
Last updated: 7/7/2004