The F-Test and F-Distribution › The F-Distribution: Where It Comes From
Machine Learning from ScratchAll chapters The F-Test and F-Distribution › The F-Distribution: Where It Comes FromOne section · Sections in this chapter3 / 10 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
The F-distribution arises naturally when comparing two independent estimates of variance. To understand why, we need to trace through the mathematical foundations.
Building Block: Chi-Squared Distribution
Recall from earlier chapters that when you estimate variance from a sample of observations drawn from a normal population with true variance , the quantity:
follows a chi-squared distribution with degrees of freedom. This result reflects the fact that is computed from observations but loses one degree of freedom because we estimate the mean from the same data.
From Two Samples to the F-Distribution
Now suppose we have two independent samples from populations with variances and :
- Sample 1: observations, sample variance
- Sample 2: observations, sample variance
Each sample variance, properly scaled, follows a chi-squared distribution:
The F-distribution is defined as the ratio of two independent chi-squared random variables, each divided by its degrees of freedom:
Substituting our variance estimates:
The Key Simplification Under the Null Hypothesis
Under the null hypothesis that , the ratio , which gives us:
where and .
The unknown common variance cancels out! This is why the F-test works: we can test whether two population variances are equal without knowing their values. We only need the ratio of the sample variances, and we know its distribution under the null hypothesis.
Properties of the F-Distribution
The F-distribution has distinctive characteristics that set it apart from the normal and t-distributions:
Two degrees of freedom parameters: The F-distribution requires both (numerator) and (denominator). The order matters: is a different distribution from . This asymmetry reflects the fact that we're comparing a specific numerator variance to a specific denominator variance.
Always non-negative: Since F is a ratio of variances (squared quantities), it cannot be negative. The distribution is defined only for .
Right-skewed: The F-distribution has a long right tail, especially when degrees of freedom are small. As both and increase, the distribution becomes more symmetric and concentrated.
Mean near 1 under the null: When comparing equal variances, F should be approximately 1. The expected value is for , which approaches 1 as grows large.
Reciprocal relationship: If , then . This is useful for two-tailed tests and for ensuring the larger variance is in the numerator.

