ANCOVA (analysis of covariance) compares group means on an outcome while statistically controlling for one or more continuous variables, called covariates. The classic use is a pretest-posttest design: compare posttest scores between an intervention and a control group, adjusting for each person's pretest score.
Adding a covariate that is strongly related to the outcome removes some of the unexplained variance, so the group comparison becomes more precise and more powerful.
In this guide
What ANCOVA does
ANCOVA fits a regression of the outcome on the covariate within each group and compares the groups at the same value of the covariate, usually its overall mean. The group means at that point are the adjusted means (also called estimated marginal means). The F test for the group factor tests whether these adjusted means differ.
When to use it
- A continuous outcome, a categorical grouping factor and one or more continuous covariates.
- The covariate was measured before the treatment, or cannot be affected by it (age, baseline score).
- Ideally, participants were randomly assigned to groups. Then ANCOVA increases precision without changing what is being compared.
If intact groups differ on the covariate (one school has much higher baseline scores), adjusting statistically does not make them comparable. The covariate may be measured with error, and other differences between the groups remain. Interpret ANCOVA on non-randomized groups cautiously.
Assumptions
- Linear relationship between the covariate and the outcome in every group. Check with a scatter plot.
- Homogeneity of regression slopes: the covariate–outcome slope is the same in every group. Test it by adding the group × covariate interaction. If it is significant, the group difference depends on the covariate value, and ordinary ANCOVA is not appropriate.
- Independence of the covariate and the treatment, which random assignment provides.
- Normal residuals and equal variances across groups, as in ANOVA.
- Covariate measured reliably. Measurement error in the covariate leads to under-adjustment.
Worked example
Sixty students are randomly assigned to a new tutoring program or the usual teaching (30 each). Their math pretest is the covariate and the posttest is the outcome.
- Homogeneity of slopes: the group × pretest interaction is not significant, F(1, 56) = 0.42, p = .520, so the assumption holds.
- The pretest strongly predicts the posttest, F(1, 57) = 48.30, p < .001, η²p = .46.
- After adjusting for pretest, the groups differ: F(1, 57) = 6.80, p = .012, η²p = .107.
| Group | Unadjusted mean | Adjusted mean | SE |
|---|---|---|---|
| Tutoring | 71.8 | 72.2 | 1.31 |
| Usual teaching | 67.6 | 67.4 | 1.31 |
The adjusted means compare the two groups as if they had the same average pretest score. The tutoring group scored about 4.8 points higher.
How to report ANCOVA in APA 7
A one-way ANCOVA compared posttest math scores between the tutoring and usual-teaching groups, controlling for pretest scores. The assumption of homogeneity of regression slopes was met, F(1, 56) = 0.42, p = .520. Pretest scores were significantly related to posttest scores, F(1, 57) = 48.30, p < .001, η²p = .46. After adjustment, the tutoring group (Madj = 72.2, SE = 1.31) scored significantly higher than the usual-teaching group (Madj = 67.4, SE = 1.31), F(1, 57) = 6.80, p = .012, η²p = .107.
ANCOVA vs gain scores vs repeated measures
For a randomized pretest-posttest design, ANCOVA on the posttest with the pretest as covariate is generally more powerful than comparing gain scores (posttest − pretest) or running a mixed ANOVA, and it is the approach most methodologists recommend. With non-randomized groups the methods can give different answers (Lord's paradox), and none of them fully solves the problem.
Common mistakes
- Using a covariate measured after the treatment, which may itself be affected by the treatment and remove part of the effect you want to find.
- Skipping the homogeneity of slopes test.
- Reporting unadjusted means alongside the ANCOVA F test. Report the adjusted means that the test actually compares.
- Adding many weakly related covariates. Each one costs a degree of freedom without reducing error much.
Frequently asked questions
What is an adjusted mean in ANCOVA?
It is the estimated group mean at the overall mean of the covariate, which shows how the groups would compare if they had the same covariate value. It is also called the estimated marginal mean.
What if the homogeneity of regression slopes assumption is violated?
The group effect depends on the covariate value, so a single adjusted difference is misleading. Report the model with the interaction, or use the Johnson-Neyman technique to show where groups differ.
Can I use more than one covariate?
Yes, but each should be theoretically justified, measured before treatment and related to the outcome. A good rule is no more covariates than about one per 10 participants per group.
Is ANCOVA the same as regression?
Yes. ANCOVA is a linear regression with a categorical predictor (dummy coded) and continuous covariates. The ANCOVA table is a different presentation of the same model.


