g01ec returns the lower or upper tail probability for the -distribution with real degrees of freedom.
Syntax
C# |
---|
public static double g01ec( string tail, double x, double df, out int ifail ) |
Visual Basic |
---|
Public Shared Function g01ec ( _ tail As String, _ x As Double, _ df As Double, _ <OutAttribute> ByRef ifail As Integer _ ) As Double |
Visual C++ |
---|
public: static double g01ec( String^ tail, double x, double df, [OutAttribute] int% ifail ) |
F# |
---|
static member g01ec : tail : string * x : float * df : float * ifail : int byref -> float |
Parameters
- tail
- Type: System..::..StringOn entry: indicates whether the upper or lower tail probability is required.
- The lower tail probability is returned, i.e., .
- The upper tail probability is returned, i.e., .
Constraint: or .
- x
- Type: System..::..DoubleOn entry: , the value of the variate with degrees of freedom.Constraint: .
- df
- Type: System..::..DoubleOn entry: , the degrees of freedom of the -distribution.Constraint: .
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Return Value
g01ec returns the lower or upper tail probability for the -distribution with real degrees of freedom.
Description
The lower tail probability for the -distribution with degrees of freedom, is defined by:
To calculate a transformation of a gamma distribution is employed, i.e., a -distribution with degrees of freedom is equal to a gamma distribution with scale parameter and shape parameter .
References
Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications
Hastings N A J and Peacock J B (1975) Statistical Distributions Butterworth
Error Indicators and Warnings
Note: g01ec may return useful information for one or more of the following detected errors or warnings.
Errors or warnings detected by the method:
If , or on exit, then g01ec returns .
On entry, or .
On entry, .
On entry, .
- The solution has failed to converge while calculating the gamma variate. The result returned should represent an approximation to the solution.
Accuracy
A relative accuracy of five significant figures is obtained in most cases.
Parallelism and Performance
None.
Further Comments
For higher accuracy the transformation described in [Description] may be used with a direct call to s14ba.
Example
Values from various -distributions are read, the lower tail probabilities calculated, and all these values printed out, until the end of data is reached.
Example program (C#): g01ece.cs