g01ee computes the upper and lower tail probabilities and the probability density function of the beta distribution with parameters a and b.

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..::..Double
On entry: β, the value of the beta variate.
Constraint: 0.0x1.0.
a
Type: System..::..Double
On entry: a, the first parameter of the required beta distribution.
Constraint: 0.0<a106.
b
Type: System..::..Double
On entry: b, the second parameter of the required beta distribution.
Constraint: 0.0<b106.
tol
Type: System..::..Double
On entry: this parameter is no longer referenced, but is included for backwards compatability.
p
Type: System..::..Double%
On exit: the lower tail probability, PBβ:a,b.
q
Type: System..::..Double%
On exit: the upper tail probability, PBβ:a,b.
pdf
Type: System..::..Double%
On exit: the probability density function, fB:a,b.
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]).

Description

The probability density function of the beta distribution with parameters a and b is:
fB:a,b=Γa+bΓaΓbBa-11-Bb-1,  0B1;a,b>0.
The lower tail probability, PBβ:a,b is defined by
PBβ:a,b=Γa+bΓaΓb0βBa-11-Bb-1dB=Iβa,b,  0β1;a,b>0.
The function Ixa,b, 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:
ifail=1
On entry,x<0.0,
orx>1.0.
ifail=2
On entry,a0.0,
ora>106,
orb0.0,
orb>106.
ifail=4
x is too far out into the tails for the probability to be evaluated exactly. The results returned are 0 and 1 as appropriate. These should be a good approximation to the required solution.
ifail=-9000
An error occured, see message report.

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

Example program data: g01eee.d

Example program results: g01eee.r

See Also