Factorial ANOVA, Main Effects, Two-Way Interactions and Three-Way Interaction
Three Way ANOVA: Formula, Interpretation, SPSS, Python, R and Excel Guide
Three Way ANOVA is a factorial ANOVA method used when one continuous dependent variable is compared across three categorical factors at the same time. In this worked Salar Cafe example, the dependent variable is G3 final grade, and the three factors are studytime, school and sex. The model shows significant main effects for studytime, school and sex, but the two-way and three-way interactions are not statistically significant.
Google AdSense top placement reserved here
Quick Answer: Three Way ANOVA Result
The worked Three Way ANOVA tests seven model effects: three main effects, three two-way interactions and one three-way interaction. The main effects are studytime, school and sex. The two-way interactions are studytime × school, studytime × sex and school × sex. The final interaction is studytime × school × sex.
The summary table shows that all three main effects are statistically significant. Studytime is significant, F = 9.176, p = 5.978e-06, partial η² = 0.04168. School is significant, F = 49.18, p = 6.001e-12, partial η² = 0.0721. Sex is significant, F = 7.417, p = 0.006639, partial η² = 0.01158.
The interaction tests are not significant. The studytime × school interaction has p = 0.6896, studytime × sex has p = 0.1157, school × sex has p = 0.8101, and the three-way interaction has p = 0.7414. Therefore, the correct interpretation focuses on the main effects, not on a complex three-factor interaction.
Final interpretation: G3 final grade differs by studytime group, school and sex. School has the largest practical effect, studytime has a small but meaningful effect, and sex has a smaller significant effect. The two-way and three-way interactions are not significant, so the evidence does not support a complex interaction pattern among studytime, school and sex.
Important reporting point: In Three Way ANOVA, the three-way interaction is usually checked before over-interpreting lower-order effects. In this output, the three-way interaction is not significant, so the interpretation should stay focused on the significant main effects.
Table of Contents
- What Is Three Way ANOVA?
- Three Way ANOVA Formula
- Three Way ANOVA Hypotheses
- Dataset and Variables Used
- SPSS Output Interpretation
- Python Chart-by-Chart Interpretation
- R Chart-by-Chart Validation
- SPSS, R, Python and Excel Workflows
- Code Blocks for Three Way ANOVA
- APA Reporting Wording
- Common Mistakes
- When to Use Three Way ANOVA
- Downloads and Resources
- Related Guides
- FAQs
What Is Three Way ANOVA?
Three Way ANOVA is a factorial ANOVA test used when a researcher has one numeric dependent variable and three categorical independent variables. It extends One Way ANOVA and Factorial ANOVA by testing not only main effects but also interaction effects among three factors.
In this example, the dependent variable is G3 final grade. The three factors are studytime, school and sex. The model tests whether G3 differs by each factor separately and whether the effect of one factor depends on another factor.
The output shows that the three main effects are significant. Students with different studytime categories have different mean G3 scores. GP and MS schools have different mean G3 scores. Female and male groups also differ in mean G3. However, the interaction effects are not significant, so the model does not support a strong combined interaction among these factors.
Simple definition: Three Way ANOVA checks whether a numeric outcome differs across three factors and whether those factors interact. In this example, it checks how studytime, school and sex relate to G3 final grade.
This guide connects naturally with One Way ANOVA, Factorial ANOVA, Fixed Effects ANOVA, Balanced ANOVA, Brown Forsythe ANOVA, Nested ANOVA, ANOVA Effect Size, Eta Squared, Omega Squared, and F Distribution.
Three Way ANOVA Formula
A full three-way fixed-effects ANOVA model includes main effects, all two-way interactions and the three-way interaction. The model can be written as:
In this example, Y is G3 final grade, A is studytime, B is school, and C is sex. The model includes three main effects, three two-way interactions and one three-way interaction.
F Statistic Formula
Each effect has its own F statistic. A large F statistic means that the effect explains more variation than expected relative to the residual error. In this example, school has the largest F statistic among the main effects, followed by studytime and sex.
Partial Eta Squared Formula
Partial eta squared describes the practical strength of each effect after accounting for the model error term. In this output, school has the largest partial eta squared at 0.0721, studytime has 0.04168, and sex has 0.01158. The interaction effects are very small.
| Effect | df | F | p | Partial η² | Label | Decision |
|---|---|---|---|---|---|---|
| studytime | 3 | 9.176 | 5.978e-06 | 0.04168 | Small | Reject H0 |
| school | 1 | 49.18 | 6.001e-12 | 0.0721 | Medium | Reject H0 |
| sex | 1 | 7.417 | 0.006639 | 0.01158 | Small | Reject H0 |
| studytime × school | 3 | 0.4897 | 0.6896 | 0.002315 | Very small | Fail to reject H0 |
| studytime × sex | 3 | 1.98 | 0.1157 | 0.009298 | Very small | Fail to reject H0 |
| school × sex | 1 | 0.05777 | 0.8101 | 0.00009126 | Very small | Fail to reject H0 |
| studytime × school × sex | 3 | 0.4162 | 0.7414 | 0.001969 | Very small | Fail to reject H0 |
Three Way ANOVA Hypotheses
A Three Way ANOVA has more than one hypothesis. The researcher must test each main effect and each interaction separately. This is why a three-way ANOVA table contains several rows.
| Effect | Null Hypothesis | Alternative Hypothesis | Decision in This Output |
|---|---|---|---|
| studytime | Mean G3 is equal across studytime groups. | At least one studytime group has a different mean G3. | Reject H0. |
| school | Mean G3 is equal for GP and MS schools. | Mean G3 differs by school. | Reject H0. |
| sex | Mean G3 is equal for female and male students. | Mean G3 differs by sex. | Reject H0. |
| Two-way interactions | Each two-factor effect is independent of the third factor. | At least one factor effect depends on another factor. | Fail to reject H0 for all two-way interactions. |
| Three-way interaction | The two-way interaction pattern does not change across the third factor. | The two-way interaction pattern changes across the third factor. | Fail to reject H0. |
Decision for this example: Reject the null hypotheses for the studytime, school and sex main effects. Fail to reject the null hypotheses for the studytime × school, studytime × sex, school × sex and studytime × school × sex interactions.
Dataset and Variables Used
The worked example uses the student performance dataset structure commonly used in Salar Cafe statistical tutorials. The dependent variable is G3 final grade. The three categorical factors are studytime, school and sex.
| Variable | Role | Levels | Why It Matters |
|---|---|---|---|
| G3 | Dependent variable | Numeric final grade | The outcome whose means are compared. |
| studytime | Factor A | 1, 2, 3, 4 | Tests whether final grade differs by studytime category. |
| school | Factor B | GP, MS | Tests whether final grade differs by school. |
| sex | Factor C | F, M | Tests whether final grade differs by sex. |
Main Effect Mean Pattern
| Factor | Visual Mean Pattern | Interpretation |
|---|---|---|
| studytime | Group 1 is lowest, groups 3 and 4 are highest. | Higher studytime levels are associated with higher mean G3. |
| school | GP is clearly higher than MS. | School is the strongest practical factor in this output. |
| sex | Female mean is higher than male mean. | Sex has a statistically significant but smaller effect. |
For supporting concepts, review Descriptive Statistics, Mean Median and Mode, Standard Deviation, Variance, Confidence Interval, P Value and Null and Alternative Hypothesis.
Google AdSense middle placement reserved here
SPSS Output Interpretation for Three Way ANOVA
The SPSS output for Three Way ANOVA should be read in a fixed order. First confirm the dependent variable and factors. Then review descriptive statistics and cell sizes. After that, read the tests of between-subject effects. Finally, check assumptions and residual diagnostics before writing the final interpretation.
SPSS Reading Order
| SPSS Output Area | What to Read | Why It Matters |
|---|---|---|
| Between-subject factors | studytime, school and sex. | Confirms the three independent variables. |
| Descriptive statistics | Mean G3 for each studytime × school × sex cell. | Shows the pattern behind main effects and interactions. |
| Tests of between-subject effects | Main effects, two-way interactions and three-way interaction. | Main ANOVA decision table. |
| Effect size | Partial eta squared values. | Shows practical strength of each effect. |
| Homogeneity checks | Levene or related variance checks. | Assumption context for ANOVA interpretation. |
| Residual diagnostics | Residuals versus fitted and Q-Q plot. | Checks model fit and residual normality context. |
SPSS Result Summary
| Effect | Decision | Plain Interpretation |
|---|---|---|
| studytime | Significant | Mean G3 differs across studytime categories. |
| school | Significant | Mean G3 differs between GP and MS schools. |
| sex | Significant | Mean G3 differs between female and male groups. |
| studytime × school | Not significant | The studytime effect is not clearly different across schools. |
| studytime × sex | Not significant | The studytime effect is not clearly different across sex groups. |
| school × sex | Not significant | The school difference is not clearly different by sex. |
| studytime × school × sex | Not significant | The two-way interaction pattern does not clearly change across the third factor. |
SPSS interpretation summary: The model supports significant main effects for studytime, school and sex. The largest practical effect is school, followed by studytime and sex. All interaction terms are non-significant, including the three-way interaction, so the final report should emphasize main effects rather than complex interaction interpretation.
Python Chart-by-Chart Interpretation
The Python chart sequence explains Three Way ANOVA through effect sizes, p-values, main effect means, interaction profiles, three-way cell means and residual diagnostics.
Python Chart 1: Three Way ANOVA Effect Sizes

