Two-way ANOVA is a statistical test used when one numerical dependent variable is compared across groups formed by two categorical independent variables. It helps determine whether each factor changes the mean outcome and whether the factors work together in a special way. This matters in experiments where results may depend on more than one condition, such as teaching method and study time, or fertilizer type and watering level.
Instead of running many separate tests, two-way ANOVA tests the pattern of group means in one organized model.
The key idea is to split the total variation in the data into parts due to Factor A, Factor B, the interaction between A and B, and random error. A main effect asks whether changing one factor changes the average response after averaging over the other factor. An interaction effect asks whether the effect of one factor depends on the level of the other factor, which is often shown by nonparallel lines on an interaction plot.
When interpreting results, the interaction should be considered first because it can change the meaning of the main effects.
Key Facts
- Two-way ANOVA model: Y = grand mean + effect of A + effect of B + interaction AB + error.
- Main effect of Factor A tests whether the means differ across levels of A after averaging over Factor B.
- Main effect of Factor B tests whether the means differ across levels of B after averaging over Factor A.
- Interaction effect tests whether the effect of Factor A changes across levels of Factor B.
- F statistic: F = MS factor / MS error, where MS = SS / df.
- Nonparallel lines in an interaction plot suggest an interaction; crossing lines suggest a strong interaction.
Vocabulary
- Two-way ANOVA
- A statistical test that compares group means using two categorical independent variables and one numerical dependent variable.
- Main effect
- The average effect of one factor on the dependent variable while ignoring or averaging over the other factor.
- Interaction effect
- A pattern where the effect of one factor depends on the level of another factor.
- Factor
- A categorical independent variable whose levels define groups in an experiment or study.
- Interaction plot
- A graph of group means that helps show whether two factors have separate or combined effects on a response variable.
Common Mistakes to Avoid
- Ignoring the interaction term before interpreting main effects is wrong because a significant interaction can mean the main effects are misleading when averaged over the other factor.
- Treating the dependent variable as categorical is wrong because ANOVA requires a numerical response variable whose means can be compared.
- Assuming nonparallel lines prove significance is wrong because an interaction plot shows a visual pattern, but the ANOVA F test and p-value determine statistical significance.
- Running many separate t tests instead of a two-way ANOVA is wrong because it increases the chance of false positives and fails to test the interaction between factors.
Practice Questions
- 1 A study compares test scores for 2 teaching methods and 3 study-time groups with 10 students in each cell. How many total observations are in the experiment?
- 2 In a two-way ANOVA, SS_A = 120 with df_A = 2, and SS_error = 300 with df_error = 30. Calculate MS_A, MS_error, and the F statistic for Factor A.
- 3 An interaction plot shows two lines for Factor B that are nearly parallel across all levels of Factor A. Explain what this suggests about the interaction effect and why the main effects may be easier to interpret.