12  The Central F Distribution

Author

Gabriel J. Odom

Published

August 13, 2025

12.1 Deriving the Distribution

As with the chapter on the Student’s \(t\) distribution, we will not include sections on the Method of Moments or Maximum Likelihood Estimators. Also, before we move on, please review the definition of the \(\chi^2\) Distribution from that chapter. We begin by letting \(X \sim \chi^2_{\nu_x}\) and \(Y \sim \chi^2_{\nu_y}\) and by assuming that \(X \perp Y\). The joint distribution of \(X\) and \(Y\) is \[ f_{X,Y}(x,y|\nu_x, \nu_y) = \left[ \frac{2^{-\frac{\nu_x}{2}}}{\Gamma\left(\frac{\nu_x}{2}\right)} x^{\frac{\nu_x}{2} - 1} e^{-\frac{x}{2}} \right] \left[ \frac{2^{-\frac{\nu_y}{2}}}{\Gamma\left(\frac{\nu_y}{2}\right)} y^{\frac{\nu_y}{2} - 1} e^{-\frac{y}{2}} \right]. \]

Similarly to our work on the Student’s \(t\) Distribution, we will make a creative bivariate substitution. Let \(G = Y\) be the nuisance parameter, and let \[ H = \frac{X/\nu_x}{Y/\nu_y} \Rightarrow \frac{Y}{\nu_y}H = \frac{X}{\nu_x} \Rightarrow \frac{\nu_x}{\nu_y}GH = X. \] For the support of these variables, recall that \(X,Y > 0\), so \(H,G > 0\). For this substitution, the Jacobian Determinant is found by \[ \begin{aligned} \textbf{J} &= \begin{bmatrix} \frac{\partial X}{\partial H} & \frac{\partial Y}{\partial H} \\ \frac{\partial X}{\partial G} & \frac{\partial Y}{\partial G} \\ \end{bmatrix} \\ &= \begin{bmatrix} \frac{\partial}{\partial H} \frac{\nu_x}{\nu_y}GH & \frac{\partial}{\partial H} G \\ \frac{\partial}{\partial G} \frac{\nu_x}{\nu_y}GH & \frac{\partial}{\partial G} G \\ \end{bmatrix} \\ &= \begin{bmatrix} \frac{\nu_x}{\nu_y}G & 0 \\ \frac{\nu_x}{\nu_y}H & 1 \\ \end{bmatrix} \\ \Longrightarrow \det(\textbf{J}) &= \frac{\nu_x}{\nu_y}G(1) - (0)\frac{\nu_x}{\nu_y}H \\ &= \frac{\nu_x}{\nu_y}G. \end{aligned} \]

