Lesson 107 — One-way ANOVA
Analysis of variance (one-way ANOVA): SST = SSB + SSW decomposition, F-statistic, ANOVA table, assumption checking, Tukey post-hoc, eta² effect size.
Used in: 3.º ano EM — Estatística Inferencial · Stochastik LK alemão · H2 Math singapurense (estatística) · Math B japonês
Rigorous notation, full derivation, hypotheses
Rigorous definition
The problem: comparing k means with a single test
Suppose you have independent groups and want to know if the population means are equal. Performing separate -tests inflates the Type I error rate. ANOVA solves this with a single global test.
"In a one-way analysis of variance problem, we are interested in comparing the means of populations. If the means are all equal, we say the treatments, or factor levels, are not different from one another. If at least one mean differs, we say the treatments are different." — OpenStax Statistics §13.1
Total variance decomposition
Three groups with distinct means. Colored dashed lines = group mean (). Gray dotted line = grand mean (). SSB measures how far colored means deviate from the gray one; SSW measures the dispersion of points around their own group means.
F-statistic and ANOVA table
"The one-way ANOVA test statistic is the ratio of two independent chi-square variables divided by their respective degrees of freedom... Under the null hypothesis, follows an distribution with and degrees of freedom." — OpenStax Statistics §13.2
Model assumptions
Effect size
Solved examples
Exercise list
42 exercises · 10 with worked solution (25%)
- Ex. 107.1Application
An experiment compares 3 groups with 10 observations each. Determine and .
- Ex. 107.2ApplicationAnswer key
A researcher uses 5 groups with 10 participants each. Determine and .
- Ex. 107.3Application
In an experiment with 3 groups, () and (). Calculate and .
- Ex. 107.4ApplicationAnswer key
From the values in exercise 107.3, calculate the statistic.
- Ex. 107.5Application
The value with and (critical ). What is the correct conclusion?
- Ex. 107.6Application
and . Calculate and classify the effect size.
- Ex. 107.7Application
Using the data from exercise 107.6 (, ), determine .
- Ex. 107.8ApplicationAnswer key
Why, under , is it expected that ? Explain in terms of what and estimate.
- Ex. 107.9Application
Three groups with each. Group means: 9, 11, and 13. Calculate the grand mean .
- Ex. 107.10Application
Using the data from exercise 107.9, calculate .
- Ex. 107.11Understanding
Why not perform multiple -tests to compare 4 groups? Calculate the probability of at least one false positive with .
- Ex. 107.12Understanding
List the three assumptions of one-way ANOVA. With per group and standard deviations , , , which assumption is most suspect?
- Ex. 107.13Understanding
A study has groups with . Shapiro-Wilk rejects normality in one group (). Variance ratio: 9:1. What test to use?
- Ex. 107.14UnderstandingAnswer key
What is Levene's test for before ANOVA? What conclusion to draw from ?
- Ex. 107.15Understanding
ANOVA rejects in an experiment with 5 groups. What does this mean? What to do next?
- Ex. 107.16UnderstandingAnswer key
Compare Tukey HSD and Bonferroni: which is more conservative? When to use each?
- Ex. 107.17Understanding
For groups, how do ANOVA and two-sample relate? Do p-values coincide?
- Ex. 107.18UnderstandingAnswer key
Describe the shape of the distribution with small degrees of freedom. Why is never negative?
- Ex. 107.19Understanding
Convert to Cohen's and classify the effect size.
- Ex. 107.20Understanding
Why does even under , but under ?
- Ex. 107.21Application
Three groups with each. Means: 12, 15, and 18. Calculate and .
- Ex. 107.22ApplicationAnswer key
Continuation of exercise 107.21: and . Calculate and decide at (critical ).
- Ex. 107.23Application
Using the data from exercises 107.21–107.22 (, ), calculate .
- Ex. 107.24Application
4 groups with each. and . Conduct the complete ANOVA at (critical ) and calculate .
- Ex. 107.25Application
Complete the ANOVA table: , . Calculate .
- Ex. 107.26ModelingAnswer key
A teacher wants to compare three teaching methods (A, B, C) with 20 students each, evaluated by test. Formalize the ANOVA model, hypotheses, and necessary assumptions.
- Ex. 107.27Modeling
A clinical study compares 4 weight loss diets with 40 participants each. Describe how to verify ANOVA assumptions before conducting the test.
- Ex. 107.28Modeling
A researcher compares 3 ML algorithms tested on the same 30 datasets. Is it appropriate to use one-way ANOVA? Justify.
- Ex. 107.29Modeling
Five stores have weekly sales monitored for 30 weeks. You want to use ANOVA. Outline: , , and if is sufficient to detect medium effect (Cohen's , 80% power).
- Ex. 107.30Modeling
A chemistry lab compares four catalyst concentrations (0, 5, 10, 20 g/L) on reaction yield, with 10 replications each. Justify the use of one-way ANOVA and list assumptions to verify.
- Ex. 107.31Application
4 diets, 25 people each. Weight loss (kg) — means per diet: 3, 4, 5, and 4.5. Calculate .
- Ex. 107.32ApplicationAnswer key
and . Determine and .
- Ex. 107.33ChallengeAnswer key
Algebraically derive the decomposition . Show explicitly why the cross terms cancel when summing over for each fixed .
- Ex. 107.34Challenge
Show that, for balanced groups, the ANOVA statistic is equal to the square of the two-sample statistic with pooled variance.
- Ex. 107.35Challenge
Argue (without full proof) why, under , and are independent. How does this imply ?
- Ex. 107.36Challenge
What happens to ANOVA when groups have very different sizes (extreme imbalance)? Is the test still valid?
- Ex. 107.37Challenge
To detect medium effect () between 4 groups at with 80% power, how many subjects per group are needed (approximately)? With per group, is the study adequately powered?
- Ex. 107.38Challenge
What is the Bayes factor in Bayesian ANOVA? How to interpret versus ?
- Ex. 107.39Proof
Demonstrate that , showing that cross terms cancel when summing over for each fixed .
- Ex. 107.40Proof
Show that under (for balanced groups, ).
- Ex. 107.41Proof
Derive the Kruskal-Wallis test statistic and explain why it is the non-parametric analog of one-way ANOVA.
- Ex. 107.42Proof
Derive the statistic of Welch's ANOVA for unequal variances. Explain how denominator degrees of freedom are adjusted.
Sources
-
OpenStax — Statistics — Illowsky, Dean · CC-BY 4.0 · §13.1–13.4. Primary source for this lesson. Model definition, F-statistic, ANOVA table, applied exercises.
-
OpenIntro Statistics (4th ed.) — Diez, Çetinkaya-Rundel, Barr · CC-BY-SA 3.0 · §7.5. Model assumptions, homoscedasticity, Tukey and Bonferroni post-hoc.
-
Learning Statistics with R — Navarro · CC-BY-SA 4.0 · ch. 14. Geometric intuition for F, effect size, Welch's ANOVA, Bayesian ANOVA.