The effect-size chart shows that school is the strongest practical effect with partial eta squared about 0.072. Studytime follows with about 0.042, and sex has a smaller effect of about 0.012.
The interaction effect sizes are very small. Studytime × sex is about 0.009, studytime × school is about 0.002, the three-way interaction is about 0.002, and school × sex is nearly zero. This supports a main-effects interpretation.
Python Chart 2: p-values by Effect

The p-value chart shows that studytime, school and sex are below alpha = .05. These are statistically significant main effects.
The interaction p-values are above alpha = .05. This means the two-way interactions and the three-way interaction are not statistically supported in this model.
Python Chart 3: Main Effect Mean Plot for Studytime

The studytime mean chart shows a clear upward pattern. Studytime group 1 has the lowest mean G3, group 2 is higher, and groups 3 and 4 are in the highest range.
This visual pattern explains why the studytime main effect is significant. The effect is not the largest in the model, but it is meaningful enough to report as a small main effect.
Python Chart 4: Main Effect Mean Plot for School

The school mean chart shows that GP has a higher mean G3 than MS. The separation is visually clear, and the confidence intervals are well apart.
This matches the summary table where school has the largest F statistic and the largest partial eta squared. School is the strongest practical factor in this Three Way ANOVA result.
Python Chart 5: Main Effect Mean Plot for Sex

