Course contentsShow
← Data Science
Lesson 443 of 2,14512. ANOVA and Multiple ComparisonsFree lesson

Mean Squares and the F-Ratio

Converting sum of squares to mean squares and computing the F-ratio for hypothesis testing.

Mean Squares and the F-Ratio

You'll learn how to convert sum of squares into meaningful variance estimates and build the F-ratio for ANOVA hypothesis testing.

Now that you've calculated the sum of squares (between and within groups) and their degrees of freedom, you need to standardize these values to make them comparable. That's where mean squares come in.

What Are Mean Squares?

Think of mean squares as average variability per degree of freedom. Just like dividing a total score by the number of items gives you a mean, dividing a sum of squares by its degrees of freedom gives you a mean square (MS).

The two key mean squares in one-way ANOVA are:

  • Mean Square Between (MSB): Variance between groups

    MSB = SS_between / df_between
    
  • Mean Square Within (MSW): Variance within groups (also called Mean Square Error, MSE)

    MSW = SS_within / df_within
    

MSW represents random variability (noise), while MSB captures both random variability and any real differences between group means.

Computing the F-Ratio

The F-ratio is simply the ratio of these two mean squares:

F = MSB / MSW

Interpretation: If group means truly differ, MSB should be larger than MSW, making F > 1. If there's no real difference between groups, F should be close to 1 (both numerator and denominator estimate the same underlying variance).

A large F-value suggests that between-group variance exceeds within-group variance more than we'd expect by chance alone—evidence against the null hypothesis.

Key Takeaway: Mean squares convert sums of squares into variance estimates by dividing by degrees of freedom; the F-ratio compares between-group variance to within-group variance, providing the test statistic for ANOVA hypothesis testing.