Residuals and Validating Competing Models
Practise this section (12)Emma and Malik both track the daily views of their school's new cooking video. Emma fits a line to the data. Malik fits an exponential curve. Both curves pass close to the points, and each says, "Mine is better!" How can you settle it with evidence instead of opinion? In this section you will learn to measure how far a model misses each data point, to read the pattern of those misses, and to decide which model to trust.
Residuals: how far off is the model?
A model never matches real data exactly. A residual measures the miss at one data point.
The sign tells you the direction of the miss:
-
Positive residual: the actual value is above the prediction, so the model underestimates.
-
Negative residual: the actual value is below the prediction, so the model overestimates.
-
Residual of 0: the model hits the point exactly.
On a graph, a residual is the vertical segment between the data point and the model.
The model line and three data points (filled dots, "actual") with their predicted values (open circles, "predicted"). Each vertical segment is a residual = actual − predicted: +2, −1 and +2 thousand views.To interpret a residual in a sentence, use this template: "At $x = \underline{\ }$, the actual value was $\underline{\ }$ units above (or below) the model's prediction."
A data point is $(4, 20)$, and a model predicts $\hat{y}=17.5$ when $x=4$. Compute the residual, defined as actual value minus predicted value. Does the model…
A data point is $(4, 20)$, and a model predicts $\hat{y}=17.5$ when $x=4$. Compute the residual, defined as actual value minus predicted value. Does the model underestimate or overestimate at this point?
The linear model $L(x)=2x+1$ is used for the data points $(1,3)$, $(2,6)$, and $(3,6)$. Compute the predicted value and the residual at each point.
The linear model $L(x)=2x+1$ is used for the data points $(1,3)$, $(2,6)$, and $(3,6)$. Compute the predicted value and the residual at each point.
Residual plots: reading the pattern
One residual tells you about one point. To judge a whole model, plot all the residuals at once.
Then ask one question: is there a pattern?
-
No pattern: the points bounce above and below 0 in a haphazard way. The model's shape matches the data. The leftover misses are just random noise. The model is appropriate.
-
A pattern, such as a U-shape or an arch: the residuals are positive in one stretch and negative in another. The model's shape is wrong. It systematically misses in a predictable way, so a different family of functions is needed.
Why does a pattern matter? If the model had the right shape, the misses would have no reason to depend on $x$. A U-shape means the model is too low at the ends and too high in the middle (or the other way around). The data bend in a way the model cannot.
A U-shaped residual plot from a line tells you something specific. The data lie above the line at both ends and below it in the middle, so the data are concave up. Think of exponential growth or a quadratic. An arch (the reverse) means the data are concave down, as in growth that levels off.
A linear model is fit to six data points. Its residuals for $x=1,\dots,6$ are $+3,\ +1,\ -2,\ -3,\ -1,\ +4$. Describe the pattern of the residual plot. Is a linear model…
A linear model is fit to six data points. Its residuals for $x=1,\dots,6$ are $+3,\ +1,\ -2,\ -3,\ -1,\ +4$. Describe the pattern of the residual plot. Is a linear model appropriate for these data? Explain.
An exponential model has residuals $+0.4,\ -0.3,\ +0.2,\ -0.5,\ +0.1,\ +0.3$ for $x=1,\dots,6$. Describe what you see in the residual plot. Does it suggest that the…
An exponential model has residuals $+0.4,\ -0.3,\ +0.2,\ -0.5,\ +0.1,\ +0.3$ for $x=1,\dots,6$. Describe what you see in the residual plot. Does it suggest that the model is appropriate? Why?
The same data set is modeled two ways. Residuals for $x=1,\dots,6$: Linear model: $4.2,\ 1.1,\ -1.8,\ -3.5,\ -2.0,\ 2.4$. Exponential model:…
The same data set is modeled two ways. Residuals for $x=1,\dots,6$:
Linear model: $4.2,\ 1.1,\ -1.8,\ -3.5,\ -2.0,\ 2.4$.
Exponential model: $0.6,\ -0.8,\ 0.3,\ -0.2,\ 0.7,\ -0.5$.
Describe each residual plot, state which model is more appropriate for these data, and explain what the other plot reveals about the shape of the data.
Comparing two competing models
When two models are proposed for the same data, compute the residuals for both and compare them using two criteria:
-
Pattern. A model whose residuals show a clear pattern has the wrong shape. A model whose residuals look random has a shape that fits.
-
Size. Among models with no pattern, prefer the one whose residuals are smaller. A quick measure is the largest absolute residual, $\max |y - \hat{y}|$. Always judge "small" relative to the size of the $y$-values.
Pattern comes first. A model with a pattern can have some tiny residuals and still be the wrong model.
Here are the weekly users (in thousands) of a new app, and two proposed models.
| Week $x$ | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| Users $y$ | 4.1 | 6.3 | 8.8 | 13.9 | 20.0 |
$L(x) = 3.94x + 2.74$ (linear) and $E(x) = 4(1.5)^x$ (exponential).
Weekly users (thousands) for weeks 0 to 4, with the linear and exponential models. The points lie above the line at the ends and below it in the middle (a U pattern); the exponential curve stays close to every point.The data are: $x=0,1,2,3,4$ and $y=3,6,12,24,48$. Two models are proposed: $L(x)=10.8x-3$ (linear) and $E(x)=3\cdot 2^x$ (exponential). (a) Compute the residuals of both…
The data are: $x=0,1,2,3,4$ and $y=3,6,12,24,48$. Two models are proposed: $L(x)=10.8x-3$ (linear) and $E(x)=3\cdot 2^x$ (exponential).
(a) Compute the residuals of both models at all five points.
(b) Describe the residual pattern of the linear model.
(c) Decide which model is more appropriate and justify.
(Calculator active) Subscribers to a streaming service (in millions), with $x$ years since 2018: $x=0,1,2,3,4$ and $y=2.0, 2.9, 4.1, 6.2, 8.8$. Two models are…
(Calculator active) Subscribers to a streaming service (in millions), with $x$ years since 2018: $x=0,1,2,3,4$ and $y=2.0, 2.9, 4.1, 6.2, 8.8$. Two models are $L(x)=1.69x+1.42$ and $E(x)=2.0(1.45)^x$.
(a) Compute the residual at $x=3$ for each model.
(b) The residuals of $L$ at $x=0,\dots,4$ are $0.58, -0.21, -0.70, -0.29, 0.62$. Describe their pattern.
(c) Choose a model and justify. Then use it to predict $y$ when $x=8$.
(Calculator active) The data are $x=1,\dots,6$ and $y=5,8,13,21,34,55$. Two models are given: $L(x)=9.6x-10.9$ and $E(x)=3.1\,(1.62)^x$. (a) Compute the residuals for…
(Calculator active) The data are $x=1,\dots,6$ and $y=5,8,13,21,34,55$. Two models are given: $L(x)=9.6x-10.9$ and $E(x)=3.1\,(1.62)^x$.
(a) Compute the residuals for both models, rounded to one decimal place.
(b) Compare the largest absolute residual of each model.
(c) Describe the sign pattern of each model's residuals. What does the pattern of the exponential residuals tell you?
(d) Argue which model you would use to predict $y$ at $x=8$, and compute that prediction.
What the data's structure tells you
Before you fit anything, you can often guess the family of the model from the data itself. Suppose the $x$-values are equally spaced. Then compare the $y$-values in three ways:
| Test | If it is (nearly) constant | Family |
|---|---|---|
| First differences $y_{n+1} - y_n$ | yes | linear |
| Ratios $y_{n+1} \div y_n$ | yes | exponential |
| Second differences (differences of the differences) | yes | quadratic |
Why do these work? A linear function adds the same amount at every step. An exponential function multiplies by the same factor at every step. A quadratic function $ax^2 + bx + c$ has first differences that change by the same amount, $2a$, at every step.
Real data are noisy, so the tests are only approximately true. Use them to choose candidates, then confirm with residual plots.
Olivia says, "The data are increasing and curved, so the model must be exponential." The data are $x=0,1,2,3,4,5$ and $y=2,3,6,11,18,27$. (a) Compute the ratios of…
Olivia says, "The data are increasing and curved, so the model must be exponential." The data are $x=0,1,2,3,4,5$ and $y=2,3,6,11,18,27$.
(a) Compute the ratios of consecutive $y$-values and decide whether they support an exponential model.
(b) Compute the first and second differences and decide what family fits better.
(c) Find a formula that fits all six points.
(d) Write a short argument that responds to Olivia's claim.
Beyond the residuals: context and extrapolation
Good residuals tell you the model fits the data you already have. They do not guarantee that the model works outside that range.
-
Interpolation means predicting inside the range of your data. This is usually safe if the residuals are small and patternless.
-
Extrapolation means predicting beyond the range of your data. This is risky, because you are assuming the trend keeps going unchanged.
Every model carries an assumption. A linear model assumes a constant rate of change forever. An exponential model assumes a constant growth factor forever. Real situations have limits, such as a school with a fixed number of students or a pond with a fixed capacity. When a prediction breaks the context, the assumption has failed, whatever the residuals said.
The model E(x) = 8·2^(x−1) climbs past the dashed line at 500, the school's size, near day 7. Beyond that point it predicts more users than students, so the extrapolation breaks the context.Residuals can also fail to settle a debate. If two models both leave small, patternless residuals, the data cannot separate them. Then compare their long-term predictions and ask which assumptions fit the context.
A rumor spreads in a grade of 60 students. The number of students who have heard it after hours $1$ through $5$ is $4, 9, 20, 38, 55$. An exponential model's residuals…
A rumor spreads in a grade of 60 students. The number of students who have heard it after hours $1$ through $5$ is $4, 9, 20, 38, 55$. An exponential model's residuals are $1.5,\ 2.0,\ 3.1,\ -1.0,\ -5.6$.
(a) Describe the pattern of the residuals.
(b) Explain why an exponential model is not appropriate in the long run, using both the residuals and the context.
(Calculator active) A fish population (in hundreds) is recorded at $x=0,\dots,5$ as $20, 23, 27, 30, 35, 40$. Two models are $L(x)=4x+20$ and $E(x)=20(1.15)^x$. (a)…
(Calculator active) A fish population (in hundreds) is recorded at $x=0,\dots,5$ as $20, 23, 27, 30, 35, 40$. Two models are $L(x)=4x+20$ and $E(x)=20(1.15)^x$.
(a) Compute the residuals for both models, rounded to one decimal place. Do the residuals alone clearly favor either model?
(b) Compute both models' predictions for $x=20$.
(c) The pond can hold at most 20,000 fish (200 hundred). Argue which model is more reasonable for long-term prediction, and which assumption of each model is questionable.
An exponential model $E(x)=10(1.25)^x$ is fit to the data $(1,12),(2,16),(3,19),(4,25)$. (a) Compute each predicted value and each residual, rounded to one decimal…
An exponential model $E(x)=10(1.25)^x$ is fit to the data $(1,12),(2,16),(3,19),(4,25)$.
(a) Compute each predicted value and each residual, rounded to one decimal place.
(b) Interpret the residual at $x=3$ in a sentence.
(c) The residuals have no clear pattern. Does that prove the true relationship is exactly exponential? Argue why or why not.
Summary
-
Residual $= y - \hat{y}$ (actual − predicted). Positive means the model underestimates, and negative means it overestimates. It is the vertical gap between the point and the model.
-
A residual plot graphs $(x, \text{residual})$. Random scatter around 0 means the model's shape fits. A U-shape or an arch means the shape is wrong.
-
To compare models, check the pattern first, then the size (for example, the largest absolute residual).
-
For equally spaced $x$: constant first differences mean linear, constant ratios mean exponential, and constant second differences mean quadratic.
-
"Increasing and curved" does not mean exponential. Test the ratios and differences.
-
Residuals cover only the data you have. Extrapolation can break the context (school size, pond capacity), and a good fit never proves the model is exactly right.
-
Back to the start: Emma and Malik settle their argument by computing residuals for both curves. The line's residuals form a U-shape, while the exponential's look random and are smaller, so Malik's model is the better one for those views.
Can't find your problem here?
The AI checks one of your exercises: paste the problem with your answer or take a photo of it.