Now let’s dive in: \[ f_{X,Y}(x,y|\nu_x, \nu_y) = \left\{ \frac{2^{-\frac{\nu_x}{2}}}{\Gamma\left(\frac{\nu_x}{2}\right)} x^{\frac{\nu_x}{2} - 1} e^{-\frac{x}{2}} \right\} \left\{ \frac{2^{-\frac{\nu_y}{2}}}{\Gamma\left(\frac{\nu_y}{2}\right)} y^{\frac{\nu_y}{2} - 1} e^{-\frac{y}{2}} \right\} \] implies that \[ \begin{aligned} f_{X,Y}(h,g|\nu_x, \nu_y) &= \left\{ \frac{2^{-\frac{\nu_x}{2}}}{\Gamma\left(\frac{\nu_x}{2}\right)} \left[\frac{\nu_x}{\nu_y}gh\right]^{\frac{\nu_x}{2} - 1} e^{-\frac{1}{2}\left[\frac{\nu_x}{\nu_y}gh\right]} \right\} \left\{ \frac{2^{-\frac{\nu_y}{2}}}{\Gamma\left(\frac{\nu_y}{2}\right)} [g]^{\frac{\nu_y}{2} - 1} e^{-\frac{[g]}{2}} \right\} \left[\frac{\nu_x}{\nu_y}g\right] \\ &= \frac{2^{-\frac{\nu_x}{2}}}{\Gamma\left(\frac{\nu_x}{2}\right)} \frac{2^{-\frac{\nu_y}{2}}}{\Gamma\left(\frac{\nu_y}{2}\right)} \left[\frac{\nu_x}{\nu_y}\right]^{\frac{\nu_x}{2} - 1} \left[\frac{\nu_x}{\nu_y}\right] \left( g^{\frac{\nu_x}{2} - 1} g^{\frac{\nu_y}{2} - 1} g \right) h^{\frac{\nu_x}{2} - 1} e^{-\left( \frac{\nu_x}{2\nu_y}gh + \frac{g}{2} \right)} \\ &= \frac{ 2^{-\frac{\nu_x + \nu_y}{2}} }{ \Gamma\left(\frac{\nu_x}{2}\right)\Gamma\left(\frac{\nu_y}{2}\right) } \left[\frac{\nu_x}{\nu_y}\right]^{\frac{\nu_x}{2}} h^{\frac{\nu_x}{2} - 1} g^{\frac{\nu_x + \nu_y}{2} - 1} e^{-g\left( \frac{\nu_x}{2\nu_y}h + \frac{1}{2} \right)} \\ \Longrightarrow f_H(h|\nu_x, \nu_y) &= \int_{\mathcal{S}(g)} \frac{ 2^{-\frac{\nu_x + \nu_y}{2}} }{ \Gamma\left(\frac{\nu_x}{2}\right)\Gamma\left(\frac{\nu_y}{2}\right) } \left[\frac{\nu_x}{\nu_y}\right]^{\frac{\nu_x}{2}} h^{\frac{\nu_x}{2} - 1} g^{\frac{\nu_x + \nu_y}{2} - 1} e^{-g\left( \frac{\nu_x}{2\nu_y}h + \frac{1}{2} \right)} dg \\ &= \frac{ 2^{-\frac{\nu_x + \nu_y}{2}} }{ \Gamma\left(\frac{\nu_x}{2}\right) \Gamma\left(\frac{\nu_y}{2}\right) } \left[\frac{\nu_x}{\nu_y}\right]^{\frac{\nu_x}{2}} h^{\frac{\nu_x}{2} - 1} \int_0^{\infty} g^{\frac{\nu_x + \nu_y}{2} - 1} e^{-g\left( \frac{\nu_x}{2\nu_y}h + \frac{1}{2} \right)} dg, \end{aligned} \] which we should recognise as the kernel of a Gamma Distribution with \(\alpha = \frac{\nu_x + \nu_y}{2}\) and \(\lambda = \frac{\nu_x}{2\nu_y}h - \frac{1}{2}\). This kernel then integrates to \[ \begin{aligned} I &= \int_0^{\infty} g^{\frac{\nu_x + \nu_y}{2} - 1} e^{-g\left( \frac{\nu_x}{2\nu_y}h + \frac{1}{2} \right)} dg \\ &= \int_0^{\infty} \left\{ \frac{ \Gamma\left( \frac{\nu_x + \nu_y}{2} \right) }{ \left( \frac{\nu_x}{2\nu_y}h + \frac{1}{2} \right)^{\frac{\nu_x + \nu_y}{2}} } \right\} \left\{ \frac{ \left( \frac{\nu_x}{2\nu_y}h + \frac{1}{2} \right)^{\frac{\nu_x + \nu_y}{2}} }{ \Gamma\left( \frac{\nu_x + \nu_y}{2} \right) } \right\} g^{\frac{\nu_x + \nu_y}{2} - 1} e^{-g\left( \frac{\nu_x}{2\nu_y}h + \frac{1}{2} \right)} dg \\ &= \left\{ \frac{ \Gamma\left( \frac{\nu_x + \nu_y}{2} \right) }{ \left(\frac{1}{2}\right)^{\frac{\nu_x + \nu_y}{2}} \left( \frac{\nu_x}{\nu_y}h + 1 \right)^{\frac{\nu_x + \nu_y}{2}} } \right\} \int_0^{\infty} \left\{ \frac{ \left( \frac{\nu_x}{2\nu_y}h + \frac{1}{2} \right)^{\frac{\nu_x + \nu_y}{2}} }{ \Gamma\left( \frac{\nu_x + \nu_y}{2} \right) } \right\} g^{\frac{\nu_x + \nu_y}{2} - 1} e^{-g\left( \frac{\nu_x}{2\nu_y}h + \frac{1}{2} \right)} dg \\ &= \left\{ \frac{ 2^{\frac{\nu_x + \nu_y}{2}} \Gamma\left( \frac{\nu_x + \nu_y}{2} \right) }{ \left( \frac{\nu_x}{\nu_y}h + 1 \right)^{\frac{\nu_x + \nu_y}{2}} } \right\} [1]. \end{aligned} \]

