g01fd returns the deviate associated with the given lower tail probability of the $F$ or variance-ratio distribution with real degrees of freedom.

# Syntax

C# |
---|

public static double g01fd( double p, double df1, double df2, out int ifail ) |

Visual Basic |
---|

Public Shared Function g01fd ( _ p As Double, _ df1 As Double, _ df2 As Double, _ <OutAttribute> ByRef ifail As Integer _ ) As Double |

Visual C++ |
---|

public: static double g01fd( double p, double df1, double df2, [OutAttribute] int% ifail ) |

F# |
---|

static member g01fd : p : float * df1 : float * df2 : float * ifail : int byref -> float |

#### Parameters

- p
- Type: System..::..Double
*On entry*: $p$, the lower tail probability from the required $F$-distribution.*Constraint*: $0.0\le {\mathbf{p}}<1.0$.

- df1
- Type: System..::..Double
*On entry*: the degrees of freedom of the numerator variance, ${\nu}_{1}$.*Constraint*: ${\mathbf{df1}}>0.0$.

- df2
- Type: System..::..Double
*On entry*: the degrees of freedom of the denominator variance, ${\nu}_{2}$.*Constraint*: ${\mathbf{df2}}>0.0$.

- ifail
- Type: System..::..Int32%
*On exit*: ${\mathbf{ifail}}={0}$ unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).

#### Return Value

g01fd returns the deviate associated with the given lower tail probability of the $F$ or variance-ratio distribution with real degrees of freedom.

# Description

The deviate, ${f}_{p}$, associated with the lower tail probability, $p$, of the $F$-distribution with degrees of freedom ${\nu}_{1}$ and ${\nu}_{2}$ is defined as the solution to

where ${\nu}_{1},{\nu}_{2}>0$; $0\le {f}_{p}<\infty $.

$$P\left(F\le {f}_{p}:{\nu}_{1},{\nu}_{2}\right)=p=\frac{{\nu}_{1}^{\frac{1}{2}{\nu}_{1}}{\nu}_{2}^{\frac{1}{2}{\nu}_{2}}\Gamma \left(\frac{{\nu}_{1}+{\nu}_{2}}{2}\right)}{\Gamma \left(\frac{{\nu}_{1}}{2}\right)\Gamma \left(\frac{{\nu}_{2}}{2}\right)}\underset{0}{\overset{{f}_{p}}{\int}}{F}^{\frac{1}{2}\left({\nu}_{1}-2\right)}{\left({\nu}_{2}+{\nu}_{1}F\right)}^{-\frac{1}{2}\left({\nu}_{1}+{\nu}_{2}\right)}dF\text{,}$$ |

The value of ${f}_{p}$ is computed by means of a transformation to a beta distribution, ${P}_{\beta}\left(B\le \beta :a,b\right)$:

and using a call to g01fe.

$$P\left(F\le f:{\nu}_{1},{\nu}_{2}\right)={P}_{\beta}\left(B\le \frac{{\nu}_{1}f}{{\nu}_{1}f+{\nu}_{2}}:{\nu}_{1}/2,{\nu}_{2}/2\right)$$ |

For very large values of both ${\nu}_{1}$ and ${\nu}_{2}$, greater than ${10}^{5}$, a normal approximation is used. If only one of ${\nu}_{1}$ or ${\nu}_{2}$ is greater than ${10}^{5}$ then a ${\chi}^{2}$ approximation is used; see Abramowitz and Stegun (1972).

# References

Abramowitz M and Stegun I A (1972)

*Handbook of Mathematical Functions*(3rd Edition) Dover PublicationsHastings N A J and Peacock J B (1975)

*Statistical Distributions*Butterworth# Error Indicators and Warnings

**Note:**g01fd may return useful information for one or more of the following detected errors or warnings.

Errors or warnings detected by the method:

- ${\mathbf{ifail}}=1$
On entry, ${\mathbf{p}}<0.0$, or ${\mathbf{p}}\ge 1.0$.

- ${\mathbf{ifail}}=2$
On entry, ${\mathbf{df1}}\le 0.0$, or ${\mathbf{df2}}\le 0.0$.

- ${\mathbf{ifail}}=3$

- ${\mathbf{ifail}}=4$
- The value of p is too close to $0$ or $1$ for the value of ${f}_{p}$ to be computed. This will only occur when the large sample approximations are used.

# Accuracy

The result should be accurate to five significant digits.

# Parallelism and Performance

None.

# Further Comments

For higher accuracy g01fe can be used along with the transformations given in [Description].

# Example

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

Example program (C#): g01fde.cs