Tutorials › Regression Analysis (Undergraduate) › Distinguishing Curvature from Unequal Spread

Residual and Assumption Diagnostics · Tutorial 506 of 991

Distinguishing Curvature from Unequal Spread

Compare where residuals are centered with how widely they spread to distinguish a changing mean pattern from changing variability.

Intermediate 10 min read

What You'll Learn

  • Define residual centers and widths within groups of fitted values.
  • Diagnose a changing mean pattern from systematic shifts in residual centers.
  • Diagnose changing spread by comparing residual widths across fitted-value ranges.
  • Recognize plots in which center and spread patterns occur together.
  • Use grouped summaries while noting what a residual plot cannot establish.

Why Separate Center from Width?

A residual plot can show more than one kind of pattern at once. As fitted values increase, the residual cloud might shift up and down, become wider or narrower, or do both. These features have different diagnostic meanings: shifts in the cloud's center suggest a mismatch in the fitted mean pattern, while changes in its width suggest that residual variability changes across the fitted-value range.

The distinction matters because an expanding cloud can make a curved pattern harder to see, and a curved pattern can make the overall vertical spread appear larger in some regions. Looking only at the outer envelope of the points can therefore lead to the wrong diagnosis. The useful questions are: where is the middle of the cloud at each fitted-value range, and how far do points typically lie from that middle?

Set-Up: Residuals Across Fitted Values

For observations \(i=1,\ldots,n\), let \(y_i\) be the observed response and \(\hat{y}_i\) its fitted value from the regression model. The residual is the observed response minus its fitted value. A residual-versus-fitted plot places \(\hat{y}_i\) on the horizontal axis and the residual on the vertical axis.

$$ e_i=y_i-\hat{y}_i $$

The diagnostic target is a model whose mean pattern is adequate and whose residual spread is reasonably similar across the fitted-value range. In such a plot, residuals should be distributed around zero without a systematic center trend, and their vertical width should not change markedly. These are visual expectations, not guarantees that a model is correct. A residual plot supplies evidence for a diagnosis; it is not, by itself, a formal test or proof.

Definition: For a selected range of fitted values, the residual center is the typical vertical location of the residuals in that range, often summarized by their arithmetic mean. The residual width is how dispersed those residuals are around their center, summarized, for example, by their sample standard deviation or interquartile range.

A practical way to compare centers and widths is to divide the horizontal axis into a few fitted-value ranges and summarize the residuals in each range. The ranges should be broad enough to contain several observations, but not so broad that meaningful changes are hidden. The summaries are aids to reading the plot, not a replacement for looking at the individual points.

A Short Justification: Why the Two Features Must Be Separated

Suppose one fitted-value range contains \(n_j\) residuals, denoted \(e_{1j},\ldots,e_{n_jj}\), with mean \(\bar{e}_j\). Write each residual as its deviation from the range's center plus that center. On squaring and adding, the cross-product disappears because the deviations from their mean sum to zero:

$$ \begin{aligned} \sum_{i=1}^{n_j} e_{ij}^2 &=\sum_{i=1}^{n_j}\left[(e_{ij}-\bar{e}_j)+\bar{e}_j\right]^2\\ &=\sum_{i=1}^{n_j}(e_{ij}-\bar{e}_j)^2+n_j\bar{e}_j^2. \end{aligned} $$

Thus the average squared distance of residuals from zero combines two quantities: spread around the range's center and the squared distance of that center from zero. A large overall vertical distance from zero does not tell us which quantity is responsible. We must inspect the center and width separately. For a group with at least two observations, its sample standard deviation \(s_j\) measures within-group width; the identity can also be written as

$$ \frac{1}{n_j}\sum_{i=1}^{n_j}e_{ij}^2 =\frac{n_j-1}{n_j}s_j^2+\bar{e}_j^2. $$

Reading the Pattern of Centers

