ANOVA F-Ratio Calculator Formula

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

Formulas Used

F-Ratio

f_ratio = ms_between / ms_within

df Between

df_between = k - 1

df Within

df_within = N - k

Eta-squared (approx)

eta_squared = (ms_between * (k - 1)) / (ms_between * (k - 1) + ms_within * (N - k))

Variables

VariableDescriptionDefault
ms_betweenMean Square Between (MSB)120
ms_withinMean Square Within (MSW)30
kNumber of Groups3
NTotal Observations30

How It Works

How to Calculate the ANOVA F-Ratio

Formula

F = MSB / MSW

ANOVA (Analysis of Variance) tests whether the means of three or more groups are equal. MSB (Mean Square Between) measures variability between group means. MSW (Mean Square Within) measures variability within groups. A large F-ratio means between-group differences are large relative to within-group noise.

Worked Example

Three groups, 30 total observations. MSB = 120, MSW = 30.

ms_between = 120ms_within = 30k = 3N = 30
  1. 01F = MSB / MSW = 120 / 30 = 4.0
  2. 02df between = 3 - 1 = 2
  3. 03df within = 30 - 3 = 27
  4. 04Eta-squared = (120*2) / (120*2 + 30*27) = 240 / 1050 = 0.2286
  5. 05About 22.9% of total variance is explained by group membership

Ready to run the numbers?

Open ANOVA F-Ratio Calculator