The sex mean chart shows that the female group has a higher mean G3 than the male group. The difference is smaller than the school effect but still statistically significant.
This supports a careful interpretation: sex has a significant main effect, but its practical size is small compared with school and studytime.
Python Chart 6: Two-Way Interaction Profile

The interaction profile shows that GP is higher than MS across the studytime levels. Both school lines increase toward studytime level 3 and then slightly decline or flatten at level 4.
The lines are not perfectly parallel, but the formal studytime × school interaction is not significant. Therefore, the plot should be used descriptively, not as proof of an interaction.
Python Chart 7: Three-Way Cell Means

The three-way cell mean chart shows every factor combination. The highest cells are generally connected with higher studytime, GP school and female group combinations, while lower cells are connected with lower studytime and MS combinations.
This chart is useful for understanding the data structure, but it should not be over-interpreted as a significant three-way interaction. The formal three-way interaction p-value is 0.7414, so the visual cell differences are better explained by main effects.
Python Chart 8: Residuals vs Fitted Values

The residuals-versus-fitted chart shows vertical fitted-value bands because the model is based on categorical cell means. Most residuals are distributed around zero, but some negative residuals are large.
The diagnostic conclusion is balanced. The model captures the main mean patterns, but residual spread and lower-tail cases should be acknowledged when reporting model diagnostics.
Python Chart 9: Residual Q-Q Plot

