UK-based online statistics and data analysis support for USA, UK, and international clients. No exams, no impersonation, no fabricated data.
Post Hoc Tests

Main Effects vs Interaction Effects: Formula, Interpretation, SPSS, Python, R and Excel Guide

Factorial ANOVA, Marginal Means, Interaction Plots and Simple Effects Main Effects vs Interaction Effects: Formula, Interpretation, SPSS, Python, R and Excel Guide Main Effects vs Interaction...

Statistics guide Ethical learning support SPSS/R/Python/Excel friendly
Main Effects vs Interaction Effects: Formula, Interpretation, SPSS, Python, R and Excel Guide

Factorial ANOVA, Marginal Means, Interaction Plots and Simple Effects

Main Effects vs Interaction Effects: Formula, Interpretation, SPSS, Python, R and Excel Guide

Main Effects vs Interaction Effects is one of the most important ideas in factorial ANOVA. A main effect tests whether one factor changes the outcome on average. An interaction effect tests whether the effect of one factor depends on the level of another factor. This guide explains Main Effects vs Interaction Effects using a two-way ANOVA example with SPSS output, Python charts, R validation, Excel workflow, formulas, simple effects, profile plots, APA reporting and downloadable resources.

Advertisement
Google AdSense top placement reserved here

Quick Answer: Main Effects vs Interaction Effects Result

The worked example uses a two-way factorial ANOVA with G3 final grade as the dependent variable. The two factors are sex as Factor A and studytime as Factor B. The model tests three questions at the same time: whether sex has an average effect on G3, whether studytime has an average effect on G3, and whether the effect of studytime changes depending on sex.

The most important decision is the interaction. The sex × studytime interaction was not statistically significant, with an interaction p-value around .083. This means the pattern of studytime differences was not strong enough to prove that it changes differently for females and males at α = .05. Because the interaction is not significant, the main effects can be interpreted more directly.

Dependent variableG3
Factor Asex
Factor Bstudytime
Sample size649

Studytime main effectSignificant
Interaction effectNot significant
SPSS model R².083
SPSS adjusted R².073

Final interpretation: Studytime is the clearest effect in this analysis. Average G3 scores increase across studytime levels, especially from the lowest studytime group to the higher studytime groups. The interaction is not significant, so the main studytime effect can be reported directly. The sex main effect is small and method-sensitive, so it should be reported with the exact software and sum-of-squares method used.

Important reporting point: Always check the interaction first. If the interaction is significant, main effects can become misleading because the effect of one factor depends on the other factor. If the interaction is not significant, as in this example, main effects are easier to interpret.

Table of Contents

  1. What Are Main Effects and Interaction Effects?
  2. When to Use Main Effects vs Interaction Effects
  3. Factorial ANOVA Formula
  4. Null and Alternative Hypotheses
  5. Dataset and Variables Used
  6. SPSS Output Interpretation
  7. Python Chart-by-Chart Interpretation
  8. R Chart-by-Chart Validation
  9. SPSS, R, Python and Excel Workflows
  10. Code Blocks for Main Effects vs Interaction Effects
  11. APA Reporting Wording
  12. Common Mistakes
  13. Downloads and Resources
  14. Related Guides
  15. FAQs

What Are Main Effects and Interaction Effects?

A main effect is the average effect of one factor on the dependent variable, ignoring the levels of the other factor. In this example, the main effect of studytime asks whether average G3 differs across the four studytime groups after accounting for sex and the two-way design. The main effect of sex asks whether average G3 differs between female and male students after accounting for studytime and the design.

An interaction effect asks whether the effect of one factor depends on another factor. In this example, the interaction asks whether the studytime pattern is different for females and males. If the lines in an interaction profile plot are strongly non-parallel or crossing, that may indicate an interaction. If the lines are roughly parallel, that usually suggests the main effects can be interpreted more directly.

The key rule is simple: interpret the interaction first. A significant interaction changes the meaning of main effects because the average effect may hide different subgroup patterns. A non-significant interaction means there is not enough evidence that the factors combine in a special way, so the analyst can focus more confidently on the main effects.

Simple definition: A main effect is an average difference for one factor. An interaction effect is a changing difference, where the effect of one factor depends on another factor.

