FNPR
This function evaluates the noncentral F probability density function.
Function Return Value
FNPR — Function value, the value of the probability density function. (Output)
Required Arguments
F — Argument for which the noncentral F probability density function is to be evaluated. (Input)
F must be non‑negative.
DF1 — Number of numerator degrees of freedom of the noncentral F distribution. (Input)
DF1 must be positive.
DF2 — Number of denominator degrees of freedom of the noncentral F distribution. (Input)
DF2 must be positive.
LAMBDA — Noncentrality parameter. (Input)
LAMBDA must be non‑negative.
FORTRAN 90 Interface
Generic: FNPR (F, DF1, DF2, LAMBDA)
Specific: The specific interface names are S_FNPR and D_FNPR.
Description
If X is a noncentral chi‑square random variable with noncentrality parameter λ and ν1 degrees of freedom, and Y is a chi‑square random variable with ν2 degrees of freedom which is statistically independent of X, then
is a noncentral F‑distributed random variable whose PDF is given by
where
and Γ() is the gamma function, ν1 = DF1, ν2 = DF2, λ = LAMBDA, and f = F.
With a noncentrality parameter of zero, the noncentral F distribution is the same as the F distribution.
The efficiency of the calculation of the above series is enhanced by:
*calculating each term Φk in the series recursively in terms of either the term Φk-1 preceding it or the term Φk+1 following it, and
*initializing the sum with the largest series term and adding the subsequent terms in order of decreasing magnitude.
Special cases:
For R = λf = 0
For λ = 0
For f = 0
Example
This example traces out a portion of a noncentral F distribution with parameters DF1 = 100, DF2 = 10, and LAMBDA = 10.
 
USE UMACH_INT
USE FNPR_INT
IMPLICIT NONE
INTEGER NOUT, I
REAL F, LAMBDA, DF1, DF2, PDFV, X0(8)
DATA X0 /0.0, 0.4, 0.8, 3.2, 5.6,8.8, 14.0, 18.0/
CALL UMACH (2, NOUT)
DF1 = 100.0
DF2 = 10.0
LAMBDA = 10.0
WRITE (NOUT,'("DF1: ", F4.0, "; DF2: ", F4.0, "; LAMBDA'// &
': ", F4.0 //" F PDF(F)")') DF1, DF2, LAMBDA
DO I = 1, 8
F = X0(I)
PDFV = FNPR(F, DF1, DF2, LAMBDA)
WRITE (NOUT,'(1X, F5.1, 2X, E12.6)') F, PDFV
END DO
END
Output
 
DF1: 100.; DF2: 10.; LAMBDA: 10.
 
F PDF(F)
0.0 0.000000E+00
0.4 0.974879E-01
0.8 0.813115E+00
3.2 0.369482E-01
5.6 0.283023E-02
8.8 0.276607E-03
14.0 0.219632E-04
18.0 0.534831E-05