g01ee computes the upper and lower tail probabilities and the probability density function of the beta distribution with parameters and .
Syntax
C# |
---|
public static void g01ee( double x, double a, double b, double tol, out double p, out double q, out double pdf, out int ifail ) |
Visual Basic |
---|
Public Shared Sub g01ee ( _ x As Double, _ a As Double, _ b As Double, _ tol As Double, _ <OutAttribute> ByRef p As Double, _ <OutAttribute> ByRef q As Double, _ <OutAttribute> ByRef pdf As Double, _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void g01ee( double x, double a, double b, double tol, [OutAttribute] double% p, [OutAttribute] double% q, [OutAttribute] double% pdf, [OutAttribute] int% ifail ) |
F# |
---|
static member g01ee : x : float * a : float * b : float * tol : float * p : float byref * q : float byref * pdf : float byref * ifail : int byref -> unit |
Parameters
- x
- Type: System..::..DoubleOn entry: , the value of the beta variate.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: .
- tol
- Type: System..::..DoubleOn entry: this parameter is no longer referenced, but is included for backwards compatability.
- p
- Type: System..::..Double%On exit: the lower tail probability, .
- q
- Type: System..::..Double%On exit: the upper tail probability, .
- Type: System..::..Double%On exit: the probability density function, .
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
The probability density function of the beta distribution with parameters and is:
The lower tail probability, is defined by
The function , also known as the incomplete beta function is calculated using (S14CCF not in this release).
References
Hastings N A J and Peacock J B (1975) Statistical Distributions Butterworth
Error Indicators and Warnings
Note: g01ee 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 .
On entry, , or , or , or .
- x is too far out into the tails for the probability to be evaluated exactly. The results returned are and as appropriate. These should be a good approximation to the required solution.
Accuracy
The accuracy is limited by the error in the incomplete beta function. See [Accuracy] in s14cc for further details.
Parallelism and Performance
None.
Further Comments
None.
Example
This example reads values from a number of beta distributions and computes the associated upper and lower tail probabilities and the corresponding value of the probability density function.
Example program (C#): g01eee.cs