The Q-Q plot shows visible departure from the reference line, especially in the lower tail. The middle residuals are closer to the expected pattern than the extreme lower residuals.
This means residual normality is approximate rather than perfect. The significant main effects can still be reported, but the diagnostics should be described honestly.
Python Chart 10: Three Way ANOVA Summary Table

The summary table gives the compact final result. The three main effects are significant, and all interaction effects are not significant.
This is the most important table for reporting because it contains the formal decision for every model effect. It supports a final interpretation focused on studytime, school and sex main effects.
R Chart-by-Chart Validation
The R charts validate the Python analysis in a second software workflow. The R outputs repeat the same effect-size pattern, p-value decisions, main effect means, interaction profile, cell means and residual diagnostics.
R Chart 1: Three Way ANOVA Effect Sizes

The R effect-size chart confirms that school has the strongest effect, followed by studytime and sex. The interaction effect sizes remain very small.
This validates the practical conclusion from Python. The model should be reported as a main-effects result rather than an interaction-driven result.
R Chart 2: p-values by Effect

The R p-value chart confirms that studytime, school and sex are statistically significant, while all interaction effects are not significant.
This software agreement strengthens the final decision because Python and R support the same interpretation.
R Chart 3: Main Effect Mean Plot for Factor A

The R studytime chart confirms the upward mean pattern from lower studytime to higher studytime categories.
This supports the conclusion that studytime has a significant small main effect on G3.
R Chart 4: Main Effect Mean Plot for Factor B

The R school chart confirms that GP has a higher mean G3 than MS.
This validates school as the largest practical effect in the model.
R Chart 5: Main Effect Mean Plot for Factor C

The R sex chart confirms that the female group has a higher mean G3 than the male group.
The practical effect is small, but the formal test supports reporting sex as a significant main effect.
R Chart 6: Two-Way Interaction Profile

The R interaction profile confirms the same descriptive pattern: GP stays higher than MS across studytime categories.
The interaction is not statistically significant, so the plot should be interpreted as descriptive support for main effects rather than evidence of a formal interaction.
R Chart 7: Three-Way Cell Means

The R cell-mean chart confirms that some cells have higher means than others, especially cells connected with GP school and higher studytime levels.
The three-way interaction remains non-significant, so the cell mean chart should be used for description and quality checking, not for claiming a complex three-way effect.
R Chart 8: Residuals vs Fitted Values

The R residual chart confirms the same fitted-value banding and residual spread seen in Python.
The diagnostic message remains the same: the model explains the main cell mean differences, but residual tail behavior should be mentioned.
R Chart 9: Residual Q-Q Plot

The R Q-Q plot confirms that residual normality is approximate rather than perfect. Lower-tail departure is visible.
This supports a transparent assumption statement in the final report.
R Chart 10: Three Way ANOVA Summary Table

