What “Constant Variance” Means
In regression, “constant variance” is a statement about how much the response varies around its conditional mean at different predictor values. It does not say that observed responses, errors, or residuals are all the same size. Nor does it say that the response has the same mean at every predictor value.
To state the assumption precisely, let \(Y_i\) be the response for observation \(i\), and let \(x_{i1},\ldots,x_{ip}\) be its predictor values. Write \(\mathbf{x}_i=(x_{i1},\ldots,x_{ip})\). A multiple linear regression model can be written as
Here \(\varepsilon_i\) is the unobserved error: the difference between \(Y_i\) and the model’s conditional mean. For the statements below, suppose the conditional mean is correctly specified as the linear expression in the model, so that \(E(\varepsilon_i\mid\mathbf{x}_i)=0\). The constant-variance assumption then specifies the conditional variance of the error.
The conditioning is important. In a regression with several predictors, the assumption concerns the error variance given the full predictor vector—not merely given one predictor while ignoring the others. Since the model’s conditional mean is fixed once the predictors are specified, the same assumption can be expressed as
Variance Is Not the Conditional Mean
Regression describes a conditional mean as well as variation around that mean. These are separate features of the response distribution. Under the model above, the conditional mean is \(E(Y_i\mid\mathbf{x}_i)=\beta_0+\beta_1x_{i1}+\cdots+\beta_px_{ip}\); homoskedasticity says that the conditional variance around this mean does not change with \(\mathbf{x}_i\). A changing mean does not by itself imply changing variance, and constant variance does not require a constant mean.
The distinction can be seen directly by subtracting a conditional mean. For any fixed predictor value, subtracting a constant does not change variance. Thus, if the model’s conditional mean is correctly specified,
This identity justifies using either the conditional response variance or the conditional error variance to state the assumption. It does not say that the response has no mean structure; the mean is removed when measuring its conditional variance.
Worked Example: Comparing Conditional Error Variances
Consider a hypothetical regression with one predictor \(x\). Suppose that at \(x=0\), the conditional response is equally likely to be 8 or 12, while at \(x=1\), it is equally likely to be 6 or 14. Calculate the conditional mean and variance at each predictor value, then assess constant variance.
At \(x=0\), the mean is \((8+12)/2=10\). The two deviations from that mean are \(-2\) and \(2\), so the conditional variance is
At \(x=1\), the mean is \((6+14)/2=10\). The deviations are \(-4\) and \(4\), giving
Both conditional means equal 10, but the conditional variances differ: 4 response-units squared at \(x=0\) and 16 response-units squared at \(x=1\). These hypothetical distributions therefore do not satisfy the constant-variance assumption. The difference in variance is not a difference in mean.
Variance Is Not the Predictor Distribution
The assumption is conditional on predictor values. It does not require predictors to be normally distributed, evenly spaced, or sampled in any particular pattern. In some regression settings the observed predictor values are treated as fixed; in others they are viewed as random. Either way, the question of homoskedasticity is whether the conditional error variance is the same across the predictor values under consideration.
This distinction also means that changing which predictor values appear, or how often they appear, does not alone establish that the conditional variance has changed. Such a change can affect the available information about the conditional distributions, but the distribution of the predictors and the variance of the errors given those predictors are different properties.
Worked Example: Uneven Predictor Values, Constant Conditional Variance
Suppose a hypothetical data set contains 18 observations at \(x=0\) and 2 observations at \(x=1\). At either predictor value, assume the conditional response is equally likely to be 7 or 13. Check the conditional variances and decide whether the uneven representation of predictor values violates homoskedasticity.
At both \(x=0\) and \(x=1\), the conditional mean is \((7+13)/2=10\). At either value, the deviations are \(-3\) and \(3\), and therefore
Thus \(\operatorname{Var}(Y\mid x=0)=9\) and \(\operatorname{Var}(Y\mid x=1)=9\): the conditional variance is constant in this example. The fact that there are many more observations at \(x=0\) than at \(x=1\) describes the predictor distribution, not a difference in conditional error variance. In a finite sample, the smaller group would provide less information for assessing its conditional spread, but its size alone does not make the assumption false.
Conditional Variance Versus Marginal Variance
A related distinction is between the variance of \(Y\) given its predictors and the overall, or marginal, variance of \(Y\). The marginal distribution combines variation within predictor values with variation in the conditional means across predictor values. Consequently, the marginal variance can be large even when the conditional variance is constant.
For a single predictor \(X\), the law of total variance states
The first term averages the within-\(X\) conditional variances; the second measures how the conditional means vary across \(X\). Homoskedasticity concerns the first term before averaging: it requires \(\operatorname{Var}(Y\mid X=x)\) to be the same for each relevant \(x\). It does not require the second term to be zero.
Worked Example: Constant Conditional Variance, Nonconstant Marginal Variation
Suppose a hypothetical random predictor \(X\) equals 0 or 10 with probability \(1/2\) each. Assume \(E(Y\mid X)=5+X\) and \(\operatorname{Var}(Y\mid X)=4\) at both predictor values. Find the overall mean and variance of \(Y\), and explain what they imply about homoskedasticity.
The conditional means are 5 when \(X=0\) and 15 when \(X=10\). Thus the overall mean is
The average conditional variance is 4. The variance of the conditional mean is
Applying the law of total variance gives
The overall variance is 29, but the conditional variance is 4 at both values of \(X\). The model is homoskedastic in this example. The larger marginal variance includes variation because the conditional mean changes with \(X\); it is not evidence, by itself, that the conditional error variance changes.
What the Assumption Does—and Does Not—Claim
Constant variance is one condition about the regression errors, not a substitute for the other parts of a model. In particular, it does not establish that the chosen conditional mean is appropriate. If the mean model is misspecified, variation around its fitted mean can reflect both an incorrect mean pattern and random error. Conversely, a correctly specified conditional mean does not guarantee constant conditional variance.
The assumption also does not assert that every observed error has magnitude \(\sigma\), or that residuals must have equal absolute values. It specifies a variance for a conditional distribution, a summary of its spread over repeated outcomes at the same predictor values. Individual outcomes naturally vary around the conditional mean.
Residual diagnostic evidence can help identify patterns inconsistent with a constant conditional spread, but residuals are calculated from the observed sample rather than directly observed errors. A plot with no obvious change in spread is not a proof that the population assumption holds. A responsible conclusion describes what the diagnostic evidence suggests and acknowledges that it is evidence about the assumption, not a direct observation of every conditional error distribution.
Why the Distinction Matters
The constant-variance assumption matters because regression calculations often use a common error variance to describe uncertainty. If conditional error variance differs across predictor values, a single common variance does not accurately describe the full conditional spread. The implications for least-squares uncertainty estimates and alternative methods are separate questions; the first step is to identify exactly which assumption is being assessed.
Keeping the concepts separate prevents three frequent reasoning errors: treating a changing conditional mean as proof of changing variance, treating the predictor distribution as an error-variance assumption, and mistaking overall response variation for conditional error variation. Each claim should specify what is conditioned on and which feature—the mean, variance, or predictor distribution—is being discussed.
Common Mistake
Incorrect reasoning: “The average response rises as \(x\) increases, so the constant-variance assumption must be false.” A rising mean is not enough to support that conclusion; the conditional spread around each mean could remain the same.
Correction: Compare variation around the conditional mean at different predictor values. Homoskedasticity requires \(\operatorname{Var}(Y\mid\mathbf{x})=\sigma^2\) across those values. A separate question is whether the conditional mean has been specified appropriately.
Check Your Understanding
Answer each question by identifying whether it concerns the conditional mean, conditional variance, predictor distribution, or marginal variance.
- In a regression with two predictors, state the constant-variance assumption using the full predictor vector.
- If the conditional mean increases with \(x\) but the conditional variance is 9 for every \(x\), is the constant-variance assumption satisfied? Explain.
- A sample has many observations at one predictor value and few at another. Does that fact alone show heteroskedasticity? Why or why not?
- Explain why a marginal variance can be larger than the common conditional variance in a homoskedastic model.
- What is wrong with concluding that the assumption is proved because a residual plot shows no obvious spread pattern?