Therefore, our marginal distribution simplifies to \[ \begin{aligned} f_H(h|\nu_x, \nu_y) &= \frac{ 2^{-\frac{\nu_x + \nu_y}{2}} }{ \Gamma\left(\frac{\nu_x}{2}\right) \Gamma\left(\frac{\nu_y}{2}\right) } \left[\frac{\nu_x}{\nu_y}\right]^{\frac{\nu_x}{2}} h^{\frac{\nu_x}{2} - 1} \int_0^{\infty} g^{\frac{\nu_x + \nu_y}{2} - 1} e^{-g\left( \frac{\nu_x}{2\nu_y}h + \frac{1}{2} \right)} dg \\ &= \frac{ 2^{-\frac{\nu_x + \nu_y}{2}} }{ \Gamma\left(\frac{\nu_x}{2}\right) \Gamma\left(\frac{\nu_y}{2}\right) } \left[\frac{\nu_x}{\nu_y}\right]^{\frac{\nu_x}{2}} h^{\frac{\nu_x}{2} - 1} \left\{ \frac{ 2^{\frac{\nu_x + \nu_y}{2}} \Gamma\left( \frac{\nu_x + \nu_y}{2} \right) }{ \left( \frac{\nu_x}{\nu_y}h + 1 \right)^{\frac{\nu_x + \nu_y}{2}} } \right\} \\ &= \frac{ 2^{-\frac{\nu_x + \nu_y}{2}} 2^{\frac{\nu_x + \nu_y}{2}} \Gamma\left( \frac{\nu_x + \nu_y}{2} \right) }{ \Gamma\left(\frac{\nu_x}{2}\right) \Gamma\left(\frac{\nu_y}{2}\right) } \left[\frac{\nu_x}{\nu_y}\right]^{\frac{\nu_x}{2}} \frac{ h^{\frac{\nu_x}{2} - 1} }{ \left( \frac{\nu_x}{\nu_y}h + 1 \right)^{\frac{\nu_x + \nu_y}{2}} } \\ &= \frac{ \Gamma\left( \frac{\nu_x + \nu_y}{2} \right) }{ \Gamma\left(\frac{\nu_x}{2}\right) \Gamma\left(\frac{\nu_y}{2}\right) } \left[\frac{\nu_x}{\nu_y}\right]^{\frac{\nu_x}{2}} \frac{ h^{\frac{\nu_x}{2} - 1} }{ \left( \frac{\nu_x}{\nu_y}h + 1 \right)^{\frac{\nu_x + \nu_y}{2}} }, \end{aligned} \] which is the Central \(\mathcal{F}\) Distribution with \(\nu_x,\nu_y\) degrees of freedom.1


12.2 Example Random Samples

Code
set.seed(20150516)

# F for a well-posed linear model [p = 5, n = 100]
xWP <- rf(n = 1000, df1 = 4, df2 = 99)
samplesWP_ls <- list(
  n10   = xWP[1:10],
  n30   = xWP[1:30],
  n60   = xWP[1:60],
  n1000 = xWP
)

# F for a poorly-posed linear model [p = 25, n = 100]
xPP <- rf(n = 1000, df1 = 24, df2 = 99)
samplesPP_ls <- list(
  n10   = xPP[1:10],
  n30   = xPP[1:30],
  n60   = xPP[1:60],
  n1000 = xPP
)

range_num <- range(c(xWP, xPP))

rm(xWP, xPP)
Code
PlotSharedDensity <- function(x, range_x, bandwidth = "nrd0") {
  
  xDens_ls <- density(x, bw = bandwidth)
  xHist_ls <- hist(x, plot = FALSE)
  yLargest_num <- max(max(xDens_ls$y), max(xHist_ls$density))
  
  hist(
    x, prob = TRUE,
    xlim = range_x, ylim = c(0, yLargest_num)
  )
  lines(xDens_ls, col = 4, lwd = 2)
  
}
Code
par(mfrow = c(2, 2))

