F-Statistic Calculator Formula

Understand the math behind the f-statistic calculator. Each variable explained with a worked example.

Formulas Used

F-Statistic

f_stat = s1_sq / s2_sq

df1 (numerator)

df1 = n1 - 1

df2 (denominator)

df2 = n2 - 1

SD Ratio

variance_ratio = sqrt(s1_sq / s2_sq)

Variables

VariableDescriptionDefault
s1_sqSample Variance 1 (larger)25
s2_sqSample Variance 2 (smaller)16
n1Sample Size 120
n2Sample Size 225

How It Works

How to Calculate the F-Statistic

Formula

F = s1^2 / s2^2

The F-statistic is the ratio of two sample variances, with the larger variance in the numerator by convention. Under the null hypothesis of equal population variances, F follows an F-distribution with df1 = n1-1 and df2 = n2-1. F-values near 1 suggest equal variances.

Worked Example

Group 1: variance = 25, n = 20. Group 2: variance = 16, n = 25.

s1_sq = 25s2_sq = 16n1 = 20n2 = 25
  1. 01F = 25 / 16 = 1.5625
  2. 02df1 = 20 - 1 = 19
  3. 03df2 = 25 - 1 = 24
  4. 04SD ratio = sqrt(1.5625) = 1.25
  5. 05Compare F = 1.5625 to F-distribution(19, 24)

Ready to run the numbers?

Open F-Statistic Calculator