Why the F Density Comes From a Ratio
An F variable is built from two independent measures of variation, each scaled by its degrees of freedom. This construction appears naturally when comparing sample variances, but the density is not obtained by simply dividing two chi-square densities. The ratio changes the scale of the variables, so its probability density must account for the corresponding Jacobian.
This tutorial derives that density directly. The main ingredients are the chi-square density, independence, a one-to-one transformation, and integration over the variable that is not part of the ratio. The result is aligned with the SOA VEE Mathematical Statistics syllabus.
In applications based on normal samples, \(m\) and \(n\) are usually positive integers. The density derivation also holds for positive real degrees of freedom. The assumptions matter: both chi-square variables must be central and independent, and the ratio must use the stated degree-of-freedom scaling. If a variable is noncentral, or if the two variables are dependent, this derivation does not give the ordinary F density.
Deriving the Density by Change of Variables
For \(x>0\) and \(y>0\), the independent chi-square densities are
Here \(\Gamma(a)=\int_0^\infty z^{a-1}e^{-z}\,dz\) for \(a>0\). Independence gives the joint density \(f_{X,Y}(x,y)=f_X(x)f_Y(y)\). Set \(T=(X/m)/(Y/n)=nX/(mY)\), and retain \(Y\) as the second transformed variable. Solving for the original variables gives \(x=(m/n)ty\) and \(y=y\).
Use \(t=nx/(my)\) and \(w=y\). The inverse transformation is \(x=(m/n)tw,\ y=w\), for \(t>0,\ w>0\).
The absolute determinant of the inverse transformation is \(\left|\partial(x,y)/\partial(t,w)\right|=(m/n)w\). This factor is required when converting the joint density.
Substitute \(x=(m/n)tw\) and \(y=w\) in \(f_X(x)f_Y(y)\), then multiply by the Jacobian.
Integrate the transformed joint density over \(0<w<\infty\). The result depends only on \(t\), and is the density of \(T\).
The substitution gives the following expression before integration:
To see the power of \(w\), the two chi-square density powers contribute \(w^{m/2-1}\) and \(w^{n/2-1}\), while the Jacobian contributes one more factor of \(w\). Their combined exponent is \(m/2-1+n/2-1+1=(m+n)/2-1\). This is a useful check on the transformation algebra.
Let \(a=(m+n)/2\) and \(c=(1+mt/n)/2\). The integral over \(w\) is \(\int_0^\infty w^{a-1}e^{-cw}\,dw=\Gamma(a)c^{-a}\), obtained by substituting \(z=cw\) in the defining gamma integral. Applying it yields the F density.
For \(t\leq 0\), \(f_T(t)=0\). The degrees of freedom have different roles: \(m\) appears in the power \(t^{m/2-1}\) and in the numerator scaling, while \(n\) appears in the factor \(1+mt/n\) and in the overall exponent. Keeping the order \(F_{m,n}\) straight is essential.
Worked Applications
Worked Example: Evaluating an F Density at One
Let \(X\sim\chi^2_4\) and \(Y\sim\chi^2_2\) be independent, and define \(F=(X/4)/(Y/2)\). Find \(f_F(1)\), reporting the probability density to four decimal places. Name the method and identify a likely error.
Method. Apply the change-of-variables density formula with \(m=4\), \(n=2\), and \(t=1\). The required gamma values are \(\Gamma(3)=2\), \(\Gamma(2)=1\), and \(\Gamma(1)=1\).
The constant before the powers of \(t\) and \(1+mt/n\) is \((4/2)^{4/2}\Gamma(3)/[\Gamma(2)\Gamma(1)]=2^2(2)/(1\cdot1)=8\). The remaining factors at \(t=1\) are \(1^{4/2-1}=1\) and \((1+4/2)^{-3}=3^{-3}=1/27\). Therefore \(f_F(1)=8(1)(1/27)=8/27=0.296296\ldots\), or \(0.2963\) to four decimal places.
Check. The density is positive at \(t=1\), which is in its support. A common error is to omit the coefficient and report \(1/27\). The coefficient is not 1: the gamma ratio and scaling factor together equal 8.
Worked Example: Keeping the Scaling Factors in the Ratio
Let \(X\sim\chi^2_6\) and \(Y\sim\chi^2_4\) be independent. Define \(F=(X/6)/(Y/4)\). Find \(f_F(2)\), rounding to four decimal places. State the method and guard against reversing the numerator and denominator scaling.
Method. This is the ratio \(F_{6,4}\), so use \(m=6\), \(n=4\), and \(t=2\). The scaling factor is \((m/n)^{m/2}=(6/4)^3=(3/2)^3=27/8\). Also, \(\Gamma(5)=24\), \(\Gamma(3)=2\), and \(\Gamma(2)=1\), giving the gamma ratio \(24/(2\cdot1)=12\). Thus the full constant is \((27/8)(12)=81/2=40.5\).
The power of \(t\) is \(2^{6/2-1}=2^2=4\). The final factor is \((1+6(2)/4)^{-(6+4)/2}=(1+3)^{-5}=4^{-5}=1/1024\). Therefore \(f_F(2)=(81/2)(4)(1/1024)=162/1024=81/512=0.158203125\), or \(0.1582\) to four decimal places.
Check. The same ratio written directly is \(F=4X/(6Y)=2X/(3Y)\). Reversing the scaled variables would instead define a different ratio with the degrees of freedom in the opposite order; it would not have the density just calculated.
Worked Example: Integrating a Derived F Density
Let \(X\sim\chi^2_2\) and \(Y\sim\chi^2_4\) be independent, with \(F=(X/2)/(Y/4)\). Find \(P(F>2)\). Show how the density is obtained and how the probability is checked.
Method. Substitute \(m=2\) and \(n=4\) in the derived density. The constant is \((2/4)^1\Gamma(3)/[\Gamma(1)\Gamma(2)]=(1/2)(2)/(1\cdot1)=1\). The power \(t^{m/2-1}\) is \(t^0=1\), and the last factor is \((1+t/2)^{-3}\). Hence \(f_F(t)=(1+t/2)^{-3}\) for \(t>0\).
Integrate the density from 2 to infinity. Since the derivative of \((1+t/2)^{-2}\) is \(-(1+t/2)^{-3}\), \(P(F>2)=\int_2^\infty(1+t/2)^{-3}\,dt=[-(1+t/2)^{-2}]_2^\infty=0-(-1/4)=1/4\). The probability is \(0.2500\) to four decimal places.
Check. Integrating over the full support gives \(\int_0^\infty(1+t/2)^{-3}\,dt=[-(1+t/2)^{-2}]_0^\infty=1\), confirming that the derived expression is normalized. A common mistake is to treat the density value at a point as a tail probability; here the probability comes from integrating over \(t>2\).
Common Traps and a Quick Algebra Check
The Jacobian is a frequent source of errors. Using only \(f_X(x)f_Y(y)\) after substituting the inverse transformation does not give the transformed joint density; the multiplier \((m/n)w\) must also be included. Omitting its factor \(w\) changes the power in the integral, and omitting its constant changes the final coefficient. The resulting expression may look plausible while failing to integrate to one.
Another trap is to confuse a ratio of scaled variables with an unscaled ratio. For example, if \(U\) and \(V\) are positive, direct arithmetic gives \((U/3)/(V/4)=4U/(3V)\), and \((U/6)/(V/8)=4U/(3V)\). Both sides equal \(4U/(3V)\). Neither expression equals \(2U/V\) in general. When identifying an F distribution, simplify the ratio first and verify that each chi-square variable is divided by its own degrees of freedom.
Finally, the density formula has a specified order: \(m\) is the degrees of freedom for the chi-square variable in the numerator of \(F\), and \(n\) is for the denominator. Writing \(F_{n,m}\) instead of \(F_{m,n}\) changes the formula. A practical check is to go back to the definition \(F=(X/m)/(Y/n)\) before substituting values.
Check Your Understanding
Work each problem using the ratio definition and the density formula derived above. Give density values to four decimal places where requested.
- Independent \(X\sim\chi^2_2\) and \(Y\sim\chi^2_2\) define \(F=(X/2)/(Y/2)\). Find \(f_F(1)\). (Answer: \(0.2500\))
- Independent \(X\sim\chi^2_4\) and \(Y\sim\chi^2_6\) define \(F=(X/4)/(Y/6)\). Find \(f_F(1)\). (Answer: \(1296/3125=0.4147\))
- Independent \(X\sim\chi^2_6\) and \(Y\sim\chi^2_2\) define \(F=(X/6)/(Y/2)\). Find \(f_F(1)\). (Answer: \(81/256=0.3164\))
- Independent \(X\sim\chi^2_4\) and \(Y\sim\chi^2_8\) define \(F=(X/4)/(Y/8)\). Find \(f_F(1)\). (Answer: \(320/729=0.4390\))
- Independent \(X\sim\chi^2_2\) and \(Y\sim\chi^2_4\) define \(F=(X/2)/(Y/4)\). Use the density to find \(P(F>4)\). (Answer: \(1/9=0.1111\))