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

Frequently Asked Questions

What assumptions does ANOVA require?

Independence of observations, normality within each group (checked with Shapiro-Wilk test), and homogeneity of variances (checked with Levene test). ANOVA is robust to mild violations with equal group sizes.

What do I do after a significant F-test?

A significant F-test says at least two means differ, but not which ones. Use post-hoc tests (Tukey HSD, Bonferroni, Scheffe) for pairwise comparisons while controlling family-wise error rate.

What is eta-squared?

Eta-squared (eta²) = SSB/SST is the proportion of total variance explained by group membership. It is the ANOVA analog of R². Cohen guidelines: 0.01 small, 0.06 medium, 0.14 large effect.

Ready to run the numbers?

Open ANOVA F-Statistic Calculator