Analysis of covariance, or ANCOVA, answers a common research question: does a group difference still hold once you account for something else that also affects the outcome? If two classes are taught with different methods but one started the term with higher scores, a simple comparison of final scores would be unfair. ANCOVA compares the groups while statistically holding that starting score constant.
In this tutorial, you will learn what ANCOVA does, when to use it, how to run it in SPSS, how to check its assumptions, how to interpret the output, and how to report it in APA style (7th edition).
What ANCOVA Is — and When to Use It
ANCOVA is an extension of ANOVA. Like ANOVA, it compares means across groups. The difference is that ANCOVA adds one or more continuous control variables, called covariates, into the model, and then compares group means after adjusting for them.
Use ANCOVA when you have one categorical independent variable with two or more groups, one continuous dependent variable, and one or more continuous covariates related to the outcome. A good covariate also reduces unexplained variation, which can make a genuine group effect easier to detect.
A classic example is comparing post-test scores between teaching methods while controlling for pre-test scores. Another is comparing treatment outcomes across groups while controlling for age or baseline severity. In both cases, the covariate is measured before the intervention, or at least not influenced by it: a covariate should never be something the group assignment itself caused, or adjusting for it will distort the effect you are measuring. ANCOVA is also not the right tool if your outcome is categorical, or if the covariate-outcome relationship differs sharply across groups — the homogeneity of regression slopes assumption, covered below, and the one researchers most often skip.
The Illustrative Example Used Here
Throughout this tutorial, we use a simple illustrative example. Suppose students in three classes are taught with three different methods, and each student takes a test at the end of term. Each student also has a pre-test score from the start of term. The research question is whether final test scores differ by teaching method after controlling for pre-test scores.
In SPSS terms, the dependent variable is the final test score (continuous), the fixed factor is teaching method (three groups), and the covariate is the pre-test score (continuous). Your own variables will differ, but the steps are exactly the same whatever your topic is.
Before You Run ANCOVA: Check the Assumptions
ANCOVA carries the usual ANOVA assumptions, plus two of its own. Check them before reporting anything.
- Independence of observations. Each case should belong to only one group, and cases should not influence each other. This is a design issue, not something SPSS tests for you.
- Normality of residuals. Residuals should be approximately normally distributed within each group. ANCOVA tolerates mild departures with reasonably sized groups, but strong skew or extreme outliers deserve attention.
- Homogeneity of variances. The variance of the dependent variable should be roughly equal across groups. Levene’s test, which SPSS provides in the ANCOVA output, checks this.
- Linearity between the covariate and the dependent variable. ANCOVA adjusts along a straight line, so the covariate and the outcome should be linearly related. A scatterplot of the covariate against the outcome, ideally split by group, is the quickest check.
- Homogeneity of regression slopes. This is the ANCOVA-specific assumption: the covariate-outcome relationship should be similar in every group, so the regression lines are roughly parallel. If it matters a lot in one group and barely at all in another, a single adjusted comparison is misleading, and you should not report a standard ANCOVA.
Step 1: Set Up Your Data
Your SPSS Data View should have one row per case and three columns: the grouping variable (for example, method, coded 1, 2, 3), the dependent variable (final score), and the covariate (pre-test score). In Variable View, label each variable clearly, set the grouping variable to Nominal and the two scale variables to Scale, and scan for typing errors.
Step 2: Test the Homogeneity of Regression Slopes
Before the main analysis, run a model that includes the interaction between your factor and your covariate:
- Click Analyze > General Linear Model > Univariate.
- Move your dependent variable into the Dependent Variable box.
- Move your grouping variable into the Fixed Factor(s) box.
- Move your covariate into the Covariate(s) box.
- Click Model, select Custom, and build a model containing the factor, the covariate, and the factor-by-covariate interaction. Click Continue.
- Click OK.
In the Tests of Between-Subjects Effects table, find the interaction row (for example, method * pretest). If it is not significant (conventionally, p > .05), the slopes are similar enough and you can proceed. If it is significant, stop: report the interaction itself, or discuss a different approach with a statistician, rather than forcing a standard ANCOVA.
Step 3: Run the ANCOVA
Now run the main model without the interaction term:
- Click Analyze > General Linear Model > Univariate.
- Move your dependent variable into the Dependent Variable box, your grouping variable into Fixed Factor(s), and your covariate into Covariate(s).
- Click Model and confirm that Full factorial is selected. This gives you the factor and the covariate as main effects, with no interaction. Click Continue.
- Click Options. Tick Descriptive statistics, Estimates of effect size, and Homogeneity tests (this gives you Levene’s test). Move your factor into the “Display Means for” box and tick Compare main effects, choosing Bonferroni as the confidence interval adjustment. This gives you pairwise comparisons of the adjusted means. Click Continue.
- Click OK.
SPSS produces several tables. The next section explains the ones that matter.
Paste-Ready SPSS Syntax
If you prefer syntax to menus, paste this into a Syntax window and run it, replacing the variable names with your own:
UNIANOVA final_score BY method WITH pretest /METHOD = SSTYPE(3) /INTERCEPT = INCLUDE /EMMEANS = TABLES(method) WITH(pretest=MEAN) COMPARE ADJ(BONFERRONI) /PRINT = DESCRIPTIVE ETASQ HOMOGENEITY /CRITERIA = ALPHA(.05) /DESIGN = pretest method.
This runs the same model as the menu steps above: the covariate first, then the factor, with adjusted means, Bonferroni pairwise comparisons, effect sizes, and Levene’s test.
Step 4: Interpret the SPSS Output
Descriptive Statistics. This table shows the raw, unadjusted group means and standard deviations. These describe your data, but they are not the ANCOVA result — the adjusted means below are what the analysis actually compares.
Levene’s Test of Equality of Error Variances. If this test is not significant (p > .05), the homogeneity of variances assumption is reasonably met. If it is significant, note it in your write-up and interpret the results with caution, especially if your group sizes are very unequal.
Tests of Between-Subjects Effects. This is the central table. The covariate row (for example, pretest) tells you whether the covariate relates to the outcome after accounting for group — a significant result means controlling for it was worthwhile. The factor row (for example, method) is your main result: a significant F test here means the groups differ on the outcome after adjusting for the covariate. Read the F value, degrees of freedom, p value (labelled Sig.), and partial eta squared, the effect size for that term.
Estimated Marginal Means. This table gives the adjusted group means — after controlling for the covariate — with standard errors and confidence intervals. These are the means you should describe and plot, not the raw means. If two groups have different raw means but similar adjusted means, the covariate explains the apparent gap, which is itself worth stating plainly.
Pairwise Comparisons. If your overall factor effect is significant and you have more than two groups, this table tells you which pairs differ. Because you selected a Bonferroni adjustment, the p values already account for multiple comparisons. Report the comparisons relevant to your research question, with the mean difference, confidence interval, and adjusted p value for each.
Step 5: What to Do If an Assumption Fails
If the regression slopes differ across groups, do not report a standard ANCOVA — describe the interaction instead, or seek advice on an alternative model. If variances are unequal, check whether group sizes are similar (ANCOVA tolerates unequal variances better with balanced groups) and report Levene’s result transparently. If the covariate and outcome are not linearly related, reconsider whether the covariate belongs in the model at all. In every case, report what you checked and what you found, including the checks that failed.
Reporting in APA Style (7th ed.)
APA style reports the test, the degrees of freedom, the F value, the p value, and the effect size, followed by the adjusted means. Report exact p values where SPSS provides them (for example, p = .032), and use p < .001 for very small values rather than writing p = .000.
Here is a template you can adapt, using placeholder values to show the format:
A one-way ANCOVA was conducted to compare final test scores across three teaching methods while controlling for pre-test scores. Preliminary checks confirmed the homogeneity of regression slopes, F(2, 84) = 1.12, p = .331, and Levene’s test indicated equal variances across groups, F(2, 87) = 0.86, p = .427. After adjusting for pre-test scores, there was a statistically significant difference in final test scores across teaching methods, F(2, 86) = 6.45, p = .002, partial eta squared = .13. Adjusted mean scores were highest for Method A (M = 78.4, SE = 1.6), followed by Method B (M = 74.1, SE = 1.6) and Method C (M = 70.2, SE = 1.7). Bonferroni-adjusted pairwise comparisons indicated that Method A scored significantly higher than Method C (mean difference = 8.2, 95% CI [2.1, 14.3], p = .004), while the remaining pairwise differences were not statistically significant.
Replace every number with your own output, and double-check the degrees of freedom against the Tests of Between-Subjects Effects table — the covariate costs one degree of freedom, which is why the error degrees of freedom differ from a plain ANOVA. Two APA details are easy to get wrong: use the symbol for eta squared, and report adjusted means with standard errors, not raw means with standard deviations. If you also show raw means, label them clearly as unadjusted.
Key Takeaways
- ANCOVA compares group means after adjusting for a continuous covariate, such as a pre-test score or baseline measurement.
- Your covariate should be related to the outcome and unaffected by the group assignment itself.
- Always test the homogeneity of regression slopes first: run the factor-by-covariate interaction, and only proceed with the standard ANCOVA if it is not significant.
- The Tests of Between-Subjects Effects table gives your main result; the Estimated Marginal Means table gives the adjusted means you should report.
- Report F, degrees of freedom, exact p values, and partial eta squared, and describe adjusted means — not raw means — in your APA write-up.
Frequently Asked Questions
What is the difference between ANOVA and ANCOVA?
ANOVA compares group means on an outcome. ANCOVA does the same thing while also adjusting for one or more continuous covariates. If you have a pre-test score, baseline measurement, or background variable that affects your outcome, ANCOVA lets you compare groups as if they had started equal on that variable.
Can I use more than one covariate in SPSS?
Yes — move several continuous variables into the Covariate(s) box. Each one costs a degree of freedom, so only include variables with a clear theoretical reason or a demonstrated relationship with the outcome.
What should I do if the homogeneity of regression slopes assumption is violated?
Do not report a standard ANCOVA. The group difference depends on the level of the covariate, so a single adjusted comparison is misleading. Report the interaction between the factor and the covariate, and consider whether a different model suits your design better.
Should I report raw means or adjusted means?
Report the adjusted means, because those are what the analysis compared. You can also show raw means in a descriptive table, but label them clearly as unadjusted.
Does ANCOVA require equal group sizes?
No, but it is more sensitive to violated assumptions — especially unequal variances — when groups are very unbalanced. Check Levene’s test, and interpret cautiously if your largest group is several times the size of your smallest.
Need this done on your data? Get a free quote → /services/