g01gd returns the probability associated with the lower tail of the noncentral F or variance-ratio distribution.

Syntax

C#
public static double g01gd(
	double f,
	double df1,
	double df2,
	double rlamda,
	double tol,
	int maxit,
	out int ifail
)
Visual Basic
Public Shared Function g01gd ( _
	f As Double, _
	df1 As Double, _
	df2 As Double, _
	rlamda As Double, _
	tol As Double, _
	maxit As Integer, _
	<OutAttribute> ByRef ifail As Integer _
) As Double
Visual C++
public:
static double g01gd(
	double f, 
	double df1, 
	double df2, 
	double rlamda, 
	double tol, 
	int maxit, 
	[OutAttribute] int% ifail
)
F#
static member g01gd : 
        f : float * 
        df1 : float * 
        df2 : float * 
        rlamda : float * 
        tol : float * 
        maxit : int * 
        ifail : int byref -> float 

Parameters

f
Type: System..::..Double
On entry: f, the deviate from the noncentral F-distribution.
Constraint: f>0.0.
df1
Type: System..::..Double
On entry: the degrees of freedom of the numerator variance, ν1.
Constraint: 0.0<df1106.
df2
Type: System..::..Double
On entry: the degrees of freedom of the denominator variance, ν2.
Constraint: df2>0.0.
rlamda
Type: System..::..Double
On entry: λ, the noncentrality parameter.
Constraint: 0.0rlamda-2.0logU where U is the safe range parameter as defined by x02am.
tol
Type: System..::..Double
On entry: the relative accuracy required by you in the results. If g01gd is entered with tol greater than or equal to 1.0 or less than 10×machine precision (see x02aj), then the value of 10×machine precision is used instead.
maxit
Type: System..::..Int32
On entry: the maximum number of iterations to be used.
Suggested value: 500. See g01gc and g01ge for further details.
Constraint: maxit1.
ifail
Type: System..::..Int32%
On exit: ifail=0 unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).

Return Value

g01gd returns the probability associated with the lower tail of the noncentral F or variance-ratio distribution.

Description

The lower tail probability of the noncentral F-distribution with ν1 and ν2 degrees of freedom and noncentrality parameter λ, PFf:ν1,ν2;λ, is defined by
PFf:ν1,ν2;λ=0xpF:ν1,ν2;λdF,
where
PF:ν1,ν2;λ=j=0e-λ/2λ/2jj!×ν1+2jν1+2j/2ν2ν2/2Bν1+2j/2,ν2/2
×uν1+2j-2/2ν2+ν1+2ju-ν1+2j+ν2/2
and B·,· is the beta function.
The probability is computed by means of a transformation to a noncentral beta distribution:
PFf:ν1,ν2;λ=PβXx:a,b;λ,
where x=ν1fν1f+ν2 and PβXx:a,b;λ is the lower tail probability integral of the noncentral beta distribution with parameters a, b, and λ.
If ν2 is very large, greater than 106, then a χ2 approximation is used.

References

Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications

Error Indicators and Warnings

Note: g01gd may return useful information for one or more of the following detected errors or warnings.
Errors or warnings detected by the method:
If on exit ifail=1 or 3, then g01gd returns 0.0.
ifail=1
On entry,df10.0,
ordf1>106,
ordf20.0,
orf0.0,
orrlamda<0.0,
ormaxit<1,
orrlamda>-2.0logU, where U= safe range parameter as defined by x02am.
ifail=2
The solution has failed to converge in maxit iterations. You should try a larger value of maxit or tol.
ifail=3
The required probability cannot be computed accurately. This may happen if the result would be very close to 0.0 or 1.0. Alternatively the values of df1 and f may be too large. In the latter case you could try using a normal approximation; see Abramowitz and Stegun (1972).
ifail=4
The required accuracy was not achieved when calculating the initial value of the central F (or χ2) probability. You should try a larger value of tol. If the χ2 approximation is being used then g01gd returns zero otherwise the value returned should be an approximation to the correct value.
ifail=-9000
An error occured, see message report.

Accuracy

The relative accuracy should be as specified by tol. For further details see g01gc and g01ge.

Parallelism and Performance

None.

Further Comments

When both ν1 and ν2 are large a Normal approximation may be used and when only ν1 is large a χ2 approximation may be used. In both cases λ is required to be of the same order as ν1. See Abramowitz and Stegun (1972) for further details.

Example

This example reads values from, and degrees of freedom for, F-distributions, computes the lower tail probabilities and prints all these values until the end of data is reached.

Example program (C#): g01gde.cs

Example program data: g01gde.d

Example program results: g01gde.r

See Also