From "which group is more spread out?" to the ANOVA F-test
Start — an everyday picture. Two groups of students each guess the temperature of a room. One group's guesses are all over the place; the other group's are tightly clustered. The F-distribution answers a simple question: is one group's spread really larger, or did it just happen by chance?
Build — put a number on "spread." Variance, $s^2$, measures how scattered a set of numbers is. Take two independent samples, compute each one's variance, and form their ratio $F = s_1^2 / s_2^2$. If both samples come from populations with the same true spread, this ratio should sit near $1$. Say sample A has $s_1^2 = 8$ and sample B has $s_2^2 = 4$, so $F = 2$. Is $2$ far enough from $1$ to be surprising? It depends on the sample sizes: small samples wobble a lot, so $F$ can wander far from $1$ by luck alone.
Deepen — the precise statement. If $U \sim \chi^2_{d_1}$ and $V \sim \chi^2_{d_2}$ are independent, then $F = \dfrac{U/d_1}{V/d_2} \sim F_{d_1,d_2}$. The two degrees of freedom — $d_1$ for the numerator, $d_2$ for the denominator — set the shape. The mean is $\dfrac{d_2}{d_2-2}$ (for $d_2 > 2$), always a little above $1$. With few degrees of freedom the curve is strongly right-skewed; as $d_1$ and $d_2$ grow it tightens around $1$. This is exactly the ANOVA statistic $F = \text{MS}_\text{between} / \text{MS}_\text{within}$: a large $F$ means the differences between groups outrun the noise within them. In the sim, the Parameter 1 and Parameter 2 sliders are $d_1$ and $d_2$, and Query x marks the value whose right-tail probability $P(F > x)$ is reported.
Set $d_1 = d_2 = 2$ and notice the heavy right skew; then drag both toward $10$ and watch the peak migrate in toward $1$. Next hold $d_1 = 5$ and slide $d_2$ from $3$ up to $10$ — the mean falls toward $1$ as $\frac{d_2}{d_2-2}$ shrinks. Finally set Query x $= 1$ and read $P(F > 1)$: it lands near, but not exactly at, one-half, because the F-distribution is skewed rather than symmetric.
F-Distribution — Ratio of two chi-squared variables
$$F = \frac{\chi^2_{d_1}/d_1}{\chi^2_{d_2}/d_2} \sim F_{d_1,d_2}$$
$E[F]=d_2/(d_2-2)$
This distribution has important theoretical and applied properties. See the simulation tabs to explore how shape changes with parameters.
ANOVA F-test, regression F-test, equality of variance tests (Levene, Bartlett). The F-distribution arises whenever we test whether one variance equals another. In ANOVA: F = MS_between/MS_within. In regression: F = (R²/p)/((1-R²)/(n-p-1)).
Use the interactive simulation above to explore how the PDF shape responds to parameter changes. The Live Sampling tab demonstrates convergence of empirical frequencies to theoretical probabilities.
Always verify parameter definitions before computing probabilities.
Different textbooks and software packages use different parameterizations. Always check which convention is being used (e.g., rate vs scale for exponential/gamma; shape vs rate for beta). Plug in extreme values and check that the PDF shape matches your expectation.
See the simulation to visualize how parameters affect the distribution shape.
Four teaching methods are compared with 5 students each. The between-group degrees of freedom are $d_1=4-1=3$ and the within-group degrees of freedom are $d_2=20-4=16$. Suppose the data give $F=\text{MS}_{between}/\text{MS}_{within}=3.8$. The 5% critical value of $F_{3,16}$ is about 3.24, and $P(F_{3,16}\ge3.8)\approx0.031$. So the means are not all equal at the 5% level. Under the null hypothesis the average of $F$ is $d_2/(d_2-2)=16/14\approx1.14$, so values near 1 are what pure noise gives.
Two machines give sample variances $s_1^2=8$ ($n_1=11$) and $s_2^2=3$ ($n_2=16$). Then $F=8/3\approx2.67$ with $d_1=10,\,d_2=15$. The one-sided critical value at 5% is about 2.54 and the p-value is about 0.042, so machine 1 is more variable. For a regression with $R^2=0.4$, $p=2$ predictors and $n=30$: $F=\frac{R^2/p}{(1-R^2)/(n-p-1)}=\frac{0.2}{0.6/27}=9.0$ on (2, 27) degrees of freedom, giving $p\approx0.001$.
The sliders go up to 10, so set $d_1=3$ and $d_2=10$. Use the query slider to read the right-tail probability at $x=3.8$: it should be about 0.047, and the 5% critical value is about 3.71. Now lower $d_2$ from 10 to 5: the right tail gets heavier (heavier tails are why small samples need bigger F values to reach significance), and the mean $d_2/(d_2-2)$ rises from 1.25 to 1.67. Make $d_1$ small, for example 1: the density becomes unbounded near zero. The F-distribution is never negative and always right-skewed. (The ANOVA example above uses $d_2=16$, which is beyond the slider, but the formulas are the same.)
1. What is $E[F]$ when $d_2=10$? 2. An ANOVA has 3 groups and 30 observations in total. What are $d_1$ and $d_2$? 3. Why can an F statistic never be negative?
Answers. 1. $10/8=1.25$. 2. $d_1=2$ and $d_2=27$. 3. It is a ratio of two sums of squares, each divided by its degrees of freedom, so both parts are non-negative.