← Back to Blog
Psychology Research Methods

Main Effect vs. Interaction Effect in a 2 × 2 Factorial ANOVA (with SPSS Example)

15 min readBy Dr. Keith Dzirasa
Main effect vs interaction effect in a 2 × 2 factorial ANOVA: four line graphs showing a main effect of A only, a main effect of B only, two main effects with parallel lines and no interaction, and an interaction with non-parallel lines, with definitions of each
Quick answer

In a 2 × 2 factorial ANOVA, a main effect is the overall effect of one independent variable, averaged across the levels of the other: you compare its two marginal means. An interaction effect means the effect of one independent variable depends on the level of the other, so the difference between conditions is not the same at each level (a "difference in differences"). The ANOVA gives three F tests: one for each main effect and one for the A × B interaction. On a graph, parallel lines suggest no interaction and non-parallel lines suggest one. When the interaction is significant, the main effects are qualified by it, and you follow up with simple effects tests: the effect of one factor at each level of the other.

Working on a psychology methods assignment or lab report? Get one-to-one support from a specialist. Get a free quote →

What is a 2 × 2 factorial design?

A factorial design studies two or more independent variables (called factors) at the same time, with every level of one factor combined with every level of the other. The name gives the structure: in a 2 × 2 design there are two factors, each with two levels, which makes four conditions. A 2 × 3 design has two factors with two and three levels (six conditions), and a 2 × 2 × 2 design has three factors (eight conditions).

The analysis is called a two-way ANOVA, and you will also see it described as a factorial ANOVA, a univariate ANOVA (the name of the SPSS procedure) or a between-subjects ANOVA when each participant is in only one condition. Like a one-way ANOVA, it needs a continuous dependent variable, such as a rating scale or a time in seconds, and categorical independent variables (Field, 2024). A clear operational definition of each variable tells readers exactly what the factors and the outcome were.

The big advantage over running two separate one-way studies is that a factorial design answers three questions at once:

  1. Main effect of A: does factor A make a difference, averaging over B?
  2. Main effect of B: does factor B make a difference, averaging over A?
  3. A × B interaction: does the effect of A change depending on the level of B?

Each question has its own F test, so a two-way ANOVA always reports three F tests, plus up to four simple effects tests if the interaction is significant.

Main effect vs interaction effect

Four line graphs comparing main effects and interactions in a 2 × 2 factorial ANOVA: a main effect of A only, where both lines rise by the same amount; a main effect of B only, with two flat lines one above the other; two main effects with parallel lines and no interaction; and an interaction, where the lines are not parallel because the effect of A depends on B
What main effects and interactions look like on a graph. Parallel lines suggest no interaction; non-parallel lines suggest one, which the A × B test confirms or rules out.

Main effect

A main effect is the difference between the levels of one factor averaged across the levels of the other. In a 2 × 2 design, each main effect compares just two numbers, the marginal means: the row or column averages of the four cell means. Because only two means are involved, a significant main effect needs no post hoc test; you simply look at which mean is higher.

Interaction effect

An interaction means the two factors combine in a way you could not predict from the main effects alone: the effect of one factor is different at different levels of the other. A useful way to think of it is as a difference in differences. Work out the effect of A at the first level of B, then at the second level of B. If those two differences are clearly unequal, there is an interaction. With four cell means instead of two, a significant interaction does not tell you which cells differ, which is why it needs follow-up tests.

Main effect and interaction compared
Main effectInteraction (A × B)
QuestionDoes one factor matter, on average?Does the effect of one factor depend on the other?
Means comparedTwo marginal meansAll four cell means
On a line graphLines are higher or lower overall, or slope the same wayLines are not parallel, or they cross
If significantCompare the two means directlyRun simple effects tests

Rohrer and Arslan (2021) add a further caution: an interaction is a vague claim unless you state what pattern you expect, because the same data can show an interaction on one scale of measurement and not on another (for example, raw seconds versus log-transformed times). Write down the specific pattern you predict, such as "clothing slows approach times for men but not for women", before you analyse the data.

Worked example: clothing × customer gender

The example below follows a classic textbook study (Smith & Davis, 2016). Salespeople were randomly assigned to see one of four customers, and the researchers timed, in seconds, how long it took them to approach the customer. The two factors are clothing (casual vs. sloppy) and customer gender (women vs. men), giving four conditions with six salespeople in each (N = 24). The dependent variable is the time to help, so higher numbers mean slower service.

