g01fe returns the deviate associated with the given lower tail probability of the beta distribution.

Syntax

C#
public static double g01fe(
	double p,
	double a,
	double b,
	double tol,
	out int ifail
)
Visual Basic
Public Shared Function g01fe ( _
	p As Double, _
	a As Double, _
	b As Double, _
	tol As Double, _
	<OutAttribute> ByRef ifail As Integer _
) As Double
Visual C++
public:
static double g01fe(
	double p, 
	double a, 
	double b, 
	double tol, 
	[OutAttribute] int% ifail
)
F#
static member g01fe : 
        p : float * 
        a : float * 
        b : float * 
        tol : float * 
        ifail : int byref -> float 

Parameters

p
Type: System..::..Double
On entry: p, the lower tail probability from the required beta distribution.
Constraint: 0.0p1.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: the relative accuracy required by you in the result. If g01fe 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.
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

g01fe returns the deviate associated with the given lower tail probability of the beta distribution.

Description

The deviate, βp, associated with the lower tail probability, p, of the beta distribution with parameters a and b is defined as the solution to
PBβp:a,b=p=Γa+bΓaΓb0βpBa-11-Bb-1dB,  0βp1;a,b>0.
The algorithm is a modified version of the Newton–Raphson method, following closely that of Cran et al. (1977).
An initial approximation, β0, to βp is found (see Cran et al. (1977)), and the Newton–Raphson iteration
βi=βi-1-fβi-1fβi-1,
where fβ=PBβ:a,b-p is used, with modifications to ensure that β remains in the range 0,1.

References

Cran G W, Martin K J and Thomas G E (1977) Algorithm AS 109. Inverse of the incomplete beta function ratio Appl. Statist. 26 111–114
Hastings N A J and Peacock J B (1975) Statistical Distributions Butterworth

Error Indicators and Warnings

Note: g01fe 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 2, then g01fe returns 0.0.
ifail=1
On entry,p<0.0,
orp>1.0.
ifail=2
On entry,a0.0,
ora>106,
orb0.0,
orb>106.
ifail=3
There is doubt concerning the accuracy of the computed result. 100 iterations of the Newton–Raphson method have been performed without satisfying the accuracy criterion (see [Accuracy]). The result should be a reasonable approximation of the solution.
ifail=4
Requested accuracy not achieved when calculating beta probability. The result should be a reasonable approximation to the correct solution. You should try setting tol larger.
ifail=-9000
An error occured, see message report.

Accuracy

The required precision, given by tol, should be achieved in most circumstances.

Parallelism and Performance

None.

Further Comments

The typical timing will be several times that of g01ee and will be very dependent on the input parameter values. See g01ee for further comments on timings.

Example

This example reads lower tail probabilities for several beta distributions and calculates and prints the corresponding deviates until the end of data is reached.

Example program (C#): g01fee.cs

Example program data: g01fee.d

Example program results: g01fee.r

See Also