01 / 20

One-Way ANOVA
Comparing Multiple Means

Learn how to test whether three or more group means differ using the \( F \)-statistic, variance decomposition, and the logic behind Analysis of Variance.

Business Statistics

Why Not Just Use Multiple \( t \)-Tests?

When comparing three or more groups, running all pairwise \( t \)-tests inflates the probability of a Type I error. With \( k = 4 \) groups you need \( \binom{4}{2} = 6 \) tests, and the overall error rate grows rapidly.

What Is One-Way ANOVA?

Analysis of Variance (ANOVA) tests whether the means of three or more independent groups are equal. Despite the name, it works by comparing variances: variance between groups versus variance within groups.

Factor
The categorical independent variable (e.g., marketing strategy)
Levels
The specific groups or treatments (e.g., Strategy A, B, C)
Response
The quantitative dependent variable (e.g., sales revenue)

Visual Intuition: Between vs. Within

Grand Mean Group A Group B Group C Between-group variation Within-group variation = scatter around each group mean

The Hypotheses

\( H_0 \) : Null
\( \mu_1 = \mu_2 = \cdots = \mu_k \)
All group means are equal.
\( H_a \) : Alternative
At least one \( \mu_i \) differs from the others.

Key Assumptions

1
Independence: Observations within and across groups are independent of each other.
2
Normality: The response variable is approximately normally distributed within each group (less critical with large \( n \)).
3
Homogeneity of Variances: The population variances \( \sigma_1^2, \sigma_2^2, \ldots, \sigma_k^2 \) are equal (testable with Levene's test).

Variance Decomposition

ANOVA partitions total variation into two components. The fundamental identity:

SST
\( \displaystyle\sum_{i=1}^{k}\sum_{j=1}^{n_i}(x_{ij}-\bar{x})^2 \)
Total deviation from grand mean
SSB
\( \displaystyle\sum_{i=1}^{k} n_i(\bar{x}_i - \bar{x})^2 \)
Between-group (explained)
SSW
\( \displaystyle\sum_{i=1}^{k}\sum_{j=1}^{n_i}(x_{ij}-\bar{x}_i)^2 \)
Within-group (unexplained)

The \( F \)-Statistic

We convert sums of squares into mean squares by dividing by their degrees of freedom, then form a ratio:

MSB
\( \dfrac{SSB}{k-1} \)
Between-group mean square, df = \( k-1 \)
MSW
\( \dfrac{SSW}{N-k} \)
Within-group mean square, df = \( N-k \)

The \( F \)-Distribution

F value Density 0 1 2 3 4 5 F critical Fail to reject H₀ Reject H₀
\( (p < \alpha) \)

\( t \)-Test vs. ANOVA

Two-Sample \( t \)-Test One-Way ANOVA
Groups compared Exactly 2 \( k \geq 2 \) (typically 3+)
Test statistic \( t \) \( F \)
Relationship When \( k = 2 \): \( F = t^2 \)
Type I error control Single comparison Familywise at \( \alpha \)
Identifies which differ? Yes (only 2 groups) No: need post-hoc tests

The ANOVA Table

Source SS df MS F
Between SSB \( k - 1 \) \( \dfrac{SSB}{k-1} \) \( \dfrac{MSB}{MSW} \)
Within SSW \( N - k \) \( \dfrac{SSW}{N-k} \)
Total SST \( N - 1 \)

Step-by-Step Procedure

1
State hypotheses: \( H_0\!: \mu_1 = \mu_2 = \cdots = \mu_k \) vs. \( H_a\!: \) at least one \( \mu_i \) differs.
2
Check assumptions: independence, normality, equal variances.
3
Compute group means \( \bar{x}_i \) and the grand mean \( \bar{x} \).
4
Calculate SSB, SSW, SST and fill in the ANOVA table.
5
Compute \( F = \text{MSB} / \text{MSW} \) and compare to \( F_{\text{crit}} \) or find the p-value.
6
Decide: if \( p \leq \alpha \), reject \( H_0 \). Then run post-hoc tests if needed.

Example: Ad Campaign Sales

A company tests three advertising strategies on 15 stores (5 per strategy). Weekly sales (in thousands):

Strategy A Strategy B Strategy C
121814
142016
111713
132115
101912

Computing SSB and SSW

Building the ANOVA Table

Source SS df MS F
Between 130 2 65 26.0
Within 30 12 2.5
Total 160 14

Common Mistakes

✕ Claiming ANOVA tells you which groups differ
A significant \( F \) only says "not all equal." Use Tukey HSD or Bonferroni for pairwise comparisons.
✕ Ignoring equal variance assumption
If the largest group variance is much larger than the smallest, the \( F \)-test becomes unreliable. Run Levene's test first.
✕ Wrong degrees of freedom
Between df = \( k - 1 \), Within df = \( N - k \). Mixing these up changes \( F_{\text{crit}} \) and invalidates the result.

Question 1 of 5

In a one-way ANOVA with 4 groups and 40 total observations, what are the degrees of freedom for the between-group and within-group sources?

Question 2 of 5

An ANOVA produces \( SSB = 200 \) and \( SSW = 600 \) with \( k = 3 \) groups and \( N = 30 \) observations. What is the \( F \)-statistic?

Question 3 of 5

Which of the following is not an assumption of one-way ANOVA?

Question 4 of 5

A researcher obtains \( F = 5.12 \) with a p-value of 0.012 at \( \alpha = 0.05 \). What is the correct conclusion?

Question 5 of 5

If \( SSB = 130 \), \( SSW = 30 \), and \( SST = 160 \), what is the value of \( \eta^2 \) (eta-squared) and how should it be interpreted?