ANOVA/MANOVA
How analysis of variance compares the means of three or more groups, and its multivariate extension MANOVA does so for several outcomes at once, separating real group effects from random scatter.
What it is
Analysis of variance (ANOVA) is a family of tests that compares the means of three or more groups by splitting the total variation in the data into variation between groups and variation within groups. If the group means differ more than random scatter would explain, the between-group variation is large relative to the within-group variation and the test is significant. Developed by Ronald Fisher in the 1920s for agricultural experiments, ANOVA is used wherever several treatments, materials, conditions or populations are compared. MANOVA (multivariate ANOVA) extends it to several related outcome variables measured together.
It answers questions such as: Do three catalysts give different yields? Does the effect of temperature depend on the pressure (an interaction)? Do four teaching methods differ in test scores? Does a treatment shift a combination of several correlated outcomes? Running many t-tests instead would inflate the false-positive rate, which is why ANOVA is used.
Fundamentals
One-way ANOVA
With k groups and N observations in total, the total sum of squares splits as SStotal = SSbetween + SSwithin, where SSbetween = Σ nj (x̄j − x̄)2 and SSwithin = Σ Σ (xij − x̄j)2. Dividing by degrees of freedom gives mean squares: MSbetween = SSbetween/(k − 1) and MSwithin = SSwithin/(N − k). The test statistic is F = MSbetween/MSwithin, compared with the F distribution with (k − 1, N − k) degrees of freedom. The null hypothesis is that all group means are equal, and a small p-value (typically below 0.05) says at least one mean differs, but not which. The model is xij = μ + τj + εij, with εij ~ N(0, σ2). For k = 2, F = t2, so ANOVA agrees with the t-test.
Assumptions and checks
- Independence of observations, ensured by design (randomization).
- Normality of residuals, checked by Q–Q plots or Shapiro–Wilk tests; ANOVA is fairly robust with balanced groups and moderate sample sizes.
- Homogeneity of variances, checked with Levene’s or Bartlett’s test and residual plots; if violated, use Welch’s ANOVA, which does not assume equal variances, or transform the data.
When assumptions fail badly, use the non-parametric Kruskal–Wallis test (see non-parametric tests) or permutation methods.
Post-hoc tests and effect size
A significant F-test is followed by post-hoc comparisons that control the family-wise error rate. Tukey’s HSD compares all pairs, Dunnett’s test compares each treatment with a control, Bonferroni divides α by the number of comparisons m (α/m) and Holm is a less conservative step-down alternative, while Games–Howell handles unequal variances. Planned contrasts test specific hypotheses (for example, mean of A versus the average of B and C). Effect size shows practical importance: η2 = SSbetween/SStotal (about 0.01, 0.06 and 0.14 as conventional small, medium and large) or the less biased ω2. Report group means with confidence intervals, not only p-values.
Factorial, blocked and repeated designs
Two-way (factorial) ANOVA tests two factors A and B and their interaction A × B in the model xijk = μ + αi + βj + (αβ)ij + εijk. An interaction means the effect of one factor depends on the level of the other (non-parallel lines in an interaction plot); when it is significant, main effects should be interpreted with care. Balanced designs have equal cell counts, and unbalanced designs need Type II or III sums of squares. Randomized block designs remove known nuisance variation (such as batch or day) by including a blocking factor. Repeated-measures ANOVA handles the same subjects measured under several conditions, with the assumption of sphericity (checked by Mauchly’s test, corrected by Greenhouse–Geisser). ANCOVA adds a continuous covariate to adjust for baseline differences. Random-factor and nested designs are handled by mixed-effects models (see mixed-effects models).
MANOVA
MANOVA tests whether group mean vectors differ across p dependent variables at once, using matrices: the between-group matrix H and within-group matrix E of sums of squares and cross-products. Test statistics are built from the eigenvalues λi of E−1H: Wilks’ lambda Λ = Π 1/(1 + λi), Pillai’s trace Σ λi/(1 + λi) (the most robust), Hotelling–Lawley trace and Roy’s largest root. Assumptions are multivariate normality, equal covariance matrices across groups (Box’s M test, which is sensitive) and independence, plus enough observations per group (more than the number of outcomes). MANOVA uses the correlations among outcomes and controls the overall error rate; follow-up involves univariate ANOVAs with correction or discriminant analysis (see discriminant analysis) to see which combination separates groups. With only one outcome, MANOVA is ANOVA, and with more outcomes than cases it fails.
Typical applications and limits
Applications include comparing materials or process settings, clinical treatment arms, agricultural field trials and multi-outcome psychological studies. Limits include sensitivity to outliers, unbalanced data, the need for design thinking before analysis, and that a significant result shows difference, not cause: causal claims depend on randomization.
Basic operation
- State the question and design. Identify factors, levels, outcome(s) and how units were assigned.
- Explore the data. Plot group distributions and check for outliers and missing data.
- Fit the model. Run one-way, factorial, blocked or repeated-measures ANOVA, or MANOVA for several outcomes.
- Check assumptions. Inspect residuals, test variance equality and consider transformations or Welch’s test.
- Read the F-tests. Examine main effects and interactions with p-values.
- Run post-hoc tests. Use Tukey, Dunnett or Holm for pairwise comparisons.
- Report effect sizes. Give means, confidence intervals and η2 or ω2.
- Collect the output. You obtain an ANOVA table and group comparisons; interaction plots and unbalanced designs are covered in the video.
Good practice
- Randomize and replicate. Design drives validity more than analysis.
- Check assumptions with plots. Do not rely only on formal tests.
- Do not run many t-tests. Use ANOVA with post-hoc correction.
- Interpret interactions first. They change how main effects read.
- Report effect sizes and intervals. Significance alone is not importance.
- Be honest about analysis choices. Specify tests in advance, report all comparisons run, and avoid dropping groups or outcomes until results turn significant.
Key terms
- F-statistic — the ratio of between-group to within-group variance estimates.
- Interaction — an effect of one factor that depends on the level of another.
- Post-hoc test — a pairwise comparison after a significant overall test.
- Effect size (η2) — the proportion of total variance explained by the factor.
- Blocking — grouping similar units to remove nuisance variation.
- Sphericity — equal variances of differences between conditions in repeated measures.
- Wilks’ lambda — a MANOVA test statistic for differences in mean vectors.
Video coming soon
About five minutes on ANOVA/MANOVA: how it works in detail, how the data is acquired, and how it is analyzed.
More in 3.1 Foundations and Hypothesis Testing
