g01ge returns the probability associated with the lower tail of the noncentral beta distribution.
Syntax
C# |
---|
public static double g01ge( double x, double a, double b, double rlamda, double tol, int maxit, out int ifail ) |
Visual Basic |
---|
Public Shared Function g01ge ( _ x As Double, _ a As Double, _ b As Double, _ rlamda As Double, _ tol As Double, _ maxit As Integer, _ <OutAttribute> ByRef ifail As Integer _ ) As Double |
Visual C++ |
---|
public: static double g01ge( double x, double a, double b, double rlamda, double tol, int maxit, [OutAttribute] int% ifail ) |
F# |
---|
static member g01ge : x : float * a : float * b : float * rlamda : float * tol : float * maxit : int * ifail : int byref -> float |
Parameters
- x
- Type: System..::..DoubleOn entry: , the deviate from the beta distribution, for which the probability is to be found.Constraint: .
- a
- Type: System..::..DoubleOn entry: , the first parameter of the required beta distribution.Constraint: .
- b
- Type: System..::..DoubleOn entry: , the second parameter of the required beta distribution.Constraint: .
- rlamda
- Type: System..::..DoubleOn entry: , the noncentrality parameter of the required beta distribution.Constraint: , where is the safe range parameter as defined by x02am.
- tol
- Type: System..::..Double
- maxit
- Type: System..::..Int32On entry: the maximum number of iterations that the algorithm should use.See [Accuracy] for suggestions as to suitable values for maxit for different values of the parameters.Suggested value: .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
g01ge returns the probability associated with the lower tail of the noncentral beta distribution.
Description
The lower tail probability for the noncentral beta distribution with parameters and and noncentrality parameter , , is defined by
where
which is the central beta probability function or incomplete beta function.
(1) |
Recurrence relationships given in Abramowitz and Stegun (1972) are used to compute the values of for each step of the summation (1).
The algorithm is discussed in Lenth (1987).
References
Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications
Lenth R V (1987) Algorithm AS 226: Computing noncentral beta probabilities Appl. Statist. 36 241–244
Error Indicators and Warnings
Note: g01ge may return useful information for one or more of the following detected errors or warnings.
Errors or warnings detected by the method:
On entry, , or , or , or , or , or , where safe range parameter as defined by x02am, or , or , or . If on exit then g01ge returns zero.
- The probability is too close to or for the algorithm to be able to calculate the required probability. g01ge will return or as appropriate, this should be a reasonable approximation.
- The required accuracy was not achieved when calculating the initial value of . You should try a larger value of tol. The returned value will be an approximation to the correct value.
Accuracy
Convergence is theoretically guaranteed whenever where has a Poisson distribution with mean . Excessive round-off errors are possible when the number of iterations used is high and tol is close to machine precision. See Lenth (1987) for further comments on the error bound.
Parallelism and Performance
None.
Further Comments
The central beta probabilities can be obtained by setting .
Example
This example reads values for several beta distributions and calculates and prints the lower tail probabilities until the end of data is reached.
Example program (C#): g01gee.cs