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

Frequently Asked Questions

What does a significant F-ratio tell me?

It tells you that at least one group mean is significantly different from the others, but not which groups differ. Post-hoc tests (Tukey, Bonferroni) are needed to identify specific pairwise differences.

What are the assumptions of ANOVA?

Observations are independent, each group is approximately normally distributed, and variances are roughly equal across groups (homogeneity of variance). ANOVA is fairly robust to moderate violations.

What is eta-squared?

Eta-squared is the proportion of total variance explained by the grouping variable. It is the ANOVA analog of R-squared. Values of 0.01, 0.06, and 0.14 correspond roughly to small, medium, and large effects.

Learn More

Guide

Hypothesis Testing Guide

Learn how hypothesis testing works step by step. Covers null and alternative hypotheses, test statistics, p-values, significance levels, and common pitfalls to avoid.

Ready to run the numbers?

Open ANOVA F-Ratio Calculator