Cell means and marginal means: time to approach the customer (seconds)
CustomerCasual clothesSloppy clothesMarginal mean (gender)
WomenM = 48.17 (SD = 5.31)M = 51.50 (SD = 12.21)M = 49.83 (SD = 9.14)
MenM = 45.67 (SD = 6.89)M = 68.67 (SD = 11.15)M = 57.17 (SD = 14.91)
Marginal mean (clothing)M = 46.92 (SD = 6.01)M = 60.08 (SD = 14.31)M = 53.50 (SD = 12.66)

Before running anything, read the table the way the ANOVA will (our guide to descriptive statistics explains cell means, marginal means and standard deviations):

How to run a two-way ANOVA in SPSS

Set up the data with one row per participant: a column for each factor (for example, Clothing: 1 = casual, 2 = sloppy; Gender: 1 = women, 2 = men) and a column for the dependent variable. Then:

  1. Choose Analyze > General Linear Model > Univariate.
  2. Move the dependent variable (Time to help) into Dependent Variable and both factors into Fixed Factor(s).
  3. Click Options, tick Descriptive statistics, and also tick Estimates of effect size and Homogeneity tests so you get partial eta squared and Levene's test. Click Continue, then OK.
SPSS Analyze menu open at General Linear Model with Univariate highlighted, the procedure used for a two-way ANOVA
Step 1: Analyze > General Linear Model > Univariate.
SPSS Univariate dialog with Time to help in the Dependent Variable box and Clothing and Gender in the Fixed Factor(s) box
Step 2: The dependent variable goes in Dependent Variable; both independent variables go in Fixed Factor(s).
SPSS Univariate Options dialog with the Descriptive statistics box ticked under Display
Step 3: In Options, tick Descriptive statistics (and, for a full write-up, Estimates of effect size and Homogeneity tests).

Reading the output: main effects and the interaction

The Descriptive Statistics table gives the mean, standard deviation and n for each of the four cells and for each marginal total. These are the numbers you report alongside each F test. The bottom "Total, Total" row is the grand mean for all 24 participants, which you do not normally report.

SPSS Descriptive Statistics table for time to help, showing means, standard deviations and n for casual and sloppy clothing by women and men customers, with totals
The Descriptive Statistics table: cell means and marginal means for each factor.

The ANOVA itself is in the Tests of Between-Subjects Effects table. Ignore the Corrected Model and Intercept rows and read the three rows named after your factors:

SPSS Tests of Between-Subjects Effects table for a 2 × 2 ANOVA, showing F = 11.922 and Sig. = .003 for Clothing, F = 3.698 and Sig. = .069 for CustomerSex, and F = 6.649 and Sig. = .018 for the Clothing × CustomerSex interaction, with 20 error degrees of freedom
Tests of Between-Subjects Effects: one row for each main effect and one for the interaction.
The three F tests in the example
EffectF testPartial η²Result
Clothing (main effect)F(1, 20) = 11.92, p = .003.37Significant
Customer gender (main effect)F(1, 20) = 3.70, p = .069.16Not significant
Clothing × gender (interaction)F(1, 20) = 6.65, p = .018.25Significant

Each F has two degrees of freedom: the first comes from the effect's own row (1, because each factor has two levels) and the second from the Error row (20, which is N minus the four cells). Partial eta squared is the effect's sum of squares divided by the effect plus error sums of squares; it is the effect size SPSS reports for ANOVA, and reporting it lets readers compare results across studies (Lakens, 2013).

Interaction plot of mean time to approach the customer: for women, 48.17 seconds with casual clothes and 51.50 with sloppy clothes; for men, 45.67 seconds with casual clothes and 68.67 with sloppy clothes, so the lines are clearly not parallel
The interaction plot: sloppy clothing slowed service a great deal for men but hardly at all for women.

Why the main effects are "qualified"

Taken alone, the clothing main effect says sloppy customers wait longer. The interaction shows that this is true mainly for men: almost all of the 13-second clothing difference in the marginal means comes from the men's cells. When an interaction is significant, describe the main effects as qualified by the interaction and base your conclusions on the simple effects that follow (Field, 2024).

Simple effects tests: following up a significant interaction

