Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 7

Comparing Model Predictions with Observed Data

Recommended resources

Hello! In the previous lesson, you used standard deviation to describe how much repeated measurements vary around their mean. Now the question changes: how well do a model’s predictions agree with observed values?

You have already worked with quadratic and exponential functions. In this final lesson of the maths module, you will compare predictions from linear, quadratic, and exponential models, calculate the differences between predictions and observations, and use those differences to make a justified choice of model. This is useful in coursework whenever an equation is meant to describe data rather than just produce answers.


A prediction can miss in two directions

Suppose a model predicts a gas volume of at a particular time, but the measured volume is . The model underestimates the observation by . We record that signed difference as a residual:

Here the residual is . If the model had predicted , the residual would instead be : a negative residual means the model overestimates the observation. Residuals have the same units as the measured quantity.

Watch how a point’s vertical distance from a fitted line becomes a signed residual. The final segment explains why adding residuals directly is a poor way to judge overall fit.

Introduction to residuals and least squares regression

In “Introduction to residuals and least squares regression,” Khan Academy connects observed points to model predictions and introduces a way to combine their differences.

Watch signed residuals for the observed-minus-predicted calculation. Continue with squared residuals, focusing on why a positive miss and a negative miss should not cancel when judging a model.

Squaring each residual before adding gives the sum of squared residuals, often called SSE:

Here is an observed value and is the model’s prediction at the same input . For models compared on the same observations and output scale, a smaller SSE indicates predictions closer to those observations overall. Because squaring gives extra weight to large misses, also inspect the individual residuals; one unusually large miss can dominate the total.



Compare three candidate models

Imagine recording a response , in measured units, at times . Three candidate models have been proposed. They are supplied for comparison—not necessarily calculated as best-fitting regressions.

Time Observed Linear Quadratic Exponential , approximately
0 10 10 10 10.0
1 14 16 13 13.5
2 18 22 18 18.2
3 26 28 25 24.6
4 35 34 34 33.2

At , for instance, the linear model predicts against an observation of , so its residual is measured units. The quadratic model predicts , giving a residual of zero. The exponential prediction is about , giving a residual of about .

Using the unrounded predictions, the linear model’s residuals are , giving an SSE of . The quadratic model’s residuals are , giving an SSE of . The exponential model’s SSE is about . Of these three particular candidates, the quadratic gives the closest overall predictions for these five observations.

That conclusion has limits. It does not prove that every quadratic would outperform every exponential model, or that the quadratic will predict future observations best. A quadratic has more adjustable coefficients than a linear model, so it can often fit existing data more closely. Choosing a model also calls for examining where it misses and whether its behaviour makes sense in context.



Look for what the misses reveal

A residual plot places each residual against its input value, with a horizontal line at zero. It retains information that a single SSE number hides. If residuals are relatively small and scattered on both sides of zero without a clear pattern, the model may be suitable over the observed range. If they trace a curve or remain mostly above zero for one stretch and below it for another, the model is systematically missing something. Points on both sides of zero are not enough by themselves; their pattern matters.

Residual plots | Exploring bivariate numerical data | AP Statistics | Khan Academy

In Khan Academy’s “Residual plots,” the calculated differences are turned into a graph that can reveal whether a model misses systematically.

Watch plot construction to see why the original input values stay on the horizontal axis. Then watch pattern interpretation, comparing the scattered residuals with the curved pattern that suggests a straight-line model is inadequate.

The same test applies to a quadratic or exponential model: calculate observed minus predicted at each input, then examine the resulting plot. The image below places residual plots for two models of the same population data side by side.

Residuals from exponential and quadratic models of population observations, plotted against year on matching vertical scales. The exponential model has a particularly large negative residual near the end; the quadratic residuals are generally closer to zero, though they are not all zero.

The shared scale makes the comparison meaningful. In these plots, the exponential model has a substantial miss at the latest plotted observation, while the quadratic model’s misses are generally smaller. That supports the quadratic model for these observations; it does not establish that population follows a quadratic function indefinitely.



Check predictions beyond the fitted data

One useful additional test is to set aside an observed value, fit models using the earlier values, and compare their predictions with the value held back. The following handbook example does this with population data: its models use observations through 1980, while the 1990 observation is reserved for checking predictions. Focus on the comparisons rather than the calculator keystrokes or the methods used to calculate the regression equations.

Microsoft Word - PT3.DOC

Read the population-model comparison in the Texas Instruments statistics handbook to see how residual patterns and a held-back observation inform the same decision.

In Activity 3, find “Topic 11—Linear Least Squares Regression Line.” On p. 30, read steps 3–5, from “Plot residuals” through the discussion of the 1990 prediction. The passage beginning linear-model comparison includes its residual calculation, SSE, and prediction miss. Next, in “Topic 12—Polynomial Regression: Quadratic, Cubic, and Quadrinomial,” find “Quadratic Fit.” On p. 32, read steps 3–5, from the residual plot through the 1990 prediction; quadratic-model comparison is the key passage. Finally, under “Topic 13—Fits Linear by Transformations: Logarithmic, Exponential, and Power Regression,” find “Exponential Fit” on p. 33. Read its results for the residual plot and the 1990 prediction, ending at “percent for 1990”; exponential-model comparison contains those results.

In that example, the quadratic model has a much smaller SSE on the fitted observations than the linear or exponential model. Its prediction for the held-back year is also much closer: about off, compared with about for the linear model and for the exponential model. These are two distinct pieces of evidence—fit to the observations used to build the model and performance on an observation not used to build it—that favour the quadratic for this comparison.

The held-back year is only one step beyond the fitted range. A small miss there does not license projections arbitrarily far into the future. When evaluating any model, state the range of data you checked and consider whether continued straight-line change, quadratic growth, or constant percentage change is plausible in the situation.



Conclusion

To evaluate a model, calculate its predictions at the observed input values, find the signed residuals, and inspect both their sizes and their pattern. Compare numerical measures such as SSE only when the models use the same observations and output scale. If a separate observed value is available, checking a prediction against it provides further evidence—but a good fit over a limited range is not a guarantee of long-term accuracy.

This completes the maths bridge. Next, the course turns to chemistry, beginning with how valence-electron models help explain ionic and covalent bonding.