# F Distribution

The F-distribution is primarily used to compare the variances of two populations, as described in Hypothesis Testing to Compare Variances. This is particularly relevant in the analysis of variance testing (ANOVA) and in regression analysis.

Definition 1: The The F-distribution with n1, n2 degrees of freedom is defined by

Theorem 1: If we draw two independent samples of size n1 and n2 respectively from two normal populations with the same variance then

Proof: By Theorem 2 of Chi-square Distribution, If x is drawn from a normally distributed population N(μ ,σ) then for samples of size n:

Thus if we draw two independent samples from two normal populations with the same variance σ, then by Definition 1,

Property 1: A random variable t has distribution T(k) if and only if t2 has distribution F(1, k).

Excel Functions: The following Excel functions are defined for the  distribution:

FDIST(x, df1, df2) = the probability that the F-distribution with df1 and df2 degrees of freedom is ≥ x; i.e. 1 – F(x) where F is the cumulative F-distribution function.

FINV(α, df1, df2) = the value x such that FDIST(x, df1, df2) = 1 – α; i.e. the value x such that the right tail of the F-distribution with area α occurs at x. This means that F(x) = 1 – α, where F is the cumulative F-function.

With Excel 2010/2013/2016 there are a number of new functions (F.DIST, F.INV, F.DIST.RT and F.INV.RT) that provide equivalent functionality to FDIST and FINV, but whose syntax is more consistent with other distribution functions. These functions are described in Built-in Statistical Functions.

Observation: Excel only calculates the above functions for positive integer values of df1 and df2. Non-integer values are rounded down to the nearest integer. Thus, F.DIST(3,1.6,5,TRUE) = F.DIST(3,1,5,TRUE). In particular, all of the above Excel functions yield an error value when df1 < 1 or df2 < 1.

If you need a more accurate value of any of the F distribution functions when either or both of the degrees of freedom are not integers, and in particular when either of them is less than one, then you can use Real Statistics’ noncentral F distribution functions (with noncentrality value of zero), as described in Noncentral F Distribution. For example, the formula F.DIST(3,1,5,TRUE) = .8562, but F.DIST(3,0.99,5,TRUE) = #NUM!, whereas NF_DIST(3,0.99,5,0,TRUE) = .8606.

Alternatively, you can use the following Real Statistics functions.

Real Statistics Functions: The Real Statistics Resource Pack provides the following functions:

F_DIST(x, df1, df2, cum) = BETA.DIST(x * df1 / (x * df1 + df2), df1 / 2, df2 / 2, cum)

F_INV(p, df1, df2) = x * df2 / (df1 * (1 – x)) where x = BETA.INV(p, df1/2, df2/2)

Here F_DIST is a substitute for F.DIST and F_INV is as substitute for F.INV. Not only do these functions provide better estimates of the F distribution when the degrees of freedom are not integers, but F_DIST is also useful in providing an estimate of the pdf for versions of Excel prior to Excel 2010, where F.DIST(x, df1, df2, FALSE) is not available.

The Real Statistics Resource also provides the following functions:

F_DIST_RT(x, df1, df2) = 1 – F_DIST(x, df1, df2 TRUE)

F_INV_RT(p, df1, df2) = 1 – F_INV(p, df1, df2)

### 7 Responses to F Distribution

I don’t understand the attributes of F distribution

2. Michel Dupagne says:

Thank you so much for this valuable site! I have one suggestion: would it be possible to post a graph of the F distribution? Thank you!

• Charles says:

Michael,
Ok, I will add this once I have issued the next software release.
Charles

3. António Teixeira says:

Hello
It seem that the function for the F distribution pdf is returning wrong values.
Form may analysis, I think you are using the Beta distribution for the pdf and the cdf.
As strange as it may be, it seems that it can be used for the cdf. I think that the method to use is the one of the following VBA function

Function xlDistF(x, df1, df2, cum)
Dim Beta
With WorksheetFunction
If cum = 0 Then
Beta = Exp(.GammaLn_Precise(df1 / 2)) _
* Exp(.GammaLn_Precise(df2 / 2)) _
/ Exp(.GammaLn_Precise(df1 / 2 + df2 / 2))
‘Beta = xlDistBETAFUNCTION(df1 / 2, df2 / 2)
xlDistF = 1 / Beta * (df1 / df2) ^ (df1 / 2) * x ^ (df1 / 2 – 1) / (1 + df1 / df2 * x) ^ ((df1 + df2) / 2)
ElseIf cum = 1 Then
x = df1 * x / (df2 + df1 * x)
xlDistF = .Beta_Dist(x, df1 / 2, df2 / 2, 1)
End If
End With
End Function

Regards

António Teixeira

• Charles says:

António,
Thanks for catching this. It does look like the value calculated by F_DIST(x,df1,df2,FALSE) is incorrect. I will correct this in the next release of the software. Thanks also for providing a corrected way to do the calculation. I really appreciate all the help you have provided over the years and value your important contributions.
Charles

• Charles says:

Thanks again António. I have now corrected this error in the software and will include the change in the next release of the software.
Charles