viewof pattern = html`<select style="font-size:15px;padding:4px 8px">
<option value="A">Main effect of A only</option>
<option value="B">Main effect of B only</option>
<option value="AB">Main effects of A and B, no interaction</option>
<option value="Ai">Main effect of A + interaction</option>
<option value="Bi">Main effect of B + interaction</option>
<option value="ABi" selected>Main effects of A and B + interaction</option>
</select>`Spotting & Visualising Interactions
Info sheet · Statistics for Psychology & Neuroscience
Warning✎ Editing notes — to do / to check
Working notes for the author — not shown to students once collapsed; remove before publishing.
- [ ]
What you’ll get from this sheet
This short sheet introduces a practical way to identify interactions in factorial ANOVAs. Interactions between independent variables are often the most interesting part of an analysis — but they can also be the hardest to interpret. To make things clearer, we’ll use some simple examples with fake data.
The main objective is straightforward: by the end, you should be able to recognise potential interactions between independent variables just by looking at a figure.
Main effects show up as consistent differences in the overall averages. An interaction shows up when the lines are not parallel — when they fan apart or cross.
A simple 2 × 2 design
We’ll start with a two-factor design: Factor A on the x-axis, and Factor B as two lines (blue and green). Pick a pattern below and read the verdict — the plot tells you which effects are present.
Work through the six patterns and you’ll see the rule emerge:
- Main effect of A only — the two lines sit on top of each other (no effect of B), but both slope across A.
- Main effect of B only — the lines are clearly separated (effect of B) but flat (no effect of A).
- Main effects of A and B, no interaction — both factors move the means, but the lines stay parallel — that parallelism is the signature of no interaction.
- Main effect of A + interaction — one line stays flat while the other rises: the effect of A depends on B.
- Main effect of B + interaction — the lines are separated and change differently across A.
- Main effects of A and B + interaction — both main effects are present and the lines aren’t parallel.
Extending to a 3 × 3 design
Add a third level to both factors and you get a 3 × 3 design. The key point: not all levels need to differ for a main effect to exist. Levels 1 and 2 of A might be identical while both differ from level 3 — that’s still a main effect of A. Two of the three B-lines might overlap while the third stands apart — still a main effect of B. And as before, if the lines aren’t parallel, suspect an interaction.
See it in code
The plot above is an interaction plot. Here’s how to draw one from your own factorial data:
score = [80 84 78 62 60 66 70 72 68 85 88 82];
genre = [1 1 1 1 1 1 2 2 2 2 2 2]; % 1 = Drama, 2 = Comedy
rating = [1 1 1 2 2 2 1 1 1 2 2 2]; % 1 = 7+, 2 = 18+
[~,~,~,~,~,means] = anovan(score, {genre, rating}, 'model','interaction');
% or: interactionplot(score, {genre', rating'})Static reference — the R and Python tabs run live in the page.
TipCheck your understanding
A challenge: imagine a 2 × 2 × 2 ANOVA. Sketch what the figures might look like if there were (1) three main effects and no interactions, (2) two main effects and one three-way interaction, (3) one main effect and two two-way interactions.
This is genuinely hard — don’t worry if it feels tricky. Think of it as practice for presenting results in a paper: aim for clarity and simplicity rather than complexity. (Hint: a three-way interaction means the two-way interaction itself changes shape between the two panels of the third factor.)
A line plot is a great first step, not a verdict. Lines that look “not quite parallel” might just be noise — the plot shows sample means with no error bars, so always back up what you see with the formal interaction term in the ANOVA before you claim an interaction is real.
Where this shows up next
See Chapter 8 (ANOVA) for the full factorial treatment — this visual intuition is what you’ll lean on when interpreting a significant interaction term and deciding which simple effects to follow up.