Interaction plot: how to read interactions between factors
An interaction plot shows how the effect of one factor depends on the level of another. It puts one factor on the x-axis, draws a separate line for each level of the second factor, and plots the mean response at each combination. Parallel lines mean no interaction: each factor has the same effect whatever the other does. Lines that diverge or cross mean an interaction: you cannot describe one factor's effect without saying where the other is set.
When to use it
- After a designed experiment, before you trust the main effects plot.
- When the ANOVA or the effects analysis flags a significant two-factor interaction and you need to see what it looks like.
- When you have to choose settings for two factors together, such as current and weld time, temperature and pressure, or speed and feed.
- When a result "works on one line but not the other" and you suspect a factor that behaves differently by line, shift or material.
How it works
For two factors A and B, compute the mean of the response in each A × B cell and draw one line per level of B across the levels of A. With two levels each, there are four cell means, and the interaction effect is half the difference between the effect of A at high B and the effect of A at low B:
AB = [ (ȳ₊₊ − ȳ₋₊) − (ȳ₊₋ − ȳ₋₋) ] / 2Here ȳ₊₋ means A at its high level and B at its low level. If the effect of A is the same at both levels of B, AB = 0 and the lines are parallel.
Three patterns are common:
- Parallel lines: no interaction. Read the main effects.
- Diverging lines (same direction, different slopes): a synergistic interaction. One factor amplifies the other.
- Crossing lines: the best level of one factor depends on the other. The main effects can be close to zero even when both factors matter a great deal.
Like the main effects plot, the interaction plot has no built-in test. Judge whether the gap between slopes is larger than noise with the interaction's p-value from the ANOVA, or with its standard error. With unbalanced or observational data, plot fitted means from a general linear model instead of raw cell means.
Example
This uses the spot welding experiment from the main effects plot article: a 2³ full factorial with two replicates on current (8 or 10 kA), weld time (10 or 16 cycles) and electrode force (2.5 or 3.5 kN), measuring tensile-shear strength (kN). Each cell mean below averages four welds.
Current × weld time:
| 10 cycles | 16 cycles | Effect of time | |
|---|---|---|---|
| 8 kA | 5.323 | 5.353 | 0.030 |
| 10 kA | 6.133 | 7.185 | 1.053 |
AB = (1.053 − 0.030) / 2 = 0.511 kNWith the residual standard deviation of 0.180 kN from the full factorial model (8 degrees of freedom), the standard error of any effect is 0.090 kN, so t = 5.67 and p = 0.0005: a real interaction.
Current × electrode force:
| 2.5 kN | 3.5 kN | Effect of force | |
|---|---|---|---|
| 8 kA | 5.648 | 5.028 | −0.620 |
| 10 kA | 6.870 | 6.448 | −0.423 |
Here the interaction effect is 0.099 kN (p = 0.305): the lines are close to parallel, and the force effect can be read on its own.
How to read the results
- Current and weld time work together. At 8 kA, longer weld time does nothing useful: the nugget does not grow because there is not enough heat. At 10 kA, six more cycles add about 1.05 kN. The main effect of weld time, 0.54 kN, is an average that describes neither case.
- The best setting comes from the cells, not the main effects. High current with long time is the best pair. If you were limited to 8 kA, extending the weld time would only cost cycle time.
- Force acts on its own. Lower force helps by roughly the same amount at both currents, so it can be set independently.
- Swap the axes if it helps. The same interaction drawn with weld time on the x-axis and one line per current gives the same conclusion; choose the view that tells the story most clearly.
- Check three-factor interactions in the ANOVA. Here the three-way interaction is small (p = 0.408), so the two-factor plots tell the whole story.
Common mistakes
- Calling lines non-parallel by eye. Small gaps between slopes are often noise. Look at the interaction's p-value or standard error.
- Reporting main effects when an interaction is significant. Say instead what each factor does at each level of the other.
- Missing a crossing interaction. If two factors cross, both main effects can look negligible. The interaction plot is the only picture that shows it.
- Using raw cell means from unbalanced data. Cells with few observations, or with other factors not balanced, give misleading lines. Use fitted means.
- Reading curvature from two levels. With only two levels per factor, lines are straight by construction. Use more levels or center points to see curvature.
Frequently asked questions
What does an interaction mean in plain words?
That the effect of one factor depends on the level of another. Here, longer weld time helps only when the current is high enough.
What do crossing lines on an interaction plot mean?
That the best level of one factor changes with the level of the other. It is the strongest form of interaction, and it makes main effects alone misleading.
Does an interaction plot show whether the interaction is significant?
No. It shows the pattern. The significance comes from the ANOVA or the effects analysis.
Can I use interaction plots for more than two factors?
Yes, by drawing one plot for each pair of factors, usually as a matrix of panels. A three-factor interaction appears as a two-factor pattern that changes with the level of the third factor.