The R summary table confirms the same final result as Python. Studytime, school and sex are significant; all interaction effects are not significant.
This agreement between Python and R makes the final interpretation stable and suitable for SPSS-style reporting.
Google AdSense in-content placement reserved here
SPSS, R, Python and Excel Workflows for Three Way ANOVA
The same Three Way ANOVA workflow can be reproduced in SPSS, R, Python and Excel. SPSS uses the General Linear Model univariate procedure. R can use aov() or lm(). Python can use statsmodels. Excel can support descriptive summaries and interaction charts, but SPSS, R or Python is better for the full factorial ANOVA table.
SPSS Workflow
| Step | SPSS Menu or Syntax | Purpose |
|---|---|---|
| Open dataset | File > Open > Data | Load G3, studytime, school and sex. |
| Run GLM | Analyze > General Linear Model > Univariate | Open the factorial ANOVA procedure. |
| Set dependent variable | Dependent Variable: G3 | Define the numeric outcome. |
| Set fixed factors | studytime, school, sex | Define the three categorical factors. |
| Model | Full factorial | Includes main effects and all interactions. |
| Options | Descriptives, effect size, homogeneity tests | Get means, partial eta squared and assumptions. |
| Post hoc or estimated marginal means | Use for significant factors if needed | Follow up studytime because it has more than two levels. |
| Export output | OUTPUT EXPORT | Save SPSS output as PDF. |
R Workflow
| Step | R Action | Purpose |
|---|---|---|
| Read data | read.csv("dataset.csv") | Load the data. |
| Convert factors | factor(studytime), factor(school), factor(sex) | Define categorical factors. |
| Fit model | aov(G3 ~ studytime * school * sex, data = df) | Run full factorial ANOVA. |
| Read table | summary(model) | Check F values and p-values. |
| Effect sizes | effectsize::eta_squared() | Report partial eta squared. |
| Diagnostics | Residual plots and Q-Q plot | Check assumptions. |
Python Workflow
| Step | Python Action | Purpose |
|---|---|---|
| Read data | pandas.read_csv() | Load G3 and factor columns. |
| Clean data | Drop missing G3, studytime, school and sex rows | Use complete cases. |
| Fit OLS model | G3 ~ C(studytime)*C(school)*C(sex) | Run full three-way factorial model. |
| ANOVA table | anova_lm(model, typ=2) or typ=3 | Get model effect tests. |
| Effect sizes | Calculate partial eta squared | Report practical effect strength. |
| Charts | p-values, effect sizes, means and diagnostics | Explain the output visually. |
Excel Workflow
| Excel Task | Formula or Tool | Purpose |
|---|---|---|
| Prepare data | Columns for G3, studytime, school and sex | Organize the factorial dataset. |
| Create PivotTables | Rows and columns for factor combinations | Summarize main and cell means. |
| Create main effect charts | Bar charts by factor | Visualize studytime, school and sex means. |
| Create interaction chart | Line chart of means across factors | Inspect possible interactions. |
| Formal ANOVA | Use SPSS, R or Python | Excel is limited for a full three-way factorial ANOVA table. |
Code Blocks for Three Way ANOVA
SPSS Syntax for Three Way ANOVA
* Three Way ANOVA in SPSS.
* Dependent variable: G3.
* Factors: studytime, school, sex.
TITLE "Three Way ANOVA: G3 by Studytime, School and Sex".
UNIANOVA G3 BY studytime school sex
/METHOD=SSTYPE(3)
/INTERCEPT=INCLUDE
/PRINT=DESCRIPTIVE ETASQ HOMOGENEITY
/PLOT=PROFILE(studytime*school)
/EMMEANS=TABLES(studytime) COMPARE ADJ(BONFERRONI)
/EMMEANS=TABLES(school)
/EMMEANS=TABLES(sex)
/CRITERIA=ALPHA(.05)
/DESIGN=studytime school sex
studytime*school studytime*sex school*sex
studytime*school*sex.
OUTPUT EXPORT
/CONTENTS EXPORT=VISIBLE
/PDF DOCUMENTFILE="three_way_anova_spss_output.pdf".Python Code for Three Way ANOVA
import pandas as pd
import statsmodels.api as sm
from statsmodels.formula.api import ols
from statsmodels.stats.anova import anova_lm
df = pd.read_csv("dataset.csv")
for col in ["G3", "studytime", "school", "sex"]:
df[col] = df[col].astype("category") if col != "G3" else pd.to_numeric(df[col], errors="coerce")
data = df[["G3", "studytime", "school", "sex"]].dropna().copy()
model = ols("G3 ~ C(studytime) * C(school) * C(sex)", data=data).fit()
anova_table = anova_lm(model, typ=2)
print(anova_table)
# Partial eta squared
error_ss = anova_table.loc["Residual", "sum_sq"]
anova_table["partial_eta_sq"] = anova_table["sum_sq"] / (anova_table["sum_sq"] + error_ss)
print(anova_table)
# Estimated main effect means
print(data.groupby("studytime")["G3"].mean())
print(data.groupby("school")["G3"].mean())
print(data.groupby("sex")["G3"].mean())
# Cell means
cell_means = data.groupby(["studytime", "school", "sex"])["G3"].mean()
print(cell_means)
# Residual diagnostics
data["fitted"] = model.fittedvalues
data["residual"] = model.resid
print(data[["G3", "fitted", "residual"]].head())R Code for Three Way ANOVA
# Three Way ANOVA in R
library(tidyverse)
df <- read.csv("dataset.csv")
df$G3 <- as.numeric(df$G3)
df$studytime <- as.factor(df$studytime)
df$school <- as.factor(df$school)
df$sex <- as.factor(df$sex)
data <- df %>%
select(G3, studytime, school, sex) %>%
drop_na()
model <- aov(G3 ~ studytime * school * sex, data = data)
summary(model)
# Main effect means
data %>% group_by(studytime) %>% summarise(mean_G3 = mean(G3), n = n(), .groups = "drop")
data %>% group_by(school) %>% summarise(mean_G3 = mean(G3), n = n(), .groups = "drop")
data %>% group_by(sex) %>% summarise(mean_G3 = mean(G3), n = n(), .groups = "drop")
# Three-way cell means
data %>%
group_by(studytime, school, sex) %>%
summarise(mean_G3 = mean(G3), n = n(), .groups = "drop")
# Optional effect sizes
# install.packages("effectsize")
# library(effectsize)
# eta_squared(model, partial = TRUE)
# Diagnostics
par(mfrow = c(1, 2))
plot(fitted(model), residuals(model),
xlab = "Fitted values", ylab = "Residuals",
main = "Residuals vs Fitted")
abline(h = 0, lty = 2)
qqnorm(residuals(model))
qqline(residuals(model))Excel Notes for Three Way ANOVA
Excel support workflow:
1. Arrange the data:
G3 | studytime | school | sex
2. Create main effect PivotTables:
Rows = studytime, Values = Average of G3
Rows = school, Values = Average of G3
Rows = sex, Values = Average of G3
3. Create two-way cell means:
Rows = studytime
Columns = school
Values = Average of G3
4. Create three-way cell means:
Rows = studytime
Columns = school and sex
Values = Average of G3
5. Create charts:
- effect-size chart from ANOVA table output
- p-value chart from ANOVA table output
- main effect bar charts
- interaction profile chart
- cell mean chart
6. Formal Three Way ANOVA:
Use SPSS, R or Python for the correct factorial ANOVA table.
Excel is useful for summaries and graphs but not ideal for the full model.APA Reporting Wording
When reporting Three Way ANOVA, include the dependent variable, three factors, significant main effects, interaction results, effect sizes and assumption notes. Because the three-way interaction is non-significant, do not write the report as if the result is driven by a complex three-factor dependency.
APA-style report: A three-way ANOVA was conducted to examine the effects of studytime, school and sex on G3 final grade. There were significant main effects of studytime, F(3, error df) = 9.176, p = 5.978e-06, partial η² = 0.04168; school, F(1, error df) = 49.18, p = 6.001e-12, partial η² = 0.0721; and sex, F(1, error df) = 7.417, p = 0.006639, partial η² = 0.01158. The two-way interactions were not significant, and the studytime × school × sex interaction was also not significant, F(3, error df) = 0.4162, p = 0.7414, partial η² = 0.001969. The results indicate significant main-effect differences in G3 by studytime, school and sex, without evidence of a meaningful three-way interaction.
Short reporting version: Studytime, school and sex were significant main effects for G3. School had the largest practical effect, followed by studytime and sex. No two-way interaction or three-way interaction was statistically significant.
Common Mistakes
| Mistake | Why It Is Wrong | Correct Practice |
|---|---|---|
| Interpreting only the three-way interaction | The three-way interaction is not significant in this output. | Focus on significant main effects. |
| Ignoring effect size | P-values do not show practical strength. | Report Eta Squared, Omega Squared or partial eta squared. |
| Calling every cell difference an interaction | Cell means can differ because of main effects. | Use the formal interaction p-value before claiming interaction. |
| Skipping assumptions | ANOVA depends on residual and variance assumptions. | Review ANOVA Assumptions, Levene Test and residual plots. |
| Using one-way ANOVA repeatedly without adjustment | Separate tests ignore the factorial structure. | Use the full three-way model first. |
| Overstating a small effect | Sex is significant but partial η² is small. | Describe statistical significance and practical size separately. |
When to Use Three Way ANOVA
Use Three Way ANOVA when the outcome is numeric and there are three categorical factors. It is common in education, psychology, agriculture, medicine, business experiments and social science research where the researcher needs to test several factors and their interactions in one model.
| Situation | Use Three Way ANOVA? | Reporting Note |
|---|---|---|
| One numeric outcome and three categorical factors | Yes | Use a full factorial three-way model. |
| One factor only | No | Use One Way ANOVA. |
| Two categorical factors only | No | Use two-way ANOVA or factorial ANOVA. |
| Need covariate adjustment | Use ANCOVA | Compare with ANCOVA and One Way ANCOVA. |
| Repeated measures are involved | Use mixed/repeated model | Compare with Mixed ANOVA or Mixed MANOVA. |
Three Way ANOVA should be compared with Factorial ANOVA, One Way ANOVA, Fixed Effects ANOVA, Nested ANOVA, Balanced ANOVA, Brown Forsythe ANOVA, ANOVA Effect Size, ANOVA in SPSS, ANOVA in R and ANOVA in Python.
Downloads and Resources for Three Way ANOVA
Use these resources to reproduce the Three Way ANOVA workflow. The Python report, R report and SPSS output PDF are included as verification files. Script and workbook placeholders can be replaced after the final downloadable files are uploaded to the WordPress Media Library.
Download Dataset
Practice dataset with G3, studytime, school and sex variables.
Download Three Way ANOVA Python Report PDF
Python report PDF for p-values, effect sizes, main effects, interactions and residual diagnostics.
Download Three Way ANOVA R Report PDF
R validation PDF for three-way ANOVA interpretation.
Download Three Way ANOVA SPSS Output PDF
SPSS output PDF for factorial ANOVA reporting and interpretation.
Download Python Script
Python code for three-way ANOVA tables, effect sizes and charts.
Download R Script and Excel Workbook
R workflow and Excel support workbook for three-way ANOVA summaries.
FAQs About Three Way ANOVA
What is Three Way ANOVA?
Three Way ANOVA is a factorial ANOVA method used to test one numeric dependent variable across three categorical factors, including main effects, two-way interactions and the three-way interaction.
What variables were used in this example?
The dependent variable was G3 final grade. The three factors were studytime, school and sex.
Which main effects were significant?
Studytime, school and sex were all significant main effects.
Which effect was strongest?
School was the strongest effect, with partial eta squared about 0.072.
Was the three-way interaction significant?
No. The studytime × school × sex interaction was not significant, p = 0.7414.
Were the two-way interactions significant?
No. Studytime × school, studytime × sex and school × sex were not statistically significant.
How do I interpret a non-significant three-way interaction?
A non-significant three-way interaction means the evidence does not show that the two-way interaction pattern changes across the third factor. In this example, interpretation should focus on significant main effects.
Can Three Way ANOVA be done in Excel?
Excel can create means, PivotTables and charts, but SPSS, R or Python is better for the formal full factorial three-way ANOVA table.
Do I need post hoc tests after Three Way ANOVA?
Post hoc tests are useful for significant factors with more than two levels. In this example, studytime has four levels, so follow-up comparisons may be useful.
How do I report this Three Way ANOVA in APA style?
A concise report is: Studytime, school and sex were significant main effects for G3, while all two-way interactions and the studytime × school × sex interaction were not significant.
