Mathwords logoMathwords

F-Test — Definition, Formula & Example

An F-test is a hypothesis test that checks whether two populations have the same variance by dividing one sample variance by the other. A ratio close to 1 fits equal spread. A ratio far from 1 is evidence that one population varies more than the other.

Let independent simple random samples of sizes n1n_1 and n2n_2 come from two normal populations with variances σ12\sigma_1^2 and σ22\sigma_2^2. To test H0:σ12=σ22H_0: \sigma_1^2 = \sigma_2^2, compute F=s12/s22F = s_1^2 / s_2^2. Under H0H_0, this statistic follows an F-distribution with n1−1n_1 - 1 numerator and n2−1n_2 - 1 denominator degrees of freedom. The F-distribution is the reference curve. The F-test is the full procedure: hypotheses, statistic, and decision. The same distribution also supports other F-tests, such as ANOVA, which compare means rather than two variances.

Key Formula

F=s12s22,d1=n1−1,d2=n2−1F = \frac{s_1^2}{s_2^2}, \qquad d_1 = n_1 - 1, \quad d_2 = n_2 - 1
Where:
  • s12s_1^2 = Sample variance of the first sample (the numerator)
  • s22s_2^2 = Sample variance of the second sample (the denominator)
  • n1,n2n_1, n_2 = Sample sizes of the two independent samples
  • d1,d2d_1, d_2 = Numerator and denominator degrees of freedom

Worked Example

Problem: A cereal company suspects that Machine A fills boxes less consistently than Machine B. A sample of 11 boxes from Machine A has a standard deviation of 0.9 ounces. A sample of 13 boxes from Machine B has a standard deviation of 0.5 ounces. Assume both fill weights are normally distributed. At α=0.05\alpha = 0.05, is there evidence that Machine A's fill weights have a larger variance?
Step 1: State the hypotheses. The claim is one-sided, so put Machine A's variance in the numerator. Then find the degrees of freedom.
H0:σA2=σB2,Ha:σA2>σB2,d1=11−1=10,d2=13−1=12H_0: \sigma_A^2 = \sigma_B^2, \quad H_a: \sigma_A^2 > \sigma_B^2, \quad d_1 = 11 - 1 = 10, \quad d_2 = 13 - 1 = 12
Step 2: Square each standard deviation to get the variances. Then divide.
F=0.920.52=0.810.25=3.24F = \frac{0.9^2}{0.5^2} = \frac{0.81}{0.25} = 3.24
Step 3: An F-table gives the upper 5% critical value for F(10,12)F(10, 12) as about 2.75. Compare your statistic with it.
F=3.24>F0.05(10,12)≈2.75F = 3.24 > F_{0.05}(10, 12) \approx 2.75
Answer: Since 3.24 is greater than 2.75, you reject H0H_0. At the 5% level, there is convincing evidence that Machine A's fill weights vary more than Machine B's.

Why It Matters

Manufacturers use this test to judge consistency, such as whether a new machine fills packages more evenly than an old one. It is not on the AP Statistics exam. You will see it in college statistics courses, where F-tests also drive ANOVA and regression output.

Common Mistakes

Mistake: Dividing the standard deviations instead of the variances, for example writing F=0.9/0.5=1.8F = 0.9 / 0.5 = 1.8.
Correction: The F-statistic is a ratio of variances. Square each standard deviation first. In the example this gives 0.81/0.25=3.240.81 / 0.25 = 3.24, not 1.8. The test is also very sensitive to non-normal data, so check the normality condition before you trust the result.

Related Terms