Tutorials › Regression Analysis (Undergraduate) › Residual Patterns That Signal Missing Curvature

Choosing and Explaining Nonlinear Forms · Tutorial 472 of 991

Residual Patterns That Signal Missing Curvature

Learn to calculate and read residuals against a predictor, using their sign sequence and shape to recognize when a fitted mean curve may be too simple.

Advanced 10 min read

What You'll Learn

  • Define residuals and describe the assumptions relevant to checking a fitted mean curve.
  • Calculate least-squares residuals and recognize an arc in their pattern against a predictor.
  • Explain why omitted curvature can create systematic positive and negative residual regions.
  • Distinguish evidence of a misshaped mean from proof that a particular alternative curve is correct.
  • Identify common errors in reading residual plots, including treating random sign changes as decisive evidence.

Why Residual Shape Matters

A fitted regression curve can look plausible when drawn over the data and still miss a systematic feature of the relationship. Residuals help expose that mismatch: they show how far each observed response lies above or below the fitted mean. When residuals tend to be positive in one part of the predictor range and negative in another, their pattern can indicate that the fitted curve is too simple or has the wrong shape.

The aim here is focused: read residuals against a predictor as evidence about the shape of a fitted mean. A curved residual pattern is a reason to investigate the mean specification, not proof that one particular alternative curve is correct. It is also important to inspect the residuals in predictor order. A list of residuals with no information about the corresponding predictor values can conceal the pattern of interest.

Definition: For observation \(i\), let \(y_i\) be the observed response and let \(\hat{y}_i\) be the value predicted by the fitted regression curve at predictor value \(x_i\). The residual is \(e_i=y_i-\hat{y}_i\). A positive residual means the observation is above the fitted curve; a negative residual means it is below the curve.

Model and Assumptions for a Shape Check

Suppose the conditional mean response at predictor value \(x\) is \(m(x)=E(Y\mid X=x)\). A fitted curve gives a proposed mean \(g(x)\), so its prediction at \(x_i\) is \(\hat{y}_i=g(x_i)\). For a residual plot to be informative about mean shape, the observations should be independent, and the response should be describable as

$$ Y_i=m(x_i)+\varepsilon_i,\qquad E(\varepsilon_i\mid x_i)=0. $$

The zero conditional mean says that, at a given predictor value, errors do not systematically push responses up or down. If the proposed curve \(g\) captures the conditional mean adequately, the residuals should fluctuate around zero without a persistent shape as \(x\) changes. No normality assumption is needed to look for a visual pattern. This check concerns the location of the residuals around zero; it is not a check of whether their spread changes.

In practice, plot \(e_i\) vertically against \(x_i\) horizontally, include a horizontal reference line at zero, and look for how the signs and typical residual sizes evolve from low to high values of the predictor. The residuals need not alternate signs. Random data can produce short runs of the same sign. The evidence of concern is a coherent, sustained pattern—such as positive residuals at both ends and negative residuals in the middle—rather than an isolated sequence.

How Missing Curvature Creates a Residual Arc

The basic reason is a difference between the true mean \(m(x)\) and the proposed mean \(g(x)\). Write an observation as \(Y=m(x)+\varepsilon\). Subtracting the proposed fitted value gives

$$ Y-g(x)=\{m(x)-g(x)\}+\varepsilon. $$

At each fixed \(x\), the expected difference is therefore

$$ E\{Y-g(x)\mid X=x\} =m(x)-g(x)+E(\varepsilon\mid X=x) =m(x)-g(x). $$

Thus, if the true mean bends away from a straight fitted line, the expected residuals also bend away from zero. For example, if the true mean is U-shaped but a straight line is fitted, the line may lie above the mean in the middle and below it near the ends. Residuals then tend to be negative in the middle and positive near both ends. The observed residuals also contain random error, so a small sample may obscure or distort this pattern.