Before interpreting main effects and interactions, review factorial ANOVA, t-test vs ANOVA, ANOVA assumptions, p-values, effect size, and eta squared.

When to Use Main Effects vs Interaction Effects

Use Main Effects vs Interaction Effects analysis when a study has at least two categorical independent variables and one continuous dependent variable. A two-way ANOVA is the simplest common example. The model estimates the effect of Factor A, the effect of Factor B, and the combined Factor A × Factor B effect.

Use This Analysis WhenWhy It MattersExample in This Guide
You have two or more factorsA factorial design can test each factor and their combination.Factor A is sex and Factor B is studytime.
The outcome is continuousANOVA compares mean outcomes across groups.G3 final grade is the dependent variable.
You want average factor effectsMain effects show average differences across levels of one factor.Studytime has a clear average effect on G3.
You want to know whether factors combineInteraction effects show whether one factor changes across another factor.The sex × studytime interaction is not significant at α = .05.

Best practice: Do not run separate one-way ANOVAs when a two-factor design is intended. A factorial ANOVA gives a cleaner answer because it tests main effects and the interaction in one model.

Factorial ANOVA Formula for Main Effects vs Interaction Effects

The two-way ANOVA model for this example can be written as:

G3 = μ + Factor A + Factor B + Factor A × Factor B + Error

Using the actual variables, the model is:

G3 = μ + sex + studytime + sex × studytime + Error

The main effect of Factor A tests average differences across levels of Factor A. The main effect of Factor B tests average differences across levels of Factor B. The interaction tests whether the effect of Factor A changes across Factor B, or equivalently, whether the effect of Factor B changes across Factor A.

Model TermQuestion It AnswersInterpretation in This Example
sexAre average G3 scores different between females and males?This effect is small and method-sensitive in the uploaded outputs.
studytimeAre average G3 scores different across studytime groups?This is the clearest significant main effect.
sex × studytimeDoes the studytime effect depend on sex?The interaction is not significant at α = .05.
ErrorHow much variation remains unexplained by the model?SPSS error mean square is approximately 9.676.

Decision rule: For each model term, compare the p-value with α = .05. If p < .05, the term is statistically significant. If p ≥ .05, the term is not statistically significant.

Null and Alternative Hypotheses

Factorial ANOVA has a separate hypothesis for each main effect and for the interaction effect. The interaction hypothesis should be checked before the main-effect interpretation is finalized.

EffectNull HypothesisAlternative HypothesisDecision in This Example
Main effect of sexMean G3 is equal across sex groups.Mean G3 differs across sex groups.Small and method-sensitive; report the exact software/sum-of-squares method.
Main effect of studytimeMean G3 is equal across studytime groups.At least one studytime group mean differs.Significant.
Interaction effectThe studytime pattern is the same across sex groups.The studytime pattern changes across sex groups.Not significant at α = .05.

Decision for this example: The interaction is not significant, so the article focuses on the studytime main effect. Studytime is clearly related to G3, while the sex effect is small and should be reported cautiously because Type-II and Type-III workflows can produce different p-values in an unbalanced design.

Dataset and Variables Used

The worked example uses a student performance dataset. The dependent variable is G3 final grade. Factor A is sex, with female and male groups. Factor B is studytime, with four weekly study-time categories. The model tests whether G3 changes by sex, by studytime, and by the sex × studytime combination.

VariableRoleHow It Is Used
G3Dependent variableThe final grade score being compared across factorial ANOVA cells.
sexFactor ATwo-level factor used to test the sex main effect and the interaction.
studytimeFactor BFour-level factor used to test the studytime main effect and the interaction.
sex × studytimeInteraction termTests whether the studytime pattern differs between female and male students.

Cell Means Used in the Factorial Design

SexStudytimeNMean G3Std. DeviationInterpretation
Female< 2 hours8911.192.969Lowest female studytime cell.
Female2 to 5 hours19812.203.224Higher than the lowest female studytime group.
Female5 to 10 hours7513.122.610High female studytime cell.
Female> 10 hours2114.192.874Highest female cell mean.
Male< 2 hours12310.593.377Lowest male studytime cell.
Male2 to 5 hours10711.903.285Middle male studytime cell.
Male5 to 10 hours2213.592.108Highest male cell mean.
Male> 10 hours1411.362.499Smallest cell; lower than expected from the female pattern.