A simple effect is the effect of one factor at one level of the other factor. In a 2 × 2 design there are four:

  1. Gender within casual clothing (casual women vs casual men).
  2. Gender within sloppy clothing (sloppy women vs sloppy men).
  3. Clothing within women (casual women vs sloppy women).
  4. Clothing within men (casual men vs sloppy men).

The simplest way to get them in SPSS is to split the file by one factor and rerun the ANOVA with only the other factor. SPSS then runs a separate analysis at each level of the split variable.

Effect of gender within each clothing condition

  1. Choose Data > Split File, select Compare groups, move Clothing into Groups Based on, and click OK.
  2. Rerun Analyze > General Linear Model > Univariate with Gender as the only fixed factor (remove Clothing), keeping Descriptive statistics ticked.
SPSS Split File dialog with Compare groups selected and Clothing in the Groups Based on box
Split the file by clothing to test gender within each clothing condition.
SPSS Univariate dialog with Time to help as the dependent variable and only Gender in the Fixed Factor(s) box
Rerun the Univariate ANOVA with gender as the only factor.
SPSS Tests of Between-Subjects Effects split by clothing: in the casual condition CustomerSex has F = .496 and Sig. = .497; in the sloppy condition CustomerSex has F = 6.468 and Sig. = .029
Output: no gender difference for casually dressed customers, but a difference for sloppily dressed customers.

For casually dressed customers, gender made no difference, F(1, 10) = 0.50, p = .497. For sloppily dressed customers, salespeople approached women faster than men, F(1, 10) = 6.47, p = .029.

Effect of clothing for each gender

  1. Return to Data > Split File and replace Clothing with Gender in Groups Based on.
  2. Rerun the Univariate ANOVA with Clothing as the only fixed factor.
SPSS Split File dialog with Compare groups selected and Gender in the Groups Based on box
Split the file by gender to test clothing within each gender.
SPSS Univariate dialog with Time to help as the dependent variable and only Clothing in the Fixed Factor(s) box
Rerun the Univariate ANOVA with clothing as the only factor.
SPSS Tests of Between-Subjects Effects split by gender: for women Clothing has F = .376 and Sig. = .553; for men Clothing has F = 18.482 and Sig. = .002
Output: clothing made no difference for women but a large difference for men.

For women, clothing made no difference, F(1, 10) = 0.38, p = .553. For men, sloppy clothing slowed service considerably, F(1, 10) = 18.48, p = .002. Each of these simple effects compares just two means, so it is equivalent to an independent-samples t-test on those two cells (F = t²). Remember to switch the split off afterwards (Data > Split File > Analyze all cases) so later analyses use the whole sample.

Two refinements worth knowing

Writing up a 2 × 2 ANOVA in APA style

Report each main effect, then the interaction, then the simple effects, giving F with both degrees of freedom, the exact p value and an effect size, with means and standard deviations either in the text or in a table (American Psychological Association, 2020; Appelbaum et al., 2018). Our guide to reporting statistics in APA 7 covers the formatting rules.

Example results paragraph

A 2 (clothing: casual, sloppy) × 2 (customer gender: women, men) between-subjects ANOVA was conducted on the time salespeople took to approach the customer. There was a significant main effect of clothing, F(1, 20) = 11.92, p = .003, η²ₚ = .37: casually dressed customers were approached faster (M = 46.92 s, SD = 6.01) than sloppily dressed customers (M = 60.08 s, SD = 14.31). The main effect of customer gender was not significant, F(1, 20) = 3.70, p = .069, η²ₚ = .16.

These effects were qualified by a significant clothing × gender interaction, F(1, 20) = 6.65, p = .018, η²ₚ = .25. Simple effects tests showed that clothing affected approach times for men, F(1, 10) = 18.48, p = .002, with sloppily dressed men approached more slowly (M = 68.67, SD = 11.15) than casually dressed men (M = 45.67, SD = 6.89), but not for women, F(1, 10) = 0.38, p = .553. Sloppily dressed women were approached faster than sloppily dressed men, F(1, 10) = 6.47, p = .029, whereas gender made no difference for casually dressed customers, F(1, 10) = 0.50, p = .497.

If the paragraph becomes crowded, put the cell and marginal means in a table and refer to it, keeping the F tests in the text. If the interaction is not significant, report it as such (for example F(1, 20) = 1.20, p = .286) and interpret the main effects directly; no simple effects tests are needed.