A center pattern is systematic when the typical residual changes across fitted values in an organized way rather than fluctuating randomly around zero. For example, centers that are positive at low and high fitted values but negative in the middle form a curved pattern. The residuals indicate that the observed responses tend to lie above the fitted values at the ends of that range and below them in the middle. This is evidence that the fitted mean pattern may be inadequate.

The direction depends on the residual convention \(e_i=y_i-\hat{y}_i\). A positive center means observed responses tend, on average, to exceed fitted responses in that range; a negative center means they tend to fall below. Neither direction alone identifies the correct alternative model. The pattern is a prompt to examine the mean form and the context, not a license to declare a particular curve necessary.

Worked Example: Curved Centers with Similar Widths

Suppose a hypothetical residual plot is summarized in four equally sized fitted-value ranges. Each range contains five residuals. The residuals are:

Range 1: \(1, 2, 2, 2, 3\).
Range 2: \(-3, -2, -2, -2, -1\).
Range 3: \(-3, -2, -2, -2, -1\).
Range 4: \(1, 2, 2, 2, 3\).

For Range 1, the center is \((1+2+2+2+3)/5=10/5=2\). Deviations from 2 are \(-1,0,0,0,1\), so its sample standard deviation is

$$ s_1=\sqrt{\frac{(-1)^2+0^2+0^2+0^2+1^2}{5-1}} =\sqrt{\frac{2}{4}} \approx 0.7071. $$

Range 2 has center \((-3-2-2-2-1)/5=-10/5=-2\). Its deviations from \(-2\) are \(-1,0,0,0,1\), giving the same sample standard deviation, \(\sqrt{2/4}\approx0.7071\). Ranges 3 and 4 repeat these respective summaries. The centers across the four ranges are therefore \(2,-2,-2,2\), while all four widths are approximately \(0.7071\).

The sequence of centers is curved: residuals are positive at the low and high ends and negative in the middle. Since the widths are alike, the primary visible feature is a changing mean pattern, not an expanding or contracting spread. This diagnosis describes the residual pattern; it does not prove which mean form should replace the fitted one.

Reading the Pattern of Widths

A width pattern concerns the vertical distance of observations from their local center, not the center's position. If residuals remain centered near zero but become progressively more dispersed as fitted values increase, that is evidence of changing residual spread. A funnel or fan shape is one familiar visual form, but width can change in other ways, such as being largest in the middle or narrowing at one end.

Compare widths relative to the centers. A band can have a large range simply because it contains an unusual point, so consider the overall cloud and, where useful, a statistic that is less affected by extremes, such as the interquartile range. Width summaries are noisy, especially when a fitted-value range contains few observations. A modest difference between two ranges is not automatically a meaningful pattern.

Worked Example: Increasing Width with Centers Near Zero

In a hypothetical plot, four fitted-value ranges each contain five residuals:

Range 1: \(-1,0,0,0,1\).
Range 2: \(-2,0,0,0,2\).
Range 3: \(-3,0,0,0,3\).
Range 4: \(-4,0,0,0,4\).

The center of every range is zero. For Range 1, the sample standard deviation is \(\sqrt{(1+1)/4}=\sqrt{0.5}\approx0.7071\). For Range 2 it is \(\sqrt{(4+4)/4}=\sqrt{2}\approx1.414\); for Range 3 it is \(\sqrt{(9+9)/4}=\sqrt{4.5}\approx2.121\); and for Range 4 it is \(\sqrt{(16+16)/4}=\sqrt{8}\approx2.828\).

The centers stay at zero, but the widths grow steadily. This is primarily a changing-spread pattern. Calling it curvature would confuse the increasing distance of points from zero with a systematic shift in their typical location.

When Centers and Widths Both Change

The two diagnoses are not mutually exclusive. A residual cloud can shift away from zero in a curved pattern while also becoming wider or narrower. In that case, report both features. Describing only the center misses information about variability; describing only the width can hide systematic underprediction or overprediction across fitted values.

Worked Example: Curved Centers and Increasing Width