Before interpreting this two-way ANOVA, review the cell counts and distribution shapes. Helpful related guides include descriptive statistics, box plot interpretation, Levene test, and ANOVA in SPSS.

Advertisement
Google AdSense middle placement reserved here

SPSS Output Interpretation for Main Effects vs Interaction Effects

The SPSS output provides the official factorial ANOVA table, cell counts, cell descriptives, Levene test, tests of between-subjects effects and simple-effects context. The model is G3 = sex + studytime + sex × studytime.

SPSS Cell Counts

Studytime GroupFemale NMale NTotal NBalance Interpretation
< 2 hours89123212Large enough in both sex groups.
2 to 5 hours198107305Largest studytime level overall.
5 to 10 hours752297Unbalanced between sex groups.
> 10 hours211435Smallest studytime level; interpret cell means carefully.

SPSS Levene Test

Levene VersionStatisticdf1df2p-valueInterpretation
Based on mean0.7197641.656Not significant; no strong equal-variance warning.
Based on median0.7337641.644Also supports the variance assumption.
Based on trimmed mean0.7207641.656No strong variance problem indicated.

SPSS Tests of Between-Subjects Effects

SourceType III SSdfMean SquareFSig.Partial Eta SquaredDecision
Corrected Model560.961780.1378.282< .001.083The overall factorial ANOVA model is significant.
sex50.217150.2175.190.023.008Small significant effect in SPSS Type III output.
studytime382.9803127.66013.193< .001.058Significant main effect.
sex × studytime64.815321.6052.233.083.010Not significant.
Error6202.3066419.676Residual variation after model terms.

Type-II vs Type-III Reporting Note

The uploaded outputs show an important teaching point. In an unbalanced factorial design, the p-value for a main effect can depend on the sum-of-squares method and software workflow. The studytime main effect and the interaction conclusion are stable across the uploaded outputs. The sex main effect is smaller and more sensitive, so it should be reported with the exact method used.

EffectPython Type-II Style OutputSPSS Type-III OutputPractical Reporting
sexF ≈ 3.211, p ≈ .0736F = 5.190, p = .023Small, method-sensitive effect; report method.
studytimeF ≈ 13.210, p < .001F = 13.193, p < .001Clear significant main effect.
sex × studytimeF ≈ 2.233, p ≈ .083F = 2.233, p = .083Not significant at α = .05.

Simple Effects Context

Simple effects are most important when the interaction is significant or when the analyst has a planned reason to examine subgroup patterns. In this example, studytime differs within females and within males. Sex differs clearly only inside the highest studytime group, but because the overall interaction is not significant at α = .05, these simple-effect results should be treated as supporting context rather than the main headline.

Simple Effect QuestionFp-valueDecision
Does studytime differ within females?8.545< .001Significant.
Does studytime differ within males?6.834< .001Significant.
Does sex differ within studytime group 1?1.786.183Not significant.
Does sex differ within studytime group 2?0.593.442Not significant.
Does sex differ within studytime group 3?0.600.440Not significant.
Does sex differ within studytime group 4?9.029.005Significant, but based on the smallest studytime cell.

SPSS interpretation summary: The overall factorial model is significant, the Levene test does not show a strong variance problem, the studytime main effect is significant, and the sex × studytime interaction is not significant. The practical conclusion is that studytime is the clearest factor associated with G3 in this two-way ANOVA.

Python Chart-by-Chart Interpretation

The Python charts show the full workflow for explaining Main Effects vs Interaction Effects. They begin with an ANOVA report card, then show marginal means, interaction patterns, cell means, balance, simple effects, effect decomposition and cell distributions.

Python Chart 1: Main vs Interaction Effect Report Card

Main Effects vs Interaction Effects report card for factorial ANOVA
Python chart summarizing main effects, interaction effect, p-values and decision priority.

The report card gives the fastest summary of the factorial ANOVA. It shows that studytime is the main significant factor, while the sex × studytime interaction is not significant at α = .05. This means the main studytime effect can be interpreted without making the interaction the central conclusion.

The chart also reinforces the correct interpretation order. Interaction should be checked before main effects because a strong interaction can change the meaning of average differences. Here the interaction does not reach significance, so the main effect of studytime becomes the main story.