Assumptions and sample size

Sample size deserves particular attention. Six participants per cell is fine for a textbook demonstration but far too small for a real study. Brysbaert (2019) shows that many psychology experiments are underpowered, and Sommet et al. (2023) demonstrate that detecting an interaction, especially one where an effect is weaker in one condition rather than reversed, usually requires many more participants than detecting a main effect of the same size. Run a power analysis for the interaction you predict before collecting data; our power analysis calculator is a quick starting point.

Common mistakes with main effects and interactions

Getting help with your research methods course

Factorial ANOVA sits at the centre of most psychology statistics courses, and simple effects are where many students get stuck. If you would like a specialist to check your SPSS setup, talk through your output or give feedback on your APA results section, see our psychology research methods and statistics support. We explain each step so you can apply it yourself.

Frequently asked questions

What is the difference between a main effect and an interaction effect?

A main effect is the overall effect of one independent variable, averaged across the levels of the other. An interaction effect means the effect of one independent variable changes depending on the level of the other, so the difference between conditions is not the same at each level.

How many F tests are there in a 2 × 2 ANOVA?

Three: one for the main effect of each factor and one for the A × B interaction. If the interaction is significant, up to four simple effects tests follow.

How do you know if there is an interaction in a two-way ANOVA?

Look at the A × B row of the Tests of Between-Subjects Effects table in SPSS. If its p value is below .05, the interaction is significant. A line graph of the cell means helps you see it: non-parallel lines suggest an interaction.

What do you do when the interaction is significant?

Treat the main effects as qualified by the interaction and run simple effects tests: the effect of one factor at each level of the other. In SPSS you can split the file by one factor and rerun the ANOVA with the other factor, or use EMMEANS syntax with the pooled error term.

Can you have an interaction without main effects?

Yes. In a crossover interaction the effect of one factor reverses at the two levels of the other, so the marginal means can be equal and neither main effect is significant even though the interaction is.

What are simple effects tests?

They test the effect of one factor at a single level of the other factor, for example the effect of clothing for men only and for women only. They are the follow-up to a significant interaction, much as post hoc tests follow a significant one-way ANOVA.

How do I report a two-way ANOVA in APA style?

Report each main effect and the interaction as F(df effect, df error) = value, p = value, with an effect size such as partial eta squared, and give the means and standard deviations. If the interaction is significant, add the simple effects tests in the same format.

Sources

  1. Field A. Discovering Statistics Using IBM SPSS Statistics. 6th ed. London: Sage; 2024
  2. Sommet N, Weissman DL, Cheutin N, Elliot AJ. How many participants do I need to test an interaction? Conducting an appropriate power analysis and achieving sufficient power to detect an interaction. Adv Methods Pract Psychol Sci 2023;6(3)
  3. Rohrer JM, Arslan RC. Precise answers to vague questions: issues with interactions. Adv Methods Pract Psychol Sci 2021;4(2)
  4. American Psychological Association. Publication Manual of the American Psychological Association. 7th ed. Washington, DC: American Psychological Association; 2020
  5. Brysbaert M. How many participants do we have to include in properly powered experiments? A tutorial of power analysis with reference tables. J Cogn 2019;2(1):16
  6. Appelbaum M, Cooper H, Kline RB, et al. Journal article reporting standards for quantitative research in psychology: the APA Publications and Communications Board task force report. Am Psychol 2018;73:3-25
  7. Lakens D. Calculating and reporting effect sizes to facilitate cumulative science: a practical primer for t-tests and ANOVAs. Front Psychol 2013;4:863
  8. Smith RA, Davis SF. The Psychologist as Detective: An Introduction to Conducting Research in Psychology. Updated ed. Boston, MA: Pearson; 2016
Research Scientist, Psychology · PhD in Psychology, MSc in Research Methods
Keith has 17 years of experience in experimental psychology and cognitive and behavioral research. He brings an experimental research perspective to projects that examine cognition, perception, and behavior. Areas of expertise Experimental and behavioral studies Quantitative research projects and data analysis…
Need help with Psychology Research Methods? See how our specialists can support you.View Service Page →

Need help with your psychology research methods course?

Tell us what you need and a specialist will reply with a free, itemized quote within 2-4 business hours.