Factorial ANOVA (Two-Way)
Real situations rarely involve just one factor. Does a drug's effect depend on dose and on age? Does a teaching method work differently for beginners than experts? A factorial ANOVA tests two (or more) factors at once and reveals something no single-factor study ever could: the interaction.
Three questions for the price of one
A two-way design with factors A and B answers three separate questions:
- Main effect of A: does A matter, averaging over B?
- Main effect of B: does B matter, averaging over A?
- A × B interaction: does the effect of A depend on the level of B? This is the one you can only get by studying them together.
The interaction plot
The fastest way to read a two-way result is a picture. Put factor A on the x-axis and draw one line for each level of B. The rule is simple: parallel lines mean no interaction (A's effect is the same at every level of B); non-parallel lines mean there's an interaction. Drag the cell means below and watch it happen.
🎮 Interaction Plot Explorer
A 2×2 design. Set the average outcome in each of the four cells; the lines show how factor A's effect changes across the two levels of factor B.
Why interactions are the interesting part
Often the interaction is the finding. "The drug works" is fine; "the drug works for young patients but not old ones" is far more useful — and it's an interaction. A famous trap: reporting only main effects when a strong interaction is present can be downright misleading. If a "crossover" interaction makes A helpful for B₁ but harmful for B₂, the average main effect of A might be zero, hiding two large, opposite real effects. The same idea carries over to continuous predictors, where it goes by the name interactions in regression.
Read the interaction first. When lines are clearly non-parallel, interpret the main effects with caution — the effect of one factor genuinely differs depending on the other, so a single "average" effect can mislead.
Reading the patterns
- Parallel lines — no interaction; both main effects mean what they say.
- Fanning lines (same direction, different slopes) — A helps in both conditions, but more in one.
- Crossing lines — a crossover interaction; A's effect reverses direction across levels of B. The most dramatic and easily-missed pattern.
Why it matters: the world is full of "it depends." Factorial designs are how we test "it depends" rigorously, and interactions are the statistical home of conditional, context-dependent effects.
Problem 15 of the practice problems reads a caffeine × sleep interaction off a 2 × 2 table of cell means, and Problem 26 is the trap above: an abstract that reports the main effect when the interaction is the story. To watch one 2 × 2 study travel from its hypothesis all the way to its APA paragraph, follow the complete worked project.
Common questions
How many participants do I need to detect an interaction?
More than the main effect needed, usually by a lot. An interaction is a difference between differences, so its standard error is larger than that of a plain two-group comparison. Take a study with enough people to detect an effect in one condition: if you now expect that effect to be present at one level of B and absent at the other, detecting the interaction takes roughly four times the total sample. A full crossover, where the effect reverses sign, is far cheaper and costs about the same total as the original two-group study. This is the commonest reason a factorial study reports two clean main effects and an underpowered interaction, so settle the number at design time: power analysis for complex designs works it through.
Can I interpret main effects when there's a significant interaction?
With caution. A main effect is an average across the other factor's levels — and when the effect genuinely differs by level (that's what the interaction says), the average can mislead or even hide two opposite effects (a crossover). Standard practice: interpret the interaction first, usually via simple effects ("A's effect at each level of B"), and only lean on main effects when the interaction is small.
What does a 2×3 factorial design mean?
Two factors: the first with 2 levels, the second with 3, fully crossed into 2 × 3 = 6 cells (every combination is tested). One analysis then yields three tests: the main effect of each factor and their interaction. The notation scales: a 2×2×4 design has three factors and 16 cells.