Python Chart 2: Main Effect Marginal Means for Factor A

Main effect marginal means for Factor A sex
Python chart showing marginal means for Factor A, sex.

The Factor A marginal means chart compares average G3 between sex groups. Female students have a higher marginal mean than male students in the raw marginal summary. However, this effect is smaller than the studytime effect and is sensitive to the sum-of-squares method used in an unbalanced design.

This chart should therefore be interpreted cautiously. It is useful for showing the average sex difference, but the article should not overstate it. The strongest and most stable result across the analysis is still the studytime main effect.

Python Chart 3: Main Effect Marginal Means for Factor B

Main effect marginal means for Factor B studytime
Python chart showing marginal means for Factor B, studytime.

The Factor B marginal means chart shows the clearest pattern. The lowest studytime group has the lowest mean G3 score, while the higher studytime groups have higher means. Studytime group 3 has the highest average, and group 4 is also high but has a smaller sample size.

This chart supports the significant main effect of studytime. It shows that average G3 changes across studytime levels, even after the factorial design is considered.

Python Chart 4: Interaction Profile Plot

Interaction profile plot for sex by studytime on G3
Python interaction plot showing G3 cell means by sex and studytime.

The interaction profile plot is the most important chart for judging whether the factors combine. The female and male lines show broadly similar improvement across studytime, although the highest studytime cell differs visually. Because the interaction p-value is around .083, this visual difference is not strong enough to declare a significant interaction at α = .05.

The plot should be reported carefully. It suggests a possible pattern worth noticing, especially in the highest studytime cell, but the statistical test does not support a firm interaction conclusion.

Python Chart 5: Interaction Cell Mean Heatmap

Interaction cell mean heatmap for sex by studytime
Python heatmap showing cell means for each sex × studytime combination.

The cell mean heatmap shows the average G3 score in each factorial cell. The highest female cell is the female group with more than 10 hours of studytime. The male group with 5 to 10 hours also has a high mean, while the male group with more than 10 hours is lower.

This cell pattern explains why the interaction plot has some non-parallel behavior. However, the heatmap must be read with the balance map because some cells are small, especially the highest studytime cells.

Python Chart 6: Cell Size Balance Map

Cell size balance map for factorial ANOVA
Python chart showing sample size balance across sex × studytime cells.

The balance map shows that the factorial design is not perfectly balanced. The 2 to 5 hours group has many cases, while the highest studytime cells have far fewer cases. This matters because small cells can make cell means less stable and can affect the interpretation of interaction patterns.

This chart explains why the sex main effect can be method-sensitive across Type-II and Type-III output. In unbalanced factorial ANOVA, the analyst must report the method clearly and should avoid exaggerated conclusions based on small cells.

Python Chart 7: Simple Effects p-values

Simple effects p-values for factorial ANOVA
Python chart showing simple effects p-values for studytime within sex and sex within studytime.

The simple effects chart shows that studytime differs within females and within males. It also shows that sex differences are not significant within the first three studytime groups but are significant within the highest studytime group.

Because the overall interaction is not significant, these simple effects should be treated as supporting detail rather than the central conclusion. The main report should prioritize the studytime main effect and describe the simple effects as exploratory or contextual.

Python Chart 8: Effect Decomposition Sum of Squares

Effect decomposition sum of squares for main effects and interaction
Python chart decomposing model variation into main effects, interaction and residual error.

The effect decomposition chart shows how much variation is associated with each model term. Studytime accounts for more model sum of squares than sex or the interaction. The residual error remains the largest part of total variation because student performance depends on many variables beyond sex and studytime.

This chart is useful for effect-size interpretation. A statistically significant effect can still explain a modest portion of total variation, so the article should report both p-values and practical size.

Python Chart 9: Distribution by Interaction Cell

Distribution by interaction cell for sex and studytime
Python chart showing G3 distributions within each sex × studytime cell.

The distribution-by-cell chart shows the spread of G3 scores inside each factorial cell. It confirms that some cells have more spread and some cells have fewer observations. These distribution differences help explain why visual cell means should not be interpreted alone.

The chart supports a balanced conclusion: studytime has a clear average relationship with G3, but cell-level interaction claims require caution because the interaction test is not significant and some cells are small.

R Chart-by-Chart Validation