This calculation explains the diagnostic, but it does not make each fitted residual an unbiased direct measurement of \(m(x_i)-g(x_i)\). The curve parameters are estimated from the same data, and that estimation imposes constraints on the residuals. For instance, a least-squares line with an intercept has residuals that sum to zero and have zero sample linear association with the predictor. Those constraints do not remove a visible arc; they explain why the evidence is typically a curved sequence of signs and values rather than residuals that are all positive or all negative.

Worked Example: A U-Shaped Mean Fitted With a Line

Suppose a hypothetical response is measured at predictor values \(x=-2,-1,0,1,2\), with observed values \(y=2,2.5,4,6.5,10\). Fit a least-squares straight line and inspect its residuals. Treat the predictor as measured in arbitrary units and the response in response units.

The predictor mean is \(\bar{x}=0\), and the response mean is \(\bar{y}=5\). The least-squares slope is

$$ b_1=\frac{\sum (x_i-\bar{x})(y_i-\bar{y})}{\sum (x_i-\bar{x})^2} =\frac{(-2)(-3)+(-1)(-2.5)+(0)(-1)+(1)(1.5)+(2)(5)}{4+1+0+1+4} =\frac{20}{10}=2. $$

The fitted intercept is \(b_0=\bar{y}-b_1\bar{x}=5\), so the fitted line is \(\hat{y}=5+2x\). The residuals are observed minus fitted:

$$ \begin{array}{c|rrrrr} x_i&-2&-1&0&1&2\\ y_i&2&2.5&4&6.5&10\\ \hat{y}_i&1&3&5&7&9\\ e_i=y_i-\hat{y}_i&1&-0.5&-1&-0.5&1 \end{array} $$

For instance, at \(x=-1\), \(e_i=2.5-3=-0.5\) response units; at \(x=2\), \(e_i=10-9=1\) response unit. The sign sequence is positive, negative, negative, negative, positive. The line overpredicts through the middle and underpredicts at the ends. That systematic arc is evidence that a straight mean may be missing curvature. It does not, by itself, establish what curved model should replace it.

Reading Runs, Arcs, and Sign Changes

A run is a consecutive group of residuals with the same sign when observations are ordered by predictor value. Long runs can show that the fitted curve consistently lies on one side of the data over a region. A transition from a run of positive residuals to a run of negative residuals, or the reverse, can signal that the curve crosses from underpredicting to overpredicting as the predictor changes.

An arc is a smooth bend in the residual pattern. A common shape is positive residuals at both ends and negative residuals in the middle, as in a U-shaped departure from a line. The opposite pattern—negative at both ends and positive in the middle—can occur when a concave-down mean is fitted with a line. More complicated curvature can create multiple changes in sign, though a short or noisy dataset may not display a clean shape.

The interpretation is always relative to the fitted curve. Positive residuals do not mean that the responses themselves are large in an absolute sense; they mean that the responses are larger than the curve predicts at those predictor values. Similarly, a negative residual means the fitted curve overpredicts the observation. The central question is whether the residuals show a persistent structure in predictor order that a plausible mean curve has failed to capture.

Worked Example: An Inverted Arc

For a second hypothetical dataset, suppose \(x=0,1,2,3,4\) and \(y=1,4,5,4,1\). Fit a least-squares line and examine whether its residuals show a coherent shape.

Here \(\bar{x}=2\) and \(\bar{y}=3\). The slope numerator is \(({-2})(-2)+({-1})(1)+(0)(2)+(1)(1)+(2)(-2)=0\), while the slope denominator is \(4+1+0+1+4=10\). Therefore \(b_1=0/10=0\), and \(b_0=\bar{y}-b_1\bar{x}=3\). The fitted line is \(\hat{y}=3\).

Subtracting 3 from each observed response gives residuals \(-2,1,2,1,-2\), in increasing order of \(x\). They are negative at both ends and positive through the middle. The line underpredicts the central observations and overpredicts the end observations, which is an inverted-arc pattern. It is evidence against a straight conditional mean for these data, not proof that the response follows a particular quadratic law.

Worked Example: A Noisy Arc in a Small Dataset

