Skip to main content

Analysis of variance

Analysis of variance (ANOVA) uses an F-test to compare the means of three or more groups by partitioning total variation into between-group and within-group components. A significant result means at least one group mean differs.

ByHoang TruongUpdated

FrameworkHypothesis testing

See it move

Loading infographic...

A retailer tests three store layouts by measuring weekly sales at several branches. ANOVA partitions the total sum of squares in sales into a between-group component of 500, reflecting how much the layouts differ, and a within-group component of 300, reflecting ordinary branch-to-branch noise. The ratio of these, F = MSB ÷ MSW, tests whether the layouts' mean sales genuinely differ.

Where it fits
SubjectData Analysis & StatisticsAdvancedTopicCommon Significance TestsAdvanced

The formula

LaTeX
F=MSBMSWF = \frac{MSB}{MSW}

Variables

Mean square between groups = SSB ÷ (k − 1)
Mean square within groups = SSW ÷ (n − k)
Number of groups
Total number of observations across all groups

Reject H₀ (equal group means) when F exceeds the critical F-value at significance level α with (k − 1) and (n − k) degrees of freedom.

LaTeX
Total SS=SSB+SSW\text{Total SS} = \text{SSB} + \text{SSW}

Variables

Sum of squares between groups: variation explained by group membership
Sum of squares within groups: unexplained residual variation

ANOVA partitions total variation into explained (between-group) and unexplained (within-group) components.

Check yourself

PracticeCORE

A pharmaceutical company tests three vitamin supplement formulations. Each is given to 20 participants for eight weeks and blood-level outcomes are recorded. To determine whether mean outcomes differ across the three formulations, the analyst proposes ANOVA rather than three separate pairwise t-tests. What is the key statistical reason for this choice?

Select an answer to check your understanding.