ANCOVA: controlling for a pre-test
How to compare groups that started apart using adjusted means, check homogeneity of slopes and write it up.
You taught a trial class and a comparison class, and the two classes already differed on the pre-test. Sound familiar?
"Can I just compare the post-test scores?"
When the starting lines differ, you cannot tell whether a post-test gap comes from the teaching or from what students knew to begin with. This is where analysis of covariance (ANCOVA) comes in. Here is what controlling for a covariate means, and how to read adjusted means and the assumptions.
What ANCOVA is
ANCOVA compares group means while statistically filtering out the influence of a continuous variable (the covariate) that also affects the outcome.
It is ANOVA combined with regression, so the covariate does two jobs.
- Levelling the start — adjusts for pre-test differences between groups
- Shrinking the error — removes what the pre-test explains, which raises power
An example
- Participants — 56 students in two classes (anonymous, class-level data)
- Groups — game-based problem solving 28 · standard teaching 28
- Covariate — pre-test maths score (out of 100)
- Outcome — post-test maths score
First, the raw scores.
| Game-based | Standard | |
|---|---|---|
| Pre-test | 61.3 | 67.6 |
| Post-test | 69.4 | 68.2 |
The game-based class started about 6 points lower. Compare only the post-test with a t-test and the gap is just 1.1 points, which is not significant (t(54) = 0.32, p = .751).
So did the game-based lessons do nothing?
Adjusted means — means on a level start
ANCOVA works out what the post-test would have been if both classes had started at the overall pre-test mean (64.45). These values are the adjusted means.
| Group | Raw mean | Adjusted mean |
|---|---|---|
| Game-based | 69.36 | 72.16 |
| Standard | 68.21 | 65.41 |
| Adjusted gap | 6.74 points (95% CI [2.15, 11.34]) |
With the starting line levelled, the game-based class scored 6.74 points higher, and the difference was significant (F(1, 53) = 8.67, p = .005).
That is why ANCOVA results report adjusted means, not raw means.
Which analysis to choose
- Group comparison + a continuous variable to control → ANCOVA
- You want the shape of change from pre to post in the same people → mixed-design ANOVA
- Several outcome variables → multivariate ANCOVA (MANCOVA)
- The covariate works differently in each group → a group × covariate interaction model
- Observational data with large group differences → propensity score matching (PSM)
Assumptions to check
① Homogeneity of regression slopes (the most important one) — how strongly the pre-test lifts the post-test (the slope) must be the same in both groups. It holds when the group × covariate interaction is not significant.
In the example, F(1, 52) = 0.00, p = .960, so it holds. If the slopes differ, the group gap changes with the pre-test level and one adjusted mean cannot summarise it.
- ② Linearity — the covariate and outcome have a straight-line relationship
- ③ Covariate measured before treatment — do not use a variable the teaching itself could have changed
- ④ Normal, equal-variance residuals — as in ordinary ANOVA
- ⑤ No heavy overlap between covariates — with several, check the VIF
Reading the results table
- Group row — is there still a group difference after controlling the covariate? (F(1, 53) = 8.67, p = .005)
- Covariate row — does the pre-test explain the post-test? (F(1, 53) = 88.54, p < .001)
- Adjusted means table — each group's adjusted mean and 95% confidence interval
- Pairwise comparisons — with three or more groups, which pairs differ
A significant covariate row means "controlling for the pre-test was worth it". If the covariate barely relates to the outcome, it costs a degree of freedom and buys little.
Effect size: partial eta squared (η²p)
Read .01 as small, .06 medium and .14 large. The example's group effect is η²p = .141, a large effect even after controlling for the covariate.
A caution when reading it — if the groups were not randomly assigned, adjusting for a covariate does not make it a causal effect. Differences you did not measure may remain.
How to write it up
An analysis of covariance was conducted with pre-test scores as the covariate. The assumption of homogeneity of regression slopes was met (F(1, 52) = 0.00, p = .960). After controlling for pre-test scores, post-test scores differed significantly by teaching method, F(1, 53) = 8.67, p = .005, η²p = .14. The adjusted post-test score of the game-based group (M = 72.16, SE = 1.59) was 6.74 points higher than that of the standard group (M = 65.41, SE = 1.59; 95% CI [2.15, 11.34]). The covariate, pre-test score, was significantly related to post-test scores, F(1, 53) = 88.54, p < .001.
Example sentence · the numbers are made up
In Skari
In Skari Statistics, load your data and pick Analysis of Covariance (ANCOVA) under Comparison → ANOVA in the left-hand list.
At the variables step you only choose the dependent variable, the factor (group) and the covariates — you can add several covariates at once.

Run ANCOVA on your own data
Opens Statistics at Comparison → ANOVA → ANCOVA
Check the model (Type II sums of squares) in the settings and run it, and the report opens. Sample size, test statistic, effect size and the adjusted group means sit at the top as cards, with the result paragraph written out beneath them.

Next come the ANCOVA table, adjusted means with confidence intervals, covariate coefficients, pairwise differences (Tukey) and a plot of each group's regression line.

The assumption table covers normality of residuals, equal variances, independence and outliers, plus homogeneity of regression slopes for each covariate, so you can see straight away whether the adjusted means can be taken at face value. With two or more covariates, the VIF is shown too.

The report downloads as Excel, PDF or Word.
Wrapping up
The heart of ANCOVA is comparing adjusted means on a level start. Check homogeneity of slopes first, report adjusted rather than raw means, and you can answer "but they were different from the start" with confidence.
Want the theory behind it?The Academy's ANCOVA chapter covers adjusted means and homogeneity of regression slopes in depth →