When to use it
You want to compare a continuous outcome across groups while removing the influence of a continuous nuisance variable (a covariate): e.g. comparing post-test scores across teaching methods after adjusting for pre-test scores.
When not to: The homogeneity-of-regression-slopes test is significant (the group gap's size genuinely depends on the covariate value, so a single adjusted mean per group is misleading; report simple slopes or a moderation model instead), the covariate was itself measured AFTER the grouping/treatment and could have been affected by it (adjusting removes part of the real effect rather than isolating it), or the groups are observational and expected to differ on more than just the measured covariate (ANCOVA cannot rescue a badly confounded comparison).
Step by step
Open it from the menu
Click Analyze in the menu bar; under Means choose ANCOVA (Analysis of Covariance).
Fill in the form
Choose the columns: What you measured, Groups, Columns to adjust for. The form lists only columns whose type fits each field.
Check the options
The options start at their defaults: Alpha, Sum-of-squares type, Confidence level. Change one only when your question needs it.
Run the analysis
Press Run analysis. The Result Card opens on its Results tab.
What to choose in the form
| What you measured Response required | One numeric column. The continuous outcome variable. |
|---|---|
| Groups Group required | One categorical column. Categorical grouping factor (2+ levels). |
| Columns to adjust for Covariate required | One numeric column. One or more continuous covariates to adjust for. |
| Alpha | Significance threshold. Default: 0.05. |
| Sum-of-squares type | Type of sums of squares (II or III; they agree for the standard no-interaction ANCOVA model). Default: 2. |
| Confidence level | Confidence level for adjusted-mean intervals. Default: 0.95. |
How to read the card
The Results tab starts with what to know first (rows left out, checks that did not pass), then the interpretation in words and the Key Results; charts and assumption checks follow further down. Learn More explains the method in plain words. Read a Result Card covers all four tabs.
What it assumes
- Normality (of residuals, not of the raw data)
If it does not hold: Non-normal residuals make the adjusted F-test on the group effect approximate rather than exact.
How to check: Shapiro-Wilk on the model residuals (sampled for large n), reported directly on the card.
- Homogeneity of variance (homoscedasticity)
If it does not hold: Unequal response variance across groups distorts the adjusted F-test's true Type I error rate.
How to check: Levene's test on the response across groups, reported directly on the card.
- Linearity
If it does not hold: ANCOVA assumes each covariate is linearly related to the response; a genuinely curved covariate-response relationship makes the adjustment itself biased, over- or under-correcting the group means depending on where each group happens to sit on the covariate.
How to check: Not checked by KernelStats: stated directly as a standing reminder to inspect the covariate scatter and add a polynomial term if the relationship looks curved.
A worked example
Comparing penguin body mass across species after adjusting for flipper length as a covariate.
Result: The covariate x species interaction (homogeneity-of-slopes test) is significant, F(2, 336) = 5.53, p = .004: the within-species slopes are about 33 g/mm (Adelie), 35 g/mm (Chinstrap) and 55 g/mm (Gentoo). Adjusted means at the grand-mean flipper length (200.9 mm) are Adelie 4147 g, Chinstrap 3940 g and Gentoo 4414 g (raw means 3701, 3733 and 5076 g); the species F-test after adjustment is F(2, 338) = 18.4, p < .001. Levene's test also flags unequal variances (p = .006).
Adjusting for flipper length shrinks the Gentoo-Adelie gap from about 1375 g to about 267 g, so most of the raw difference travels with flipper size. But because the slopes test is significant, the single adjusted mean per species is only a first approximation (and it sits at a flipper length few Gentoo actually have): the product's own documented caveat applies directly here, and a fuller picture requires examining the per-species regression slopes (simple slopes) rather than reporting the adjusted means alone as the complete story.
From the Statistics Library.
The code tabs
Code gives this analysis as Python, R and MATLAB code (and SAS where the tab offers it), reading the data the way KernelStats did. Export sends the card to a report or to slides. See The Code tab.
Understand the statistics
Ask Oobi
Type one of these into Ask Oobi beside your data:
- Do penguin species differ in body mass once we account for flipper length?
- Explain the ANCOVA (analysis of covariance) in plain words.
- What does homogeneity of variance (homoscedasticity) mean?
Last reviewed November 16, 2026.
