ANCOVA

Compare group means while statistically controlling for one or more continuous covariates.

Analysis of Covariance (ANCOVA) combines ANOVA with regression to test group differences on a continuous outcome after statistically controlling for one or more continuous covariates. By removing the variance explained by the covariate from the error term, ANCOVA increases statistical power and removes confounding. Common uses include adjusting post-test scores for pre-test differences, controlling for age or IQ in group comparisons, and increasing precision in clinical trials.

A critical assumption is homogeneity of regression slopes: the relationship between the covariate and the DV must be the same (parallel) across all groups. If this assumption is violated, the adjusted means are misleading. StatRyx tests this assumption automatically using the Group × Covariate interaction.

StatRyx computes the ANCOVA table, adjusted (least-squares) group means, partial eta-squared, pairwise post-hoc comparisons on adjusted means, and a regression-adjusted means plot — all in APA 7 format.

ANCOVA compares groups on their adjusted means — the means each group would have if all groups had the same covariate value. Two assumptions are specific to it: the covariate must relate linearly to the outcome, and the slope of that relationship must be the same in every group (homogeneity of regression slopes, tested with a group × covariate interaction). Report the adjusted means with their standard errors alongside F, p and partial η².

When to use the ANCOVA

When not to use it

Worked example

SourceSSdfMSFppartial η²
Covariate (Pre-test)2341.812341.834.2< .001.28
Group1198.22599.18.74< .001.17
Error5892.48668.5

How to report it (APA 7)

A one-way ANCOVA, controlling for pre-test anxiety scores, revealed a significant group effect on post-test anxiety, F(2, 86) = 8.74, p < .001, partial η² = .17. Adjusted means were significantly lower for the CBT group (M_adj = 38.2) compared to control (M_adj = 47.6, p < .001).

Frequently asked questions

Is ANCOVA free on StatRyx?

Yes. You can run it without an account (3 free analyses), and a free account adds 10 more — a one-time allowance, no payment needed. Every result includes the APA 7 write-up. Paid plans (Student from $9/month) add more analyses and Word, PDF and Excel export.

What is the difference between ANCOVA and regression?

ANCOVA is a special case of regression with one or more categorical predictors (groups) and one or more continuous covariates. ANCOVA emphasises the adjusted group means; regression emphasises coefficient estimates.

Can I have multiple covariates?

Yes. StatRyx supports multiple covariates in a single ANCOVA, each of which is partialled from the error before testing the group effect.

How do I report an ANCOVA in APA 7?

Name the covariate, then give F(df1, df2), p and partial η² for the group effect, plus the adjusted means: "Controlling for pre-test anxiety, groups differed in post-test anxiety, F(2, 86) = 8.74, p < .001, partial η² = .17." Mention that homogeneity of regression slopes was checked.

ANCOVA or a mixed ANOVA for pre-post data?

For a randomised pre-post design, ANCOVA on the post-test with the pre-test as covariate is usually more powerful than a mixed ANOVA, and it answers the same question. A mixed ANOVA is preferable when you have three or more time points or want to describe change over time.

Run a ANCOVA on your data →

Related analyses