F-Test for Equality of Variances

Test whether two populations have equal variance by comparing the ratio of their sample variances. Get the F-statistic, degrees of freedom and p-value to decide whether variability differs between two groups.

Run F-Test →

What is an F-Test for Variances?

The F-test for equality of variances tests whether two populations have the same variance. It is based on the ratio of the two sample variances: if the populations truly have equal variance, this ratio should be close to one, and the F-distribution describes how much it can deviate by chance.

The test is often used as a preliminary check before a two-sample t-test, since Student's t-test assumes equal variances. It also stands alone whenever the question of interest is about variability itself, for example comparing the consistency of two processes or the precision of two instruments.

The F-statistic is the larger sample variance divided by the smaller, and its p-value comes from the F-distribution with two separate degrees of freedom, one for each sample. A small p-value indicates the two variances differ significantly.

In plain terms: Sometimes you care about consistency, not the average. The F-test compares how spread out two groups are by dividing one group's variance by the other's. If that ratio is far from 1, the groups have genuinely different variability.

Key Points

Ratio of Variances

The F-statistic is the ratio of the two sample variances, conventionally the larger over the smaller so F is at least 1.

Two Degrees of Freedom

The F-distribution uses separate numerator and denominator degrees of freedom, one for each sample (n − 1 each).

Sensitive to Normality

The F-test for variances is notably sensitive to departures from normality, more so than t-tests of means.

Key Formulas

F = s₁² / s₂²   (larger variance over smaller)
df1 = n₁ − 1 (numerator)
df2 = n₂ − 1 (denominator)
p-value from the F-distribution

Interpreting the Result

The null hypothesis is that the two population variances are equal (their ratio is one). A small p-value means the ratio is farther from one than chance would allow, so the variances differ significantly.

Because the test is sensitive to non-normality, a significant result can sometimes reflect a departure from normality rather than a true variance difference. Levene's test is a more robust alternative when normality is in doubt.

Assumptions & Validation

Normality

Both samples come from normally distributed populations; the test is quite sensitive to this.

If violated: Use Levene's or the Brown-Forsythe test, which are robust to non-normality.

Independence

The two samples are independent of each other.

If violated: Correlated data requires a different approach.

Random Sampling

Each sample is a random sample from its population.

If violated: Address sampling bias.

⚠️ Check assumptions first

The F-test for equality of variances is unusually sensitive to non-normality: with skewed or heavy-tailed data it can report a significant difference in variance that is really just a departure from normality. If you are not confident the data is normal, prefer Levene's test or the Brown-Forsythe test, which are far more robust, and reserve the F-test for cases where normality is well established.

When NOT to Use F-Test for Equality of Variances

Non-normal Data

For non-normal data, use Levene's or Brown-Forsythe test, which are robust to distribution shape.

Comparing Means

To compare the means of two groups, use a t-test, not the F-test for variances.

More Than Two Groups

To compare variances across three or more groups, use Levene's or Bartlett's test.

Industry Applications

Pre-t-Test Check

Decide whether to use the equal-variance or Welch's two-sample t-test by first testing the variances.

Process Consistency

Compare the variability of two processes or lines to see which is more consistent.

Instrument Precision

Compare the measurement spread of two instruments or methods.

Quality Improvement

Confirm whether a change reduced variability, not just shifted the mean.

Frequently Asked Questions

What does the F-test for variances test?

It tests whether two populations have equal variance, based on the ratio of their sample variances. Under the null hypothesis of equal variances, this ratio should be close to one, and the F-distribution describes how far it can stray by chance. A ratio far from one, and a correspondingly small p-value, indicates the two populations differ in variability.

Why is the F-test often used before a t-test?

Student's two-sample t-test assumes the two groups have equal variances, so the F-test is sometimes run first to check that assumption. However, because the F-test is sensitive to non-normality and preliminary testing can complicate the analysis, many statisticians instead recommend using Welch's t-test by default, which does not require equal variances and avoids the need for a separate variance test.

How is the F-statistic calculated?

The F-statistic is the ratio of the two sample variances, conventionally arranged with the larger variance in the numerator and the smaller in the denominator so that F is at least one. Its p-value comes from the F-distribution, which uses two separate degrees of freedom, one for the numerator sample and one for the denominator sample, each equal to that sample's size minus one.

Why is the F-test sensitive to non-normality?

The F-test for variances relies more heavily on the normality assumption than t-tests of means do. When data is skewed or heavy-tailed, the test can report a significant difference in variance that actually reflects the departure from normality rather than a true difference in spread. This is why robust alternatives are preferred when normality is uncertain.

What are robust alternatives to the F-test?

Levene's test and the Brown-Forsythe test compare variances without strongly assuming normality, making them more reliable for real-world data. Levene's test uses absolute deviations from the group mean, while Brown-Forsythe uses deviations from the median, which is even more robust to skewness. Both are preferred over the F-test when the normality of the data is in doubt.

Can the F-test compare more than two variances?

No, the F-test for equality of variances compares exactly two. To compare the variances of three or more groups, use Bartlett's test if the data is normal, or Levene's and Brown-Forsythe tests if it is not. These extend the idea of testing homogeneity of variance across multiple groups, which is a common assumption check before ANOVA.

Compare the Variability of Two Groups

Run an F-test on two variances with the F-statistic and p-value. Free during Beta.

Run F-Test →