A residual pattern need not be perfectly symmetric or exact to be informative. Consider hypothetical observations \(x=-2,-1,0,1,2\) and \(y=2.2,2.4,4.1,6.4,9.9\). Fit a straight line by least squares. The predictor mean is zero, the response mean is \(25/5=5\), and

$$ b_1=\frac{(-2)(2.2)+(-1)(2.4)+(0)(4.1)+(1)(6.4)+(2)(9.9)}{10} =\frac{19.4}{10}=1.94,\qquad b_0=5. $$

The fitted values are \(1.12,3.06,5,6.94,8.88\), from \(\hat{y}=5+1.94x\). Subtracting these from the observed values gives

$$ \begin{array}{c|rrrrr} x_i&-2&-1&0&1&2\\ e_i&2.2-1.12&2.4-3.06&4.1-5&6.4-6.94&9.9-8.88\\ &1.08&-0.66&-0.90&-0.54&1.02 \end{array} $$

The signs are positive, negative, negative, negative, positive. The end residuals are above zero and the central residuals are below it, a broad U-shaped pattern despite the small departures from symmetry. A reasonable reading is that the line may be too simple to represent the mean relationship. It would be an overstatement to claim that these five observations prove a particular curved form: random variation can produce an imperfect pattern, and further assessment is needed.

What a Residual Pattern Can and Cannot Establish

Residual patterns are diagnostic evidence, not a mechanical curve-selection rule. A coherent arc makes the fitted mean shape questionable, but it does not identify a unique correct replacement. Different curved forms can produce similar behavior over a limited predictor range, and a small number of observations can make apparent structure unstable. Subject knowledge and the range of observed predictor values remain important when considering a revised form.

Likewise, the absence of a visible arc is not proof that the mean form is correct. A real departure may be masked by noise, too few observations, or limited coverage of the predictor range. Residuals show how the current fit performs on these observations; they do not guarantee that the same shape will describe new data.

When inspecting a plot, focus on the vertical center of the residual cloud as \(x\) changes. Ask whether it stays near zero or traces a sustained bend or sequence of same-sign regions. Do not treat every short run as evidence of curvature: even random residuals sometimes share signs by chance. Also keep the scale and context in view. A small systematic bend may matter in a setting where accurate predictions are important, while a visually noticeable but practically tiny departure may have limited consequences.

Common Mistakes

  • Reading signs without predictor order. A sequence such as positive, negative, positive, negative has little shape meaning if it is not arranged by \(x\). Plot residuals against the predictor and read from low to high values.
  • Calling any run proof of curvature. Short runs occur by chance. Look for a coherent pattern that persists across a meaningful part of the predictor range, and describe it as evidence rather than certainty.
  • Reversing the residual interpretation. Since \(e_i=y_i-\hat{y}_i\), a positive residual means the fitted curve underpredicts that observation; a negative residual means it overpredicts.
  • Assuming an arc names the correct alternative. A curved residual pattern challenges the current mean shape but does not prove that a quadratic or any other specific form is appropriate.
  • Confusing residual shape with the responses' overall trend. Residuals are deviations from the fitted curve. The diagnostic question is whether those deviations change systematically with \(x\), not whether \(y\) itself rises or falls.
Key takeaway: A sustained sequence of positive and negative residual regions, or a clear arc against the predictor, suggests that the fitted mean curve may be missing curvature. Treat the pattern as a prompt for careful reassessment, not as proof of a particular model.

Check Your Understanding

Use the definitions and examples above to answer these questions.

  1. If \(y_i=14\) and \(\hat{y}_i=16\), what is the residual, and does the fitted curve overpredict or underpredict this observation?
  2. A residual plot has negative residuals at both ends of the predictor range and positive residuals near the middle. Describe the pattern and what it suggests about a fitted straight mean.
  3. Why is a run of three positive residuals not, by itself, proof that the fitted mean is misshaped?
  4. In the decomposition \(Y-g(x)=\{m(x)-g(x)\}+\varepsilon\), what does the term \(m(x)-g(x)\) represent?
  5. Why does finding an arc in a residual plot not establish which alternative curve is correct?