Analysis of covariance (ANCOVA) is a general linear model with one continuous outcome variable (quantitative) and one or more factor variables (qualitative). ANCOVA is a merger of ANOVA and regression for continuous variables. ANCOVA tests whether certain factors have an effect on the outcome variable after removing the variance for which quantitative predictors (covariates) account. The inclusion of covariates can increase statistical power because it accounts for some of the variability.
Contents 
Like any statistical procedure, ANCOVA makes certain assumptions about the data entered into the model. Only if these assumptions are met, at least approximately, will ANCOVA yield valid results. Specifically, ANCOVA, just like ANOVA, assumes that the errors^{[1]} are normally distributed and homoscedastic. Further, since ANCOVA is a method based in linear regression, the relationship of the dependent variable to the independent variable(s) must be linear in the parameters.
While the inclusion of a covariate into an ANOVA generally increases statistical power by accounting for some of the variance in the dependent variable and thus increasing the ratio of variance explained by the independent variables, adding a covariate into ANOVA also reduces the degrees of freedom (see below). Accordingly, adding a covariate which accounts for very little variance in the dependent variable might actually reduce power.
One factor analysis is appropriate when dealing with more than 3 populations; k populations. The single factor has k levels equal to the k populations. n samples from each population are chosen randomly from their respective population.
The sum of squared deviates (SS): SST_{y}, SSTr_{y}, and SSE_{y} must be calculated using the following equations for the dependent variable, Y. The SS for the covariate must also be calculated, the two necessary values are SST_{x} and SSE_{x}.
The total sum of squares determines the variability of all the samples. n_{T} represents the total number of samples:
The sum of squares for treatments determines the variability between populations or factors. n_{k} represents the number of factors
The sum of squares for error determines the variability within each population or factor. n_{n} represents the number of samples with a given population:
The total sum of squares is equal to the sum of squares for treatments and the sum of squares for error:
The total sum of square covariates determines the covariance of X and Y within all the data samples:
The correlation between X and Y is .
The proportion of covariance is subtracted from the dependent, SS_{y} values:
The mean of each population is adjusted in the following manner:
Mean squares for treatments where df_{Tr} is equal to N_{T} − k − 1. df_{Tr} is one less than in ANOVA to account for the covariance and df_{E} = k − 1:
The F statistic is


