Tutorials › Regression Analysis (Undergraduate) › Fan Shapes and Changing Residual Spread

Residual and Assumption Diagnostics · Tutorial 497 of 991

Fan Shapes and Changing Residual Spread

Learn how to identify changing residual spread in a residual-versus-fitted plot without mistaking a changing center for a fan shape.

Intermediate 10 min read

What You'll Learn

  • Define constant conditional variance and describe how a fan shape appears in a residual-versus-fitted plot.
  • Distinguish a band that widens or narrows from residuals whose center shifts away from zero.
  • Compare residual spreads across fitted-value ranges using simple summaries.
  • Explain why changing spread can matter for regression inference.
  • Recognize why a fan pattern is evidence to investigate, not proof of a particular cause.

Why Look at Residual Spread?

A regression model describes a conditional mean: the average outcome expected at given predictor values. But observations at similar predictor values may vary around that average. A residual-versus-fitted plot helps assess whether this variation is roughly similar across the range of fitted values, or instead becomes larger or smaller. A band that widens or narrows is often called a fan shape.

The central question is not simply whether residuals are above or below zero. It is whether their vertical spread changes as fitted values change. A residual band can stay centered at zero yet widen, or have a fairly consistent thickness while its center shifts. Those patterns raise different concerns.

Definition: Suppose observations follow a regression model \(Y_i=\mu(x_i)+\varepsilon_i\), where \(x_i\) denotes the predictor information for observation \(i\), \(\mu(x_i)\) is the conditional mean, and \(\varepsilon_i\) is the error. The conditional variance is \(\operatorname{Var}(Y_i\mid x_i)\), the variability of outcomes around their conditional mean at a given predictor value. The constant-variance assumption is that this variance has the same value \(\sigma^2\) throughout the predictor range. A fitted value is \(\hat{y}_i\), and the residual is \(e_i=y_i-\hat{y}_i\).

In the familiar linear model, the conditional mean may be written \(\mu(x_i)=\beta_0+\beta_1x_i\). The residual-versus-fitted plot places \(\hat{y}_i\) on the horizontal axis and \(e_i\) on the vertical axis. When the fitted mean is appropriate, residuals should generally be scattered around zero. Under constant conditional variance, their typical vertical spread should also be broadly similar across the horizontal range.

This is a diagnostic expectation, not a demand that every plotted point fall within an identical band. Residuals vary randomly, and a small sample can make a constant spread look uneven. The question is whether there is a systematic widening or narrowing pattern rather than a few points that happen to be far from zero.

Reading the Shape: Center and Spread

Imagine drawing an informal horizontal line through the middle of the residual cloud at each part of the plot. That line represents the local center. The typical vertical distance of points from that center represents the local spread. A widening fan has increasing spread as fitted values increase; a narrowing fan has decreasing spread. Neither shape requires the local center to move away from zero.

By contrast, if the residual cloud’s center moves up or down while its thickness remains about the same, the main visual feature is a shift in center. For example, residuals might tend to be positive in one range and negative in another. That pattern concerns the fitted mean, not necessarily the conditional variance. A plot may also show both a shifting center and changing spread; then both features should be described rather than forcing the pattern into one category.

$$ \text{local center: } E(e\mid \hat{y}) \qquad \text{local spread: } \operatorname{Var}(e\mid \hat{y}) $$

These expressions are conceptual summaries of the residual cloud, not quantities we know exactly from a plot. Fitted values are estimates, and residuals are calculated after fitting the model. Still, separating the two questions—where the cloud is centered and how thick it is—makes the visual diagnosis more precise.

Why a Fan Can Indicate Changing Conditional Variance

The link between spread and variance follows from the definition of variance. If the true conditional mean is \(m(x)=E(Y\mid x)\), the average squared distance of outcomes from that mean, at a given \(x\), is the conditional variance. If this quantity grows across predictor conditions, outcomes are typically farther from their mean there. Residuals approximate those deviations, so a wider residual band can signal increasing conditional variance.

$$ \begin{aligned} E\left[(Y-g(x))^2\mid x\right] &=E\left[(Y-m(x)+m(x)-g(x))^2\mid x\right]\\ &=E\left[(Y-m(x))^2\mid x\right]+[m(x)-g(x)]^2\\ &=\operatorname{Var}(Y\mid x)+[m(x)-g(x)]^2. \end{aligned} $$

Here \(g(x)\) is a proposed fitted mean. To obtain the second line, expand the square. The cross-product has conditional expectation zero because \(E[Y-m(x)\mid x]=0\), while \(m(x)-g(x)\) is fixed at a given \(x\). The result shows why looking at the center matters: squared deviations from a fitted curve can be large because the variance is large, because the fitted mean differs from the true mean, or both. A fan shape is most persuasive as evidence about variance when the residual cloud remains roughly centered at zero.

In practice, the plot does not establish that the conditional variance changes. Its appearance depends on the amount and placement of data, and residuals are estimates of unobserved errors rather than the errors themselves. Treat a fan as a reason to investigate and report a possible nonconstant spread, not as a complete explanation of why it occurs.

Worked Example: A Band That Widens

Suppose a hypothetical fitted model gives residuals at four representative fitted values as shown below. The pairs are chosen for a simple illustration of the pattern; the repeated fitted values represent observations with the same fitted outcome.

Fitted value \(\hat{y}\)Residuals \(e_i\)Mean residualMean absolute residual
10-1, 101
20-2, 202
30-4, 404
40-6, 606

At each fitted value the residuals are centered at zero. For example, at \(\hat{y}=30\), the mean residual is \((-4+4)/2=0\), while the mean absolute residual is \((|-4|+|4|)/2=4\). Across the four fitted values, the mean absolute residuals are \(1,2,4,6\), so the typical distance from zero increases as the fitted value increases.

The band therefore widens without a corresponding shift in its center. This is evidence consistent with increasing conditional variability. It does not show that every observation at high fitted values must be more variable, or identify a cause for the pattern.

Worked Example: A Shifted Center Is Not a Fan

Worked Example: Similar Spread, Different Centers

Consider another hypothetical residual plot summarized by three fitted-value groups. In each group, the two residuals are one unit below and one unit above the group’s mean.

Fitted value \(\hat{y}\)Residuals \(e_i\)Mean residualMean absolute deviation from group mean
101, 321
20-5, -3-41
301, 321

For the first group, the center is \((1+3)/2=2\), and the mean absolute deviation from that center is \((|1-2|+|3-2|)/2=1\). The same calculation gives a spread of 1 in each group. Thus, the groups have similar thickness, even though their centers are different.

The pattern is a shift in the residual center: the cloud is above zero at fitted values 10 and 30, and below zero at 20. It is not evidence of a widening band. The example illustrates why comparing distance from the local center, as well as distance from zero, helps separate spread from offset. In a real plot, a changing center would prompt attention to the fitted mean; the plot alone does not tell us which model change, if any, would be appropriate.

Summarizing Spread Carefully

A plot is often enough to identify a broad pattern, but simple summaries can help describe it. One option is to divide the fitted-value range into a few groups and compare the mean absolute residual in each group. Another is to compare residual standard deviations. These are descriptive aids, not automatic pass-or-fail rules. Groups need enough observations to make their summaries useful, and the groups should cover the fitted range rather than being selected only to highlight a preferred pattern.

For residuals \(e_1,\ldots,e_k\) in one group, the sample standard deviation is calculated around that group’s mean residual:

$$ s_e=\sqrt{\frac{\sum_{i=1}^{k}(e_i-\bar{e})^2}{k-1}}, \qquad \bar{e}=\frac{1}{k}\sum_{i=1}^{k}e_i. $$

Centering the calculation on \(\bar{e}\) is important if the group has a nonzero center. A measure calculated only from distances to zero can combine a center shift with spread. Conversely, a spread summary cannot show the whole shape: two groups can have similar standard deviations but differ in skewness or contain different outlying values. Use numerical summaries to support, not replace, inspection of the plot.

Worked Example: A Band That Narrows

Suppose residuals from a hypothetical model have these values in three fitted-value ranges. Each group is centered at zero.

Fitted-value rangeResidualsMean absolute residual
Low-5, 5\((5+5)/2=5\)
Middle-3, 3\((3+3)/2=3\)
High-1, 1\((1+1)/2=1\)

The mean residual is zero in all three groups: for the low range, \((-5+5)/2=0\), and the other groups have the same property. The mean absolute residual declines from 5 to 3 to 1. Thus, this pattern is a narrowing band, not a shift in the residual center.

The appropriate conclusion is that the residual spread appears to decrease as fitted values increase, which may indicate nonconstant conditional variance. The summaries do not prove that the underlying conditional variance follows a particular numerical pattern; they describe what is visible in these hypothetical residuals.

Why Changing Spread Matters

A regression line or curve can still summarize an average relationship when conditional variance changes. The concern is that standard regression inference commonly relies on assumptions about error variability. If those assumptions do not hold, standard errors and related uncertainty measures may not have the accuracy claimed under the model. The extent of the consequence depends on the analysis; the residual plot is a diagnostic signal, not a calculation of how far an inferential result may be affected.

A fan can also make predictions less uniform in precision. If outcomes vary more at one part of the fitted range, a single summary of residual spread may obscure that difference. Describing which part of the range has the wider band gives readers useful context, even before deciding what further analysis is warranted.

The plot should be read alongside the model and data context. For example, a few distant points can make the upper part of the plot look wider, while a small number of observations can make any local spread estimate unstable. Describe the range and direction of a pattern, note whether the cloud remains centered near zero, and avoid claiming more than the diagnostic supports.

Common Mistakes

  • Calling any residual pattern a fan. A cloud whose center moves above or below zero with similar thickness is a center shift, not by itself changing spread. Describe the location and thickness separately.
  • Using distance from zero as the only measure of spread. A group centered away from zero can have large absolute residuals even if its thickness is unchanged. Check the local center as well.
  • Treating a fan as proof. A widening pattern is evidence consistent with changing conditional variability, not proof of its cause or a guarantee that the variance changes monotonically.
  • Expecting perfectly equal vertical bands under constant variance. Random samples fluctuate. Look for a systematic pattern rather than interpreting every local difference as a violation.
Key takeaway: In a residual-versus-fitted plot, a fan shape is a systematic change in vertical thickness. A band centered near zero that widens or narrows suggests changing conditional variability; a band of similar thickness whose center moves suggests a different issue with the fitted mean.

Check Your Understanding

Answer in terms of residual center, residual spread, and what the plot can support.

  1. A residual cloud remains centered near zero, but its vertical thickness increases from left to right. What pattern does this suggest?
  2. Residuals are mostly positive in one fitted-value range and mostly negative in another, while the band thickness is similar. Why is this not, by itself, a fan shape?
  3. In a fitted-value group, the residuals are \(-2, 2\). Calculate the mean residual and mean absolute residual.
  4. Why can a few large residuals make a plot look wider without establishing a systematic increase in conditional variance?
  5. What does a fan-shaped residual plot suggest, and what does it not prove?