PlotSharedDensity(
  x = samplesWP_ls$n10, range_x = range_num
)
PlotSharedDensity(
  x = samplesWP_ls$n30, range_x = range_num
)
PlotSharedDensity(
  x = samplesWP_ls$n60, range_x = range_num
)
PlotSharedDensity(
  x = samplesWP_ls$n1000, range_x = range_num
)

par(mfrow = c(1, 1))

# , bandwidth = 0.005

Code
par(mfrow = c(2, 2))

PlotSharedDensity(
  x = samplesPP_ls$n10, range_x = range_num
)
PlotSharedDensity(
  x = samplesPP_ls$n30, range_x = range_num
)
PlotSharedDensity(
  x = samplesPP_ls$n60, range_x = range_num
)
PlotSharedDensity(
  x = samplesPP_ls$n1000, range_x = range_num
)

par(mfrow = c(1, 1))


12.3 Show that this is a Distribution

We will change the notation a tiny bit (using \(x\) as our random variable instead of \(h\)). Here is our Central \(\mathcal{F}\) Distribution with \(\nu_1, \nu_2\) degrees of freedom: \[ f_{\mathcal{F}}(x|\nu_1,\nu_2) = \frac{ \Gamma\left( \frac{\nu_1 + \nu_2}{2} \right) }{ \Gamma\left(\frac{\nu_1}{2}\right) \Gamma\left(\frac{\nu_2}{2}\right) } \left[\frac{\nu_1}{\nu_2}\right]^{\frac{\nu_1}{2}} \frac{ x^{\frac{\nu_1}{2} - 1} }{ \left( \frac{\nu_1}{\nu_2}x + 1 \right)^{\frac{\nu_1 + \nu_2}{2}} }. \] Because these degrees of freedom parameters are counts of independent pieces of information, we have the restriction that \(\nu_1,\nu_2 > 0\). Also, based on the change of variables we employed above, \(x > 0\). By these two restrictions, \[ \begin{aligned} \frac{ \Gamma\left( \frac{\nu_1 + \nu_2}{2} \right) }{ \Gamma\left(\frac{\nu_1}{2}\right) \Gamma\left(\frac{\nu_2}{2}\right) } &> 0, \\ \frac{\nu_1}{\nu_2} &> 0,\ \text{and} \\ \frac{\nu_1}{\nu_2}x + 1 &> 0;\ \text{so} \\ \frac{ x^{\frac{\nu_1}{2} - 1} }{ \left( \frac{\nu_1}{\nu_2}x + 1 \right)^{\frac{\nu_1 + \nu_2}{2}} } &> 0. \end{aligned} \] Hence \(f_{\mathcal{F}} > 0\) for \(x,\nu_1,\nu_2 > 0\).

