g01fb returns the deviate associated with the given tail probability of Student's t-distribution with real degrees of freedom.

Syntax

C#
public static double g01fb(
	string tail,
	double p,
	double df,
	out int ifail
)
Visual Basic
Public Shared Function g01fb ( _
	tail As String, _
	p As Double, _
	df As Double, _
	<OutAttribute> ByRef ifail As Integer _
) As Double
Visual C++
public:
static double g01fb(
	String^ tail, 
	double p, 
	double df, 
	[OutAttribute] int% ifail
)
F#
static member g01fb : 
        tail : string * 
        p : float * 
        df : float * 
        ifail : int byref -> float 

Parameters

tail
Type: System..::..String
On entry: indicates which tail the supplied probability represents.
tail="U"
The upper tail probability, i.e., PTtp:ν.
tail="L"
The lower tail probability, i.e., PTtp:ν.
tail="S"
The two tail (significance level) probability, i.e., PTtp:ν+PT-tp:ν.
tail="C"
The two tail (confidence interval) probability, i.e., PTtp:ν-PT-tp:ν.
Constraint: tail="U", "L", "S" or "C".
p
Type: System..::..Double
On entry: p, the probability from the required Student's t-distribution as defined by tail.
Constraint: 0.0<p<1.0.
df
Type: System..::..Double
On entry: ν, the degrees of freedom of the Student's t-distribution.
Constraint: df1.0.
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

g01fb returns the deviate associated with the given tail probability of Student's t-distribution with real degrees of freedom.

Description

The deviate, tp associated with the lower tail probability, p, of the Student's t-distribution with ν degrees of freedom is defined as the solution to
PT<tp:ν=p=Γν+1/2νπΓν/2-tp1+T2ν-ν+1/2dT,  ν1; ​-<tp<.
For ν=1​ or ​2 the integral equation is easily solved for tp.
For other values of ν<3 a transformation to the beta distribution is used and the result obtained from g01fe.
For ν3 an inverse asymptotic expansion of Cornish–Fisher type is used. The algorithm is described by Hill (1970).

References

Hastings N A J and Peacock J B (1975) Statistical Distributions Butterworth
Hill G W (1970) Student's t-distribution Comm. ACM 13(10) 617–619

Error Indicators and Warnings

Note: g01fb may return useful information for one or more of the following detected errors or warnings.
Errors or warnings detected by the method:
If ifail=12 or 3 on exit, then g01fb returns zero.
ifail=1
On entry,tail"U", "S", "C" or "L".
ifail=2
On entry,p0.0,
orp1.0.
ifail=3
On entry,df<1.0.
ifail=5
Convergence in the calculation of the inverse beta value was not achieved. However, the result should be a reasonable approximation to the correct value.
ifail=-9000
An error occured, see message report.

Accuracy

The results should be accurate to five significant digits, for most parameter values. The error behaviour for various parameter values is discussed in Hill (1970).

Parallelism and Performance

None.

Further Comments

The value tp may be calculated by using the transformation described in [Description] and using g01fe. This method allows you to set the required accuracy.

Example

This example reads the probability, the tail that probability represents and the degrees of freedom for a number of Student's t-distributions and computes the corresponding deviates.

Example program (C#): g01fbe.cs

Example program data: g01fbe.d

Example program results: g01fbe.r

See Also