ANOVA F-Statistic Calculator Formula

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

Formulas Used

F-Statistic

f_stat = ms_between / ms_within

df Between

df_between = k - 1

df Within

df_within = n_total - k

Eta-Squared (Effect Size)

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

Variables

VariableDescriptionDefault
ms_betweenMean Square Between Groups (MSB)120
ms_withinMean Square Within Groups (MSW)30
kNumber of Groups (k)4
n_totalTotal Sample Size (N)40

How It Works

One-Way ANOVA F-Test

ANOVA tests whether the means of two or more groups are significantly different by comparing between-group variance to within-group variance.

Formula

F = MSB / MSW

where MSB = SSB/(k-1) is the mean square between groups and MSW = SSW/(N-k) is the mean square within groups. A large F indicates that group means differ more than expected by random chance.

Worked Example

MSB = 120, MSW = 30, k = 4 groups, N = 40 total observations.

ms_between = 120ms_within = 30k = 4n_total = 40
  1. 01F = 120 / 30 = 4.000
  2. 02df1 = 4 - 1 = 3, df2 = 40 - 4 = 36
  3. 03Critical F(3,36) at alpha=0.05 ≈ 2.87
  4. 04F = 4.0 > 2.87, so groups differ significantly

Ready to run the numbers?

Open ANOVA F-Statistic Calculator