The R charts validate the same interpretation using a separate workflow. They confirm the studytime main effect pattern, the non-significant interaction conclusion, the cell mean structure, the balance issue and the need to report factorial ANOVA results carefully.

R Chart 1: Main vs Interaction Effect Report Card

R main effects vs interaction effects report card
R validation chart summarizing factorial ANOVA effects and decisions.

The R report card confirms that the interaction is not significant at α = .05. This keeps the interpretation focused on main effects rather than forcing a simple-effects-only explanation.

The chart also shows the same broad conclusion that studytime is an important factor. This supports the Python and SPSS interpretation.

R Chart 2: Main Effect Marginal Means for Factor A

R main effect marginal means for Factor A
R chart showing marginal means for sex.

The R Factor A chart shows that female students have a higher average G3 than male students in the marginal summary. This is consistent with the SPSS Type-III direction of the sex effect.

Because the sex effect is smaller and method-sensitive, the article should report it carefully. The practical difference is not as central as the studytime difference.

R Chart 3: Main Effect Marginal Means for Factor B

R main effect marginal means for Factor B
R chart showing marginal means for studytime.

The R Factor B chart confirms the main studytime pattern. Mean G3 is lowest in the lowest studytime group and higher in groups 2, 3 and 4.

This chart validates the main conclusion that studytime is the clearest factor in the factorial ANOVA model.

R Chart 4: Interaction Profile Plot

R interaction profile plot for sex by studytime
R interaction profile plot showing G3 means across studytime levels by sex.

The R interaction profile plot confirms the same visual pattern as Python. The lines are not perfectly parallel, but the overall interaction test does not reach statistical significance.

This reinforces the correct reporting: mention the observed profile pattern, but do not claim a statistically significant interaction.

R Chart 5: Interaction Cell Mean Heatmap

R interaction cell mean heatmap
R heatmap showing mean G3 across sex × studytime cells.

The R heatmap validates the cell mean pattern. The highest female studytime cell has a high mean, and the male high-studytime cell is lower than the female high-studytime cell.

This cell-level view helps explain why simple effects can appear interesting even when the overall interaction is not significant. It should be used as context, not as the main conclusion.

R Chart 6: Cell Size Balance Map

R cell size balance map
R validation chart showing cell-size balance in the factorial ANOVA design.

The R balance map confirms that the design is unbalanced. Some sex × studytime combinations have many cases, while others have small sample sizes.

This is important for interpretation because unbalanced designs make the choice of sums of squares more visible. It also warns against overinterpreting small cells.

R Chart 7: Simple Effects p-values

R simple effects p-values chart
R chart showing simple effects p-values for sex and studytime slices.

The R simple effects chart confirms that studytime differs within each sex group. It also confirms that sex differs clearly only within the highest studytime group.

Since the interaction is not significant, these simple effects should be interpreted as supporting or exploratory detail. The main report should stay focused on the main studytime effect.

R Chart 8: Effect Decomposition Sum of Squares

R effect decomposition sum of squares chart
R chart showing how model sum of squares is divided across main effects, interaction and error.

The R effect decomposition chart validates that studytime contributes more model variation than the interaction. The residual error remains large, which is normal in real student performance data.

This chart supports a practical interpretation. Statistical significance does not mean a factor explains all performance differences; it means the average group differences are unlikely to be due to random sampling alone.

R Chart 9: Distribution by Interaction Cell

R distribution by interaction cell chart
R validation chart showing G3 distributions across each sex × studytime cell.

The R distribution chart confirms that the cell-level patterns include both mean differences and spread differences. Some cells are concentrated, while others include wider grade ranges.

This visual validation helps readers understand why factorial ANOVA should be interpreted with both tables and plots. Main effects, interactions, simple effects and distributions all answer different parts of the same question.

Advertisement
Google AdSense in-content placement reserved here

SPSS, R, Python and Excel Workflows for Main Effects vs Interaction Effects

The same factorial ANOVA workflow can be completed in SPSS, R, Python and Excel. SPSS gives a clear menu-based output for Type-III tests and profile plots. R and Python are better for reproducible reports and custom visualizations. Excel can run a two-factor ANOVA workflow, but it is less flexible for simple effects and publication-ready charts.

SPSS Workflow

