FS2 6.2 - The F-test for two variances

FS2 6.2 - The F-test for two variances

Two processes can have similar average outputs but very different consistency. You will compare two normal population variances with an F-test, keep the two degrees of freedom in order and select one- or two-tailed critical regions without confusing variance with standard deviation.

A ratio of two independent sample variances

If you exchange the names of two production lines, should the evidence that their variances differ change?

It should not. The ratio 44 becomes 1/41/4, but its reference distribution and tail change too. A reciprocal ratio can carry exactly the same evidence; using the old critical value with the new ratio would change the test.

You already know

Use the unbiased sample variances s12,s22s_1^2,s_2^2, each with denominator ni−1n_i-1. A one-sample normal variance gives a chi-squared statistic. Variance hypotheses concern population parameters, and non-rejection is not proof of equality.

Here we have two independent random samples, each from a normal population. The population means may differ. Equality of variances does not mean equality of means, nor do equal-looking sample means establish equal population variances.

The F sampling distribution

For independent samples from N(μ1,σ12)\mathrm{N}(\mu_1,\sigma_1^2) and N(μ2,σ22)\mathrm{N}(\mu_2,\sigma_2^2), with n1,n2≥2n_1,n_2\ge2 and positive population variances,

S12/σ12S22/σ22∼Fn1−1,n2−1\frac{S_1^2/\sigma_1^2}{S_2^2/\sigma_2^2} \sim F_{n_1-1,n_2-1}

In particular, under H0:σ12=σ22H_0:\sigma_1^2=\sigma_2^2,

F=S12S22∼Fn1−1,n2−1F=\frac{S_1^2}{S_2^2}\sim F_{n_1-1,n_2-1}

The first degree of freedom belongs to the numerator sample; the second belongs to the denominator sample. The normalised ratio is supplied, and the null ratio follows by cancellation. In the formula booklet.

The F distribution is positive and generally skewed. Its two degrees of freedom have different jobs: swapping them usually changes its critical values. We use the supplied distribution result without proving its density.

Do not use this independent-sample test for measurements paired on the same subjects without checking the sampling structure. A large sample is not a replacement for the stated normal-population assumptions of this exact test.

Key idea

Attach each sample's n−1n-1 to its position in the variance ratio. Changing the ratio's orientation changes the order of the degrees of freedom and which tail is relevant.

Choose the setup from the sampling design, rather than from how similar the two sample means look.

Testing a specified direction of variability

For H1:σA2>σB2H_1:\sigma_A^2>\sigma_B^2, putting A's sample variance in the numerator makes large ratios support the alternative. Choose this direction from the research question, before looking at the sample.

The F table gives upper-tail percentage points. Its numerator degrees of freedom run across the columns; denominator degrees of freedom run down the rows. At upper probability 0.050.05, F10,8F_{10,8} has cutoff 3.353.35, while F8,10F_{8,10} has cutoff 3.073.07. Quote table entries in full.

Reciprocating an F ratio

If V∼Fν1,ν2V\sim F_{\nu_1,\nu_2}, then

1V∼Fν2,ν1\frac1V\sim F_{\nu_2,\nu_1}

If P(Fν2,ν1>u)=αP(F_{\nu_2,\nu_1}>u)=\alpha, then the lower cutoff for Fν1,ν2F_{\nu_1,\nu_2} satisfies

P(Fν1,ν2<1u)=αP\left(F_{\nu_1,\nu_2}<\frac1u\right)=\alpha

Both the ordered degrees of freedom and the tail reverse. The booklet states this reciprocal relationship for upper and lower percentage points. In the formula booklet.

If the required F probability is unavailable in the printed table, a suitable calculator can supply a critical value or p-value. Record the distribution, degrees of freedom and tail probability so the calculation is clear.

Worked example 1: is line A more variable?

Question. Independent random samples of component lengths from normal populations give

Production lineSample sizeSample standard deviation
A11114 mm4\,\mathrm{mm}
B992 mm2\,\mathrm{mm}

The standard deviations are the square roots of the unbiased sample variances. Test at 5%5\% whether line A has the greater population variance.

Plan. Square the standard deviations and put A in the numerator for an upper-tail test.

H0:σA2=σB2,H1:σA2>σB2f=4222=4ratio of variances(ν1,ν2)=(11−1,9−1)=(10,8)numerator firstc=3.35upper 5% table entry4>3.35\begin{aligned} H_0&:\sigma_A^2=\sigma_B^2,\qquad H_1:\sigma_A^2>\sigma_B^2\\ f&=\frac{4^2}{2^2}=4 &&\text{ratio of variances}\\ (\nu_1,\nu_2)&=(11-1,9-1)=(10,8) &&\text{numerator first}\\ c&=3.35 &&\text{upper }5\%\text{ table entry}\\ 4&>3.35 \end{aligned}

Why this step? A larger A variance makes the chosen ratio large; the upper tail matches the pre-specified alternative.

Answer. Reject H0H_0. There is sufficient evidence at 5%5\% that component lengths from line A have greater population variance than those from line B.

Check. The upper-tail p-value for F10,8F_{10,8} at 44 is approximately 0.03070.0307, agreeing with rejection.

Worked example 2 changes only the pre-specified alternative to whether line A has the smaller population variance. Keep the same labelled ratio to see the tail change.

Worked example 2: a lower-tail alternative

Question. With the same samples and assumptions, test at 5%5\% whether line A has smaller population variance.

Plan. Keep F=SA2/SB2F=S_A^2/S_B^2, but obtain its lower 5%5\% cutoff by reciprocating the reversed-degrees upper cutoff.

H0:σA2=σB2,H1:σA2<σB2f=164=4,F∼F10,8 under H0ℓ=13.07=0.32573…3.07 is the upper 5% point of F8,104>0.32573…outside the lower critical region\begin{aligned} H_0&:\sigma_A^2=\sigma_B^2,\qquad H_1:\sigma_A^2<\sigma_B^2\\ f&=\frac{16}{4}=4,\qquad F\sim F_{10,8}\text{ under }H_0\\ \ell&=\frac1{3.07}=0.32573\ldots &&3.07\text{ is the upper }5\%\text{ point of }F_{8,10}\\ 4&>0.32573\ldots &&\text{outside the lower critical region} \end{aligned}

Why this step? The reciprocal relationship needs the degrees of freedom in reverse order; 1/3.351/3.35 would be the lower cutoff for a different F distribution.

Answer. Do not reject H0H_0. There is insufficient evidence at 5%5\% that line A has smaller population variance.

Check. The observed spread is larger in A. It cannot supply evidence in this lower rejection tail. The lower-tail p-value is approximately 0.9690.969.

You could instead put B in the numerator and use an upper tail for this alternative, provided you also use F8,10F_{8,10}. A fixed orientation throughout a solution usually makes the reasoning easier to follow.

Watch out

Wrong: calculate 4/2=24/2=2, always put the larger observed standard deviation on top, or invert a cutoff without swapping its degrees of freedom. Right: use variances, follow the alternative and keep each sample size attached to its variance.

Change only line A's observed sample standard deviation from Worked example 2.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account