Now, consider \[ \begin{aligned} \int_{\mathcal{S}(x)} dF(x|\nu_1,\nu_2) &= \int_{\mathcal{S}(x)} \frac{ \Gamma\left( \frac{\nu_1 + \nu_2}{2} \right) }{ \Gamma\left(\frac{\nu_1}{2}\right) \Gamma\left(\frac{\nu_2}{2}\right) } \left[\frac{\nu_1}{\nu_2}\right]^{\frac{\nu_1}{2}} \frac{ x^{\frac{\nu_1}{2} - 1} }{ \left( \frac{\nu_1}{\nu_2}x + 1 \right)^{\frac{\nu_1 + \nu_2}{2}} } dx \\ &= \frac{ \Gamma\left( \frac{\nu_1 + \nu_2}{2} \right) }{ \Gamma\left(\frac{\nu_1}{2}\right) \Gamma\left(\frac{\nu_2}{2}\right) } \int_0^{\infty} \left[\frac{\nu_1}{\nu_2}\right]^{\frac{\nu_1}{2}} \frac{ x^{\frac{\nu_1}{2} - 1} }{ \left( \frac{\nu_1}{\nu_2}x + 1 \right)^{\frac{\nu_1 + \nu_2}{2}} } dx. \end{aligned} \] Our plan is to employ the alternate form of the Beta Function2 to clean up this integrand. First, we make the substitution \(u = \frac{\nu_1}{\nu_2}x \Rightarrow du = \frac{\nu_1}{\nu_2}dx\), so \(x = \frac{\nu_2}{\nu_1}u \Rightarrow dx = \frac{\nu_2}{\nu_1}du\). Our bounds of integration do not change. Thus, \[ \begin{aligned} \int_{\mathcal{S}(x)} dF(x|\nu_1,\nu_2) &= \frac{ \Gamma\left( \frac{\nu_1 + \nu_2}{2} \right) }{ \Gamma\left(\frac{\nu_1}{2}\right) \Gamma\left(\frac{\nu_2}{2}\right) } \int_{x = 0}^{\infty} \left[\frac{\nu_1}{\nu_2}\right]^{\frac{\nu_1}{2}} \frac{ x^{\frac{\nu_1}{2} - 1} }{ \left( \frac{\nu_1}{\nu_2}x + 1 \right)^{\frac{\nu_1 + \nu_2}{2}} } dx \\ &= \frac{ \Gamma\left( \frac{\nu_1 + \nu_2}{2} \right) }{ \Gamma\left(\frac{\nu_1}{2}\right) \Gamma\left(\frac{\nu_2}{2}\right) } \int_{u = 0}^{\infty} \left[\frac{\nu_1}{\nu_2}\right]^{\frac{\nu_1}{2}} \frac{ \left[\frac{\nu_2}{\nu_1}u\right]^{\frac{\nu_1}{2} - 1} }{ \left([u] + 1\right)^{\frac{\nu_1 + \nu_2}{2}} } \left[\frac{\nu_2}{\nu_1}du\right] \\ &= \frac{ \Gamma\left( \frac{\nu_1 + \nu_2}{2} \right) }{ \Gamma\left(\frac{\nu_1}{2}\right) \Gamma\left(\frac{\nu_2}{2}\right) } \int_0^{\infty} \left[\frac{\nu_1}{\nu_2}\right]^{\frac{\nu_1}{2}} \left[\frac{\nu_2}{\nu_1}\right]^{\frac{\nu_1}{2} - 1} \frac{\nu_2}{\nu_1} \frac{ u^{\frac{\nu_1}{2} - 1} }{ \left(u + 1\right)^{\frac{\nu_1 + \nu_2}{2}} } du \\ &= \frac{ \Gamma\left( \frac{\nu_1 + \nu_2}{2} \right) }{ \Gamma\left(\frac{\nu_1}{2}\right) \Gamma\left(\frac{\nu_2}{2}\right) } \left[\frac{\nu_1}{\nu_2}\right]^{\frac{\nu_1}{2}} \left[\frac{\nu_2}{\nu_1}\right]^{\frac{\nu_1}{2}} \int_0^{\infty} \frac{ u^{\frac{\nu_1}{2} - 1} }{ \left(u + 1\right)^{\frac{\nu_1}{2} + \frac{\nu_2}{2}} } du \\ &\qquad\text{\emph{Alternate form of the Beta Function...}} \\ &= \frac{ \Gamma\left( \frac{\nu_1 + \nu_2}{2} \right) }{ \Gamma\left(\frac{\nu_1}{2}\right) \Gamma\left(\frac{\nu_2}{2}\right) } \left[ \frac{\nu_1}{\nu_2} \frac{\nu_2}{\nu_1} \right]^{\frac{\nu_1}{2}} \left\{ \frac{ \Gamma\left(\frac{\nu_1}{2}\right) \Gamma\left(\frac{\nu_2}{2}\right) }{ \Gamma\left( \frac{\nu_1 + \nu_2}{2} \right) } \right\} \\ &= \frac{ \Gamma\left( \frac{\nu_1 + \nu_2}{2} \right) }{ \Gamma\left(\frac{\nu_1}{2}\right) \Gamma\left(\frac{\nu_2}{2}\right) } [1]^{\frac{\nu_1}{2}} \frac{ \Gamma\left(\frac{\nu_1}{2}\right) \Gamma\left(\frac{\nu_2}{2}\right) }{ \Gamma\left( \frac{\nu_1 + \nu_2}{2} \right) } \\ &= 1. \end{aligned} \] Therefore, \(f_{\mathcal{F}}(x|\nu_1,\nu_2)\) is a proper distribution.


12.4 Exercises

To be determined.

12.5 Footnotes


  1. https://texasgateway.org/resource/132-f-distribution-and-f-ratio↩︎

  2. See the Formal Foundations chapter on the Gamma and Beta Functions.↩︎