Math ClubMath Club
v1 · padrão canônico

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

F=MSentreMSdentro=SSB/(k1)SSW/(Nk)F = \frac{MS_{\text{entre}}}{MS_{\text{dentro}}} = \frac{SSB/(k-1)}{SSW/(N-k)}
Choose your door

Rigorous notation, full derivation, hypotheses

Rigorous definition

The problem: comparing k means with a single test

Suppose you have k2k \geq 2 independent groups and want to know if the population means μ1,,μk\mu_1, \ldots, \mu_k are equal. Performing (k2)\binom{k}{2} separate tt-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 kk 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

Group 1Ȳ₁ = 75Group 2Ȳ₂ = 110Group 3Ȳ₃ = 140Ȳ

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 FF is the ratio of two independent chi-square variables divided by their respective degrees of freedom... Under the null hypothesis, FF follows an FF distribution with k1k-1 and NkN-k degrees of freedom." — OpenStax Statistics §13.2

Model assumptions

Effect size

Solved examples

Exercise list

42 exercises · 10 with worked solution (25%)

Application 17Understanding 10Modeling 5Challenge 6Proof 4
  1. Ex. 107.1Application

    An experiment compares 3 groups with 10 observations each. Determine dfBdf_B and dfWdf_W.

  2. Ex. 107.2ApplicationAnswer key

    A researcher uses 5 groups with 10 participants each. Determine dfBdf_B and dfWdf_W.

  3. Ex. 107.3Application

    In an experiment with 3 groups, SSB=40SSB = 40 (dfB=2df_B = 2) and SSW=150SSW = 150 (dfW=30df_W = 30). Calculate MSBMS_B and MSWMS_W.

  4. Ex. 107.4ApplicationAnswer key

    From the values in exercise 107.3, calculate the FF statistic.

  5. Ex. 107.5Application

    The value F=4.0F = 4.0 with df=(2,30)df = (2, 30) and α=0.05\alpha = 0.05 (critical 3.32\approx 3.32). What is the correct conclusion?

  6. Ex. 107.6Application

    SST=200SST = 200 and SSB=80SSB = 80. Calculate η2\eta^2 and classify the effect size.

  7. Ex. 107.7Application

    Using the data from exercise 107.6 (SST=200SST = 200, SSB=80SSB = 80), determine SSWSSW.

  8. Ex. 107.8ApplicationAnswer key

    Why, under H0H_0, is it expected that F1F \approx 1? Explain in terms of what MSBMS_B and MSWMS_W estimate.

  9. Ex. 107.9Application

    Three groups with n=15n = 15 each. Group means: 9, 11, and 13. Calculate the grand mean Yˉ\bar{Y}.

  10. Ex. 107.10Application

    Using the data from exercise 107.9, calculate SSBSSB.

  11. Ex. 107.11Understanding

    Why not perform multiple tt-tests to compare 4 groups? Calculate the probability of at least one false positive with α=0.05\alpha = 0.05.

  12. Ex. 107.12Understanding

    List the three assumptions of one-way ANOVA. With n=8n = 8 per group and standard deviations s1=3s_1 = 3, s2=3s_2 = 3, s3=9s_3 = 9, which assumption is most suspect?

  13. Ex. 107.13Understanding

    A study has k=3k = 3 groups with n=8n = 8. Shapiro-Wilk rejects normality in one group (p=0.008p = 0.008). Variance ratio: 9:1. What test to use?

  14. Ex. 107.14UnderstandingAnswer key

    What is Levene's test for before ANOVA? What conclusion to draw from p=0.38p = 0.38?

  15. Ex. 107.15Understanding

    ANOVA rejects H0H_0 in an experiment with 5 groups. What does this mean? What to do next?

  16. Ex. 107.16UnderstandingAnswer key

    Compare Tukey HSD and Bonferroni: which is more conservative? When to use each?

  17. Ex. 107.17Understanding

    For k=2k = 2 groups, how do ANOVA FF and two-sample tt relate? Do p-values coincide?

  18. Ex. 107.18UnderstandingAnswer key

    Describe the shape of the FF distribution with small degrees of freedom. Why is FF never negative?

  19. Ex. 107.19Understanding

    Convert η2=0.09\eta^2 = 0.09 to Cohen's ff and classify the effect size.

  20. Ex. 107.20Understanding

    Why does E[MSW]=σ2E[MS_W] = \sigma^2 even under H1H_1, but E[MSB]>σ2E[MS_B] > \sigma^2 under H1H_1?

  21. Ex. 107.21Application

    Three groups with n=8n = 8 each. Means: 12, 15, and 18. Calculate SSBSSB and MSBMS_B.

  22. Ex. 107.22ApplicationAnswer key

    Continuation of exercise 107.21: SSW=336SSW = 336 and dfW=21df_W = 21. Calculate FF and decide at α=0.05\alpha = 0.05 (critical 3.47\approx 3.47).

  23. Ex. 107.23Application

    Using the data from exercises 107.21–107.22 (SSB=144SSB = 144, SSW=336SSW = 336), calculate η2\eta^2.

  24. Ex. 107.24Application

    4 groups with n=12n = 12 each. SSB=120SSB = 120 and SSW=440SSW = 440. Conduct the complete ANOVA at α=0.05\alpha = 0.05 (critical F3,442.82F_{3,44} \approx 2.82) and calculate η2\eta^2.

  25. Ex. 107.25Application

    Complete the ANOVA table: MSB=12MS_B = 12, MSW=2MS_W = 2. Calculate FF.

  26. 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.

  27. 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.

  28. Ex. 107.28Modeling

    A researcher compares 3 ML algorithms tested on the same 30 datasets. Is it appropriate to use one-way ANOVA? Justify.

  29. Ex. 107.29Modeling

    Five stores have weekly sales monitored for 30 weeks. You want to use ANOVA. Outline: dfBdf_B, dfWdf_W, and if n=30n = 30 is sufficient to detect medium effect (Cohen's f=0.25f = 0.25, 80% power).

  30. 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.

  31. Ex. 107.31Application

    4 diets, 25 people each. Weight loss (kg) — means per diet: 3, 4, 5, and 4.5. Calculate SSBSSB.

  32. Ex. 107.32ApplicationAnswer key

    SST=300SST = 300 and η2=0.5\eta^2 = 0.5. Determine SSBSSB and SSWSSW.

  33. Ex. 107.33ChallengeAnswer key

    Algebraically derive the decomposition SST=SSB+SSWSST = SSB + SSW. Show explicitly why the cross terms cancel when summing over jj for each fixed ii.

  34. Ex. 107.34Challenge

    Show that, for k=2k = 2 balanced groups, the ANOVA FF statistic is equal to the square of the two-sample tt statistic with pooled variance.

  35. Ex. 107.35Challenge

    Argue (without full proof) why, under H0H_0, SSB/σ2χk12SSB/\sigma^2 \sim \chi^2_{k-1} and SSW/σ2χNk2SSW/\sigma^2 \sim \chi^2_{N-k} are independent. How does this imply FFk1,NkF \sim F_{k-1, N-k}?

  36. Ex. 107.36Challenge

    What happens to ANOVA when groups have very different sizes (extreme imbalance)? Is the test still valid?

  37. Ex. 107.37Challenge

    To detect medium effect (f=0.25f = 0.25) between 4 groups at α=0.05\alpha = 0.05 with 80% power, how many subjects per group are needed (approximately)? With n=25n = 25 per group, is the study adequately powered?

  38. Ex. 107.38Challenge

    What is the Bayes factor BF10BF_{10} in Bayesian ANOVA? How to interpret BF10=15BF_{10} = 15 versus BF10=0.08BF_{10} = 0.08?

  39. Ex. 107.39Proof

    Demonstrate that SST=SSB+SSWSST = SSB + SSW, showing that cross terms cancel when summing over jj for each fixed ii.

  40. Ex. 107.40Proof

    Show that E[MSB]=σ2E[MS_B] = \sigma^2 under H0H_0 (for balanced groups, ni=nn_i = n).

  41. Ex. 107.41Proof

    Derive the Kruskal-Wallis test statistic and explain why it is the non-parametric analog of one-way ANOVA.

  42. Ex. 107.42Proof

    Derive the FF^* 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, η2\eta^2 effect size, Welch's ANOVA, Bayesian ANOVA.

Updated on 2025-05-14 · Author(s): Clube da Matemática

Found an error? Open an issue on GitHub or submit a PR — open source forever.