StepSPSS ActionPurpose
Open dataFile > Open > DataLoad the cleaned dataset containing G3, sex and studytime.
Run factorial ANOVAAnalyze > General Linear Model > UnivariateSet G3 as dependent variable and sex/studytime as fixed factors.
Add model termsFull factorial modelEstimate sex, studytime and sex × studytime.
Request plotsPlots > studytime on horizontal axis and sex as separate linesCreate the interaction profile plot.
Request effect sizesOptions > Estimates of effect sizeReport partial eta squared.
Interpret outputCheck Levene test, Tests of Between-Subjects Effects and profile plotDecide main effects and interaction effects.

R Workflow

StepR ActionPurpose
Read dataread.csv()Import the dataset.
Set factorsfactor(sex) and factor(studytime)Make sure variables are categorical.
Fit modelaov(G3 ~ sex * studytime)Estimate main effects and the interaction.
Check resultssummary(model)Read F statistics and p-values.
Plot interactioninteraction.plot() or ggplot2Visualize whether lines are parallel or changing.

Python Workflow

StepPython ActionPurpose
Read datapandas.read_csv()Load G3, sex and studytime variables.
Fit modelols("G3 ~ C(sex) * C(studytime)")Estimate the factorial ANOVA model.
ANOVA tablesm.stats.anova_lm()Get sums of squares, F statistics and p-values.
Summarize cellsgroupby(["sex","studytime"])Calculate cell means, standard errors and confidence intervals.
Plot resultsmatplotlibCreate marginal means, interaction plot and heatmap.

Excel Workflow

Excel can run a two-factor ANOVA through the Analysis ToolPak when the data are arranged properly. Excel is helpful for learning the logic of main effects and interactions, but SPSS, R or Python is better for unbalanced designs, simple effects and advanced plots.

Excel ItemFormula or ActionPurpose
Cell mean=AVERAGEIFS(G3_range, sex_range, sex_level, studytime_range, studytime_level)Calculate each sex × studytime mean.
Cell count=COUNTIFS(sex_range, sex_level, studytime_range, studytime_level)Check balance across cells.
Marginal mean=AVERAGEIF(factor_range, factor_level, G3_range)Calculate main-effect means.
Two-factor ANOVAData > Data Analysis > ANOVA: Two-FactorEstimate main effects and interaction when the layout is suitable.
Profile plotLine chart of cell meansVisualize interaction patterns.

Code Blocks for Main Effects vs Interaction Effects

SPSS Syntax

UNIANOVA G3 BY sex studytime
  /METHOD = SSTYPE(3)
  /INTERCEPT = INCLUDE
  /PLOT = PROFILE(studytime*sex)
  /PRINT = DESCRIPTIVE ETASQ HOMOGENEITY
  /CRITERIA = ALPHA(.05)
  /DESIGN = sex studytime sex*studytime.

R Code

data <- read.csv("dataset.csv")

data$sex <- factor(data$sex)
data$studytime <- factor(data$studytime)

model <- aov(G3 ~ sex * studytime, data = data)
summary(model)

# Cell means

aggregate(G3 ~ sex + studytime, data = data, function(x) {
c(n = length(x), mean = mean(x), sd = sd(x))
})

# Interaction plot

interaction.plot(
x.factor = data$studytime,
trace.factor = data$sex,
response = data$G3,
fun = mean,
xlab = "Studytime",
ylab = "Mean G3",
trace.label = "Sex"
)

Python Code

import pandas as pd
import statsmodels.api as sm
import statsmodels.formula.api as smf

df = pd.read_csv("dataset.csv")

df["sex"] = df["sex"].astype("category")
df["studytime"] = df["studytime"].astype("category")

# Two-way / factorial ANOVA model

model = smf.ols("G3 ~ C(sex) * C(studytime)", data=df).fit()

# ANOVA table

anova_table = sm.stats.anova_lm(model, typ=2)
print(anova_table)

# Cell means

cell_summary = (
df.groupby(["sex", "studytime"])["G3"]
.agg(["count", "mean", "std"])
.reset_index()
)

print(cell_summary)

# Main effect marginal means

sex_means = df.groupby("sex")["G3"].agg(["count", "mean", "std"])
studytime_means = df.groupby("studytime")["G3"].agg(["count", "mean", "std"])

print(sex_means)
print(studytime_means)

