Why Compare Two Population Variances?
Two populations can have similar averages but different amounts of variation. For example, a hypothetical quality-control study might compare the variability of measurements from two independent production processes. A formal test of equal variances asks whether the observed difference between their sample variances is large enough to be inconsistent with equal population variances, subject to a specific model.
The classical procedure is an exact F test when the two samples are independent and each comes from a normal population. Its main ingredients are the null hypothesis, the ratio of sample variances, and the two degrees of freedom. The test is aligned with the SOA VEE Mathematical Statistics syllabus.
The population means are not required to be equal. Each sample variance measures variation around that sample’s own mean. The question in this test concerns the population variances, not whether the population means differ.
The Statistic and Its Reference Distribution
For each sample, calculate the usual unbiased sample variance. If \(\bar{X}\) and \(\bar{Y}\) are the respective sample means, then
Keep the sample labels fixed and form the ratio \(F=S_1^2/S_2^2\). Under the null hypothesis and the model assumptions, this statistic has an F distribution with \(n_1-1\) numerator degrees of freedom and \(n_2-1\) denominator degrees of freedom. In notation, its reference distribution is \(F_{n_1-1,n_2-1}\).
For a test of equality, departures in either direction count as evidence against the null. Let \(q_p(\nu_1,\nu_2)\) denote the \(p\)-quantile of an F distribution with \(\nu_1\) and \(\nu_2\) degrees of freedom. For significance level \(\alpha\), reject \(H_0\) if
The two tails each receive probability \(\alpha/2\) under the null. The rejection rule uses the same fixed numerator and denominator as the statistic. It does not mean that the larger observed variance must always go in the numerator: rearranging the ratio changes the degrees of freedom attached to it.
Why the F Distribution Appears
The justification follows from the normal-sample variance result and the definition of an F variable. For a sample of size \(n\) from a normal population with variance \(\sigma^2\), the scaled sample variance \((n-1)S^2/\sigma^2\) has a chi-square distribution with \(n-1\) degrees of freedom. The two independent samples therefore provide independent chi-square variables.
Under \(H_0\), the population variances are equal, so dividing the first scaled variance by its degrees of freedom and then by the second scaled variance divided by its degrees of freedom cancels the common variance. The resulting ratio is exactly \(S_1^2/S_2^2\). It is the ratio of two independent chi-square variables, each divided by its own degrees of freedom: precisely the construction of an F variable.
Normality and independence are essential to this exact reference distribution. If the samples are not independent, or if the populations are not normal, the stated exact F law is not justified merely because sample variances can still be calculated. The test statistic can still be formed, but its classical null distribution may not apply.
Setting Up the Test in Practice
A careful setup separates the model, the hypotheses, the calculation, and the decision rule. This prevents a correct-looking variance ratio from being paired with the wrong reference distribution.
Confirm that each sample is random from a normal population and that the two samples are independent of each other.
For equality, use \(H_0:\sigma_1^2=\sigma_2^2\) and \(H_A:\sigma_1^2\ne\sigma_2^2\).
Use divisors \(n_1-1\) and \(n_2-1\), then calculate \(F=S_1^2/S_2^2\).
Use \(F_{n_1-1,n_2-1}\), preserving the order of the samples in the ratio.
At level \(\alpha\), compare the statistic with the lower and upper quantiles \(q_{\alpha/2}\) and \(q_{1-\alpha/2}\) for those degrees of freedom.
Worked Setups
Worked Example: Comparing Two Sets of Measurements
Two independent hypothetical laboratory samples are taken from normal populations. Sample A contains \(2,4,6,8,10\), and sample B contains \(3,5,7,9,11,13\). Set up the two-sided test of equal population variances and calculate its statistic and reference distribution.
Method. Use the two-sample F test, keeping sample A in the numerator as specified by \(F=S_A^2/S_B^2\). The problem states the normality and independence assumptions needed for the exact test.
For sample A, \(n_A=5\) and \(\bar{X}=(2+4+6+8+10)/5=30/5=6\). Its sum of squared deviations is \((2-6)^2+(4-6)^2+(6-6)^2+(8-6)^2+(10-6)^2=16+4+0+4+16=40\). Thus \(S_A^2=40/(5-1)=40/4=10\).
For sample B, \(n_B=6\) and \(\bar{Y}=(3+5+7+9+11+13)/6=48/6=8\). Its sum of squared deviations is \(25+9+1+1+9+25=70\). Thus \(S_B^2=70/(6-1)=70/5=14\).
The hypotheses are \(H_0:\sigma_A^2=\sigma_B^2\) and \(H_A:\sigma_A^2\ne\sigma_B^2\). The observed statistic is \(F=10/14=5/7\approx0.7143\). The numerator degrees of freedom are \(5-1=4\), and the denominator degrees of freedom are \(6-1=5\). Under the null, the reference distribution is \(F_{4,5}\). At level \(\alpha\), the rejection region is below \(q_{\alpha/2}(4,5)\) or above \(q_{1-\alpha/2}(4,5)\).
Check. The sample variances use divisors 4 and 5, and the statistic retains A in the numerator, so its degrees of freedom are ordered \(4,5\). A common mistake would be to reverse the statistic after seeing that \(14>10\), without also changing the degrees-of-freedom order.
Worked Example: Using Reported Sample Standard Deviations
A hypothetical study independently samples output times from two normal processes. Process A has \(n_A=9\) observations and sample standard deviation \(s_A=12\) minutes. Process B has \(n_B=7\) observations and sample standard deviation \(s_B=8\) minutes. Formulate the equality test and determine its statistic and reference distribution.
Method. Square the reported standard deviations to obtain sample variances, then use the stated sample order in the ratio.
The sample variances are \(s_A^2=12^2=144\) minutes squared and \(s_B^2=8^2=64\) minutes squared. The hypotheses are \(H_0:\sigma_A^2=\sigma_B^2\) and \(H_A:\sigma_A^2\ne\sigma_B^2\).
With A in the numerator, \(F=s_A^2/s_B^2=144/64=9/4=2.25\). The numerator degrees of freedom are \(n_A-1=9-1=8\), and the denominator degrees of freedom are \(n_B-1=7-1=6\). Under the null and the stated model, \(F\) has reference distribution \(F_{8,6}\). At any specified significance level \(\alpha\), use the lower and upper quantiles of that same \(F_{8,6}\) distribution, with tail areas \(\alpha/2\) each.
Check. The units cancel in the ratio because both variances are measured in minutes squared. The result is dimensionless, as an F statistic should be. Using \(12/8=1.5\) as the statistic would incorrectly compare standard deviations rather than variances.
Worked Example: Calculating Variances Before Forming the Ratio
Two independent samples come from normal populations. For sample C, \(n_C=4\), the sample mean is 15, and the sum of squared deviations from that mean is 21. For sample D, \(n_D=5\), the sample mean is 20, and the corresponding sum is 32. Set up the two-sided equality test and calculate the reference statistic.
Method. Convert each sum of squared deviations to a sample variance using its own \(n-1\) divisor. Then use \(S_C^2/S_D^2\).
For C, \(S_C^2=21/(4-1)=21/3=7\). For D, \(S_D^2=32/(5-1)=32/4=8\). The null and alternative hypotheses are \(H_0:\sigma_C^2=\sigma_D^2\) and \(H_A:\sigma_C^2\ne\sigma_D^2\).
The statistic is \(F=7/8=0.875\). Its numerator degrees of freedom are \(4-1=3\), and its denominator degrees of freedom are \(5-1=4\), so the null reference distribution is \(F_{3,4}\). The two-sided rejection region at level \(\alpha\) is \(F<q_{\alpha/2}(3,4)\) or \(F>q_{1-\alpha/2}(3,4)\).
Check. The two variances are \(7\) and \(8\), as their squared-deviation totals divided by \(3\) and \(4\) require. The small difference in the observed variances alone does not settle the test; the decision also depends on the reference distribution and the selected significance level.
Common Mistakes and Their Corrections
The most consequential errors usually involve the sample-variance divisor, the order of the ratio, or the assumptions that make the reference distribution exact.
- Dividing by \(n\) instead of \(n-1\). In Worked Example 1, dividing the sums of squares by the sample sizes would give \(40/5=8\) and \(70/6\approx11.6667\), producing a ratio of about \(0.6857\). The correct sample variances are \(40/4=10\) and \(70/5=14\), so the correct statistic is \(10/14\approx0.7143\).
- Using the wrong degrees of freedom. If the numerator is \(S_1^2\), the numerator degrees of freedom are \(n_1-1\), not \(n_2-1\). The denominator degrees of freedom likewise come from the sample variance in the denominator.
- Comparing standard deviations instead of variances. The classical statistic is \(S_1^2/S_2^2\), not \(S_1/S_2\). Squaring the sample standard deviations is necessary before forming the ratio.
- Using the test without its model assumptions. The exact F reference distribution requires independent samples from normal populations. Calculating a ratio does not itself establish those conditions.
- Treating the equality test as one-directional. The alternative is \(\sigma_1^2\ne\sigma_2^2\), so unusually small and unusually large ratios can both be evidence against \(H_0\). The two-sided test allocates \(\alpha/2\) to each tail.
Check Your Understanding
For each problem, state the two-sided test setup and calculate the statistic and degrees of freedom where requested. Assume independent normal samples whenever the problem says the classical test applies.
- Two independent normal samples have sizes \(6\) and \(8\), with sums of squared deviations \(45\) and \(56\), respectively. Use the first sample in the numerator. Find the sample variances, statistic, and reference degrees of freedom. (Answer: \(S_1^2=9\), \(S_2^2=8\), \(F=1.125\), reference \(F_{5,7}\).)
- Independent normal samples have sizes \(10\) and \(12\), with sample standard deviations \(3.5\) and \(2.5\), respectively. Use the first sample in the numerator. (Answer: \(H_0:\sigma_1^2=\sigma_2^2\), \(H_A:\sigma_1^2\ne\sigma_2^2\), \(F=1.96\), reference \(F_{9,11}\).)
- Independent normal samples have sizes \(5\) and \(6\), with sums of squared deviations \(24\) and \(50\). Use the second sample in the numerator. (Answer: \(S_2^2=10\), \(S_1^2=6\), \(F=10/6=5/3\), reference \(F_{5,4}\).)
- Two samples each contain \(7\) observations. Their sample variances are \(18\) and \(12\), and the samples are independent and normal. Write the statistic and the two-sided level-\(\alpha\) rejection rule, using the first sample in the numerator. (Answer: \(F=18/12=1.5\), reference \(F_{6,6}\); reject if \(F<q_{\alpha/2}(6,6)\) or \(F>q_{1-\alpha/2}(6,6)\).)
- Two groups each have \(8\) measurements, but every observation in the second group is paired with and dependent on an observation in the first. Can the classical independent-samples F reference distribution be asserted from the stated information? (Answer: No; dependence between the samples violates the assumptions for this exact classical F test.)