ArticleslgStudy

science

Analysis of covariance

Analysis of covariance is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Analysis of covariance rather than just read about it. In short: Analysis of covariance (ANCOVA) is a general linear model that blends ANOVA and regression. ANCOVA evaluates whether the means of a dependent variable (DV) are equal across levels of one or more categorical independent variables (IV) and across one or more continuous variables.

Analysis of covariance — main illustration
Analysis of covariance — illustration

Key takeaways

  • Analysis of covariance belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Analysis of covariance to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Analysis of covariance from memory before moving on to harder problems.

Reference excerpt

Analysis of covariance (ANCOVA) is a general linear model that blends ANOVA and regression. ANCOVA evaluates whether the means of a dependent variable (DV) are equal across levels of one or more categorical independent variables (IV) and across one or more continuous variables. For example, the categorical variable(s) might describe treatment and the continuous variable(s) might be covariates (CV)'s, typically nuisance variables; or vice versa. Mathematically, ANCOVA decomposes the variance in the DV into variance explained by the CV(s), variance explained by the categorical IV, and residual variance. Intuitively, ANCOVA can be thought of as 'adjusting' the DV by the group means of the CV(s). The ANCOVA model assumes a linear relationship between the response (DV) and covariate (CV): yij=μ+τi+B(xij−x‾)+ϵij. In this equation, the DV, yij is the jth observation under the ith categorical group; the CV, xij is the jth observation of the covariate under the ith group. Variables in the model that are derived from the observed data are μ (the grand mean) and x‾ (the global mean for covariate x). The variables to be fitted are τi (the effect of the ith level of the categorical IV), B (the slope of the line) and ϵij (the associated unobserved error term for the jth observation in the ith group). Under this specification, the categorical treatment effects sum to zero (∑iaτi=0). The standard assumptions of the linear regression model are also assumed to hold, as discussed below.

Example In an agricultural study, ANCOVA can be used to analyze the effect of different fertilizers (τi) on crop yield (yij), while accounting for soil quality (xij) as a covariate. Soil quality, a continuous variable, influences crop yield and may vary across plots, potentially confounding the results. The model adjusts yield measurements for soil quality differences and evaluates whether fertilizer types differ significantly. Mathematically, this can be expressed as: yij=μ+τi+β(xij−x‾)+ϵij, where:

yij is the crop yield for the j-th plot under the i-th fertilizer type, μ is the grand mean crop yield, τi represents the effect of the i-th fertilizer type, subject to the constraint ∑iτi=0 for identifiability, β is the slope of the regression line representing the relationship between soil quality and crop yield, xij is the soil quality for the j-th plot under the i-th fertilizer type, and x‾ is the global mean soil quality, ϵij is the residual error term, assumed to be normally distributed with mean 0 and variance σ2. In this setup, ANCOVA partitions the total variance in crop yield into variance explained by soil quality (covariate), variance explained by fertilizer type (categorical IV), and residual variance. By adjusting for soil quality, ANCOVA provides a more precise estimate of the fertilizer effect on crop yield. The constraint ∑iτi=0 ensures that the categorical variable's effects are centered around zero, allowing for meaningful interpretation of group differences. It is standard in ANOVA and ANCOVA with categorical variables.

Uses

Increase power ANCOVA can be used to increase statistical power (the probability a significant difference is found between groups when one exists) by reducing the within-group error variance. In order to understand this, it is necessary to understand the test used to evaluate differences between groups, the F-test. The F-test is computed by dividing the explained variance between groups (e.g., medical recovery differences) by the unexplained variance within the groups. Thus,

F=MSbetweenMSwithin If this value is larger than a critical value, we conclude that there is a significant difference between groups. Unexplained variance includes error variance (e.g., individual differences), as well as the influence of other factors. Therefore, the influence of CVs is grouped in the denominator. When we control for the effect of CVs on the DV, we remove it from the denominator making F larger, thereby increasing our power to find a significant effect if one exists at all.

Adjusting preexisting differences Another use of ANCOVA is to adjust for preexisting differences in nonequivalent (intact) groups. This controversial application aims at correcting for initial group differences (prior to group assignment) that exists on DV among several intact groups. In this situation, participants cannot be made equal through random assignment, so CVs are used to adjust scores and make participants more similar than without the CV. However, even with the use of covariates, there are no statistical techniques that can equate unequal groups. Furthermore, the CV may be so intimately related to the categorical IV that removing the variance on the DV associated with the CV would remove considerable variance on the DV, rendering the results meaningless.

Assumptions There are several key assumptions that underlie the use of ANCOVA and affect interpretation of the results. The standard linear regression assumptions hold; further we assume that the slope of the covariate is equal across all treatment groups (homogeneity of regression slopes).

Assumption 1: linearity of regression The regression relationship between the dependent variable and concomitant variables must be linear.

Assumption 2: homogeneity of error variances The error is a random variable with conditional zero mean and equal variances for different treatment classes and observations.

Assumption 3: independence of error terms The errors are uncorrelated. That is, the error covariance matrix is diagonal.

Assumption 4: normality of error terms The error terms should be normally distributed ϵij ~ N(0,σ2).

Assumption 5: homogeneity of regression slopes The slopes of the different regression lines should be equivalent, i.e., regression lines should be parallel among groups. The fifth issue, concerning the homogeneity of different treatment regression slopes is particularly important in evaluating the appropriateness of ANCOVA model. Also note that we only need the error terms to be normally distributed. In fact both the independent variable and the concomitant variables will not be normally distributed in most cases.

Conducting an ANCOVA

Test multicollinearity If a CV is highly related to another CV (at a correlation of 0.5 or more), then it will not adjust the DV over and above the other CV. One or the other should be removed since they are statistically redundant.

… excerpt ends here. Continue reading the full article.

Illustrations

Analysis of covariance illustration
Analysis of covariance: Simple main effects plot showing a small Interaction between the two levels of the independent variable.
Simple main effects plot showing a small Interaction between the two levels of the independent variable.

Worked examples

Example 1 — a first encounter with Analysis of covariance

Start with the simplest possible case. Write down what Analysis of covariance claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Analysis of covariance before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Analysis of covariance ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Analysis of covariance

In research
Analysis of covariance appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Analysis of covariance in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Analysis of covariance is common in secondary-school and first-year university syllabi. It links to neighbouring topics Analysis of variance, Covariance and correlation, so understanding it makes those chapters shorter.
In everyday life
Look for Analysis of covariance outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Analysis of covariance” →

How to study Analysis of covariance in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Analysis of covariance means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Analysis of covariance out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Analysis of covariance in simple terms?

Analysis of covariance (ANCOVA) is a general linear model that blends ANOVA and regression. ANCOVA evaluates whether the means of a dependent variable (DV) are equal across levels of one or more categorical independent variables (IV) and across one or more continuous variables.

Why does Analysis of covariance matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Analysis of covariance?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Analysis of covariance.

Tags

  • Analysis of variance
  • Covariance and correlation

Keep exploring