Excel Formula Pattern

Cell Mean:
=AVERAGEIFS(G3_range, sex_range, "F", studytime_range, 1)

Cell Count:
=COUNTIFS(sex_range, "F", studytime_range, 1)

Main Effect Mean for Sex:
=AVERAGEIF(sex_range, "F", G3_range)

Main Effect Mean for Studytime:
=AVERAGEIF(studytime_range, 1, G3_range)

Interaction Plot:
Create a table of sex × studytime cell means.
Use studytime on the horizontal axis.
Use separate lines for female and male groups.

Interpretation:
Parallel lines = weak or no interaction.
Non-parallel or crossing lines = possible interaction.

APA Reporting Wording for Main Effects vs Interaction Effects

A two-way factorial ANOVA was conducted to examine the effects of sex and studytime on G3 final grade. The interaction between sex and studytime was not statistically significant, F(3, 641) = 2.233, p = .083, partial η² = .010, indicating that the studytime pattern did not differ significantly by sex at α = .05.

The main effect of studytime was statistically significant, F(3, 641) = 13.193, p < .001, partial η² = .058, showing that average G3 differed across studytime groups. The lowest studytime group had the lowest mean G3 score, while the higher studytime groups had higher means. The main effect of sex was small and should be reported with the selected sum-of-squares method; in the SPSS Type-III output, the sex effect was significant, F(1, 641) = 5.190, p = .023, partial η² = .008.

Short APA version: A two-way ANOVA showed a significant main effect of studytime on G3, F(3, 641) = 13.193, p < .001, partial η² = .058. The sex × studytime interaction was not significant, F(3, 641) = 2.233, p = .083, partial η² = .010. Therefore, the studytime main effect was interpreted directly.

Common Mistakes in Main Effects vs Interaction Effects

MistakeWhy It Is a ProblemBetter Practice
Interpreting main effects before checking interactionA significant interaction can make average main effects misleading.Check and report the interaction first.
Calling a visual crossing a significant interactionA chart pattern still needs statistical support.Use the interaction p-value and effect size.
Ignoring cell sizesSmall cells can make cell means unstable.Report a balance map or cell-count table.
Forgetting sums-of-squares methodUnbalanced factorial ANOVA can give different main-effect p-values.Report Type II or Type III clearly.
Overusing simple effects when interaction is not significantSimple effects can distract from the main result.Use simple effects mainly as context unless they were planned.

Most important warning: Do not say the interaction is significant just because the profile plot is not perfectly parallel. In this example, the interaction p-value is about .083, so the correct α = .05 decision is not significant.

Downloads and Resources

Use the following downloadable outputs to verify the Main Effects vs Interaction Effects result and compare the SPSS, Python and R workflows.

FAQs About Main Effects vs Interaction Effects

What is a main effect?

A main effect is the average effect of one factor on the dependent variable, ignoring or averaging over the levels of the other factor.

What is an interaction effect?

An interaction effect occurs when the effect of one factor depends on the level of another factor.

Which should be interpreted first, main effect or interaction effect?

The interaction effect should be checked first. If the interaction is significant, main effects may be misleading unless they are explained with the interaction pattern.

What was the interaction result in this example?

The sex × studytime interaction was not statistically significant at α = .05, with p around .083.

What was the strongest main effect in this example?

The studytime main effect was the clearest and most stable result. Average G3 scores differed across studytime groups.

Why can software give different main effect p-values?

In unbalanced factorial ANOVA, Type-II and Type-III sums of squares can produce different p-values for some main effects. The analyst should report the method used.

What is a profile plot?

A profile plot is an interaction plot that shows cell means across one factor with separate lines for another factor. Non-parallel lines suggest a possible interaction.

Can this analysis be done in Excel?

Yes, Excel can run a two-factor ANOVA through the Analysis ToolPak when the data are arranged correctly, but SPSS, R or Python is better for unbalanced designs and interaction plots.

Need help applying this to your own data?

Salar Cafe can help interpret output, clean datasets, review assumptions, build dashboards and explain statistical results ethically.

Need help interpreting your data analysis results?

Contact Salar Cafe
Engr. Muhammad Yar Saqib author profile photo

Engr. Muhammad Yar Saqib

WhatsApp Get Data Analysis Help