F-Statistic Calculator

F-Statistic Calculator

Calculate an F statistic and its p-value, either as the ratio of two sample variances or from the sums of squares in an ANOVA table.

F = s₁² ÷ s₂² · F = MS between ÷ MS within

Put the sample you suspect is more variable first; the test is two-tailed either way.

Fill in all four boxes

What is an F-Statistic?

An F-statistic is a ratio of two variances. If both estimate the same underlying variance, F should be close to 1; values far from 1 suggest they don't.

It appears in two main places. Comparing two samples' variances directly tests whether one process is more consistent than another. In ANOVA and regression, F compares the variation explained by a model with the variation left over.

F needs two degrees of freedom, one for each variance, and the order matters: F(15, 20) and F(20, 15) are different distributions.

F-Statistic Formula

As given in the NIST/SEMATECH e-Handbook, section 1.3.5.9 (F-test for equality of two variances). See Sources.

1. Two sample variances

F = s₁² ÷ s₂², df = (n₁ − 1, n₂ − 1)

2. From an ANOVA table

F = (SS between ÷ df between) ÷ (SS within ÷ df within)

3. p-value

ANOVA: p = P(F(d₁, d₂) ≥ F)
Two variances: p = 2 × min(P(F ≥ f), P(F ≤ f))

Worked Example: Are Two Machines Equally Consistent?

Given:
Machine A: 16 parts, SD 0.12 mm. Machine B: 21 parts, SD 0.08 mm.
Step 1:
Ratio of variances:
F = 0.12² ÷ 0.08² = 0.0144 ÷ 0.0064 = 2.25
Step 2:
Degrees of freedom:
(16 − 1, 21 − 1) = (15, 20)
Step 3:
Two-tailed p:
2 × P(F(15, 20) ≥ 2.25) = 2 × 0.0457 = 0.091
Result:
F = 2.25, p = 0.091

Machine A's variance is more than double B's, yet with these sample sizes that isn't significant at 5%. Variance comparisons need surprisingly large samples.

Critical F-Values at the 5% Level

Right-tailed, as used in ANOVA. Rows are the denominator df, columns the numerator df.

Upper 5% critical values of the F distribution
d₂ \ d₁123510
56.615.795.415.054.74
104.964.13.713.332.98
124.753.893.493.112.75
204.353.493.12.712.35
304.173.322.922.532.16
6043.152.762.371.99

Common F-Statistic Mistakes

  • Dividing standard deviations instead of variances. F is s₁² ÷ s₂². 0.12 ÷ 0.08 = 1.5 is not the F statistic.
  • Swapping the degrees of freedom. The first df belongs to the numerator. Swapping them changes the p-value.
  • Using the variance F-test on skewed data. It's very sensitive to non-normality. Levene's test is more robust for checking equal variances.
  • Using sums of squares without dividing by df. ANOVA's F uses mean squares: each SS divided by its own degrees of freedom.

F-Statistic FAQs

What does an F of 1 mean?

That the two variance estimates are equal. In ANOVA it means the groups vary no more than random variation would predict.

Can F be less than 1?

Yes. In a variance comparison it just means the second sample is more variable. In ANOVA, F below 1 is never significant.

Why is the ANOVA F-test one-tailed?

Only a large between-group variance is evidence of different means. A small F points the other way, towards no difference.

How is F related to t?

With two groups, the ANOVA F equals the square of the pooled t statistic, with df (1, n₁ + n₂ − 2).

Who is F named after?

Sir Ronald Fisher, who developed analysis of variance in the 1920s. George Snedecor named the distribution in his honour.

How do I calculate it in Excel?

=F.TEST(range1, range2) gives the two-tailed p for two variances. =F.DIST.RT(F, d1, d2) gives the right-tail p.

What is the F-test in regression?

It tests whether the model explains more than chance, comparing the regression mean square with the residual mean square.

What sample sizes do variance tests need?

Large ones. In the example, a variance ratio of 2.25 wasn’t significant with 16 and 21 parts.

Sources

Related Tools