Consider four hypothetical fitted-value ranges with five residuals each:

Range 1: \(1,2,2,2,3\).
Range 2: \(-4,-2,-2,-2,0\).
Range 3: \(-5,-2,-2,-2,1\).
Range 4: \(-2,2,2,2,6\).

In Range 1, the mean is \(10/5=2\), and the deviations \(-1,0,0,0,1\) give \(s_1=\sqrt{2/4}\approx0.7071\). In Range 2, the sum is \(-10\), so the mean is \(-2\); its deviations from \(-2\) are \(-2,0,0,0,2\), giving \(s_2=\sqrt{(4+4)/4}=\sqrt{2}\approx1.414\).

Range 3 also has mean \(-2\). Its deviations are \(-3,0,0,0,3\), so \(s_3=\sqrt{(9+9)/4}=\sqrt{4.5}\approx2.121\). Range 4 has mean \(10/5=2\); its deviations are \(-4,0,0,0,4\), so \(s_4=\sqrt{(16+16)/4}=\sqrt{8}\approx2.828\).

The centers \(2,-2,-2,2\) suggest a curved mean pattern, and the widths \(0.7071,1.414,2.121,2.828\) increase across the ranges. The appropriate description is therefore both: systematic curvature in the centers and increasing residual spread. The summaries do not tell us whether either feature is practically important in the original response units; that judgment requires the outcome scale and context.

A Practical Comparison

When the pattern is difficult to classify by eye, use the following sequence. It keeps the center question separate from the width question and encourages a conclusion proportional to the evidence.

1
Check the residual centers.
Across fitted-value ranges, ask whether the typical residual remains near zero or follows an organized rise, fall, or curve.
2
Check the residual widths.
Compare vertical dispersion around each range's own center, using the plot and, if helpful, comparable spread summaries.
3
State the evidence separately.
Describe a changing center, changing width, both, or no clear systematic pattern. Avoid forcing a single label when two features are present.
4
Qualify the conclusion.
Note sparse ranges, isolated extreme points, or other limits that make the visual comparison uncertain.
Residual centers across fitted valuesResidual widthsPrimary reading
Patterned movement away from and back toward zeroRoughly similarEvidence of a changing mean pattern, such as curvature
Near zero without an organized trendIncreasing or decreasingEvidence of changing spread
Patterned movementAlso changingEvidence of both mean-pattern and spread features
Near zero without an organized trendRoughly similarNo prominent pattern of these two kinds is apparent

Common Mistake: Calling Every Fan Shape Curvature

Wrong reasoning: “The residuals are much farther from zero on the right, so their average must be changing; this is curvature.” That conclusion treats distance from zero as if it were the same as the location of the center. A cloud can remain centered at zero while its width increases substantially.

Correction: Estimate or inspect the center within successive fitted-value ranges, then compare the spread around each center. A curved sequence of centers is evidence about the mean pattern. A stable center paired with changing widths is evidence about spread. If both summaries change, describe both. Neither visual feature alone establishes its cause, and a plot with few observations per range may not support a firm distinction.

Key takeaway: In a residual-versus-fitted plot, read the vertical location and vertical width as separate features. A systematic center pattern points toward a mean-pattern concern; changing width points toward a spread concern. The same plot may show either feature or both.

Check Your Understanding

For each question, focus on the difference between residual location and residual dispersion.

  1. Across three fitted-value ranges, the residual centers are approximately \(0, 0, 0\), while the sample standard deviations are \(1, 2, 3\). What is the primary diagnostic feature?
  2. Residual centers are positive at low and high fitted values and negative in the middle, while widths appear similar. What does this pattern suggest?
  3. Why is the overall average squared residual distance from zero not enough to distinguish a shifted center from a wider cloud?
  4. A residual plot appears to have both a curved center pattern and increasing width. How should the diagnosis be reported?
  5. Why should a difference in sample standard deviations based on very small fitted-value ranges be interpreted cautiously?