Fitting curves, measuring the fit, and the reason the smallest number is not always the right answer.
A cup of coffee is left on a desk in an air-conditioned Bangkok classroom and its temperature is recorded every two minutes. Try a straight line through it.
sum of squared residuals –
A residual is the vertical gap between a data point and the curve: observed minus predicted. Some are positive and some negative.
Squaring them stops the positives and negatives cancelling, and punishes one large miss more than several small ones. Adding up the squares gives SSres, and least squares regression is simply the curve of that family which makes SSres as small as possible.
A model predicts 54.0 degrees at 8 minutes. The thermometer read 51.4.
Click through linear, quadratic, cubic. SSres falls every time. It always will.
Every extra parameter gives the curve another way to bend towards your particular points, including towards the measurement noise in them. The cubic here reaches an SSres of about 0.31, which means it is very nearly threading every single point. That is not a triumph, it is the curve learning your measurement error by heart.
A smaller SSres is not evidence of a better model when the models have different numbers of parameters.
So choose from the context first. Coffee cools towards room temperature and then stops. That is exponential decay towards an asymptote.
Ask each fitted model what the coffee is doing an hour later, long after the data stops. The room is 24 degrees:
| Model | SSres | Predicts at 60 minutes |
|---|---|---|
| Linear | 211.5 | −24.4, so the coffee has frozen |
| Quadratic | 7.41 | +89.1, so it has reheated to nearly its starting temperature |
| Cubic | 0.31 | −37.9, colder still |
| Exponential | 4.69 | 25.7, just above room temperature |
The cubic has by far the best SSres and by far the worst physics. Every polynomial eventually runs away, each in its own direction, because a polynomial has no asymptote to settle onto. Only the exponential was ever the right shape, and no amount of fitting could have told you that. The physics chose the model; SSres only compared the candidates that were already sensible.
1. A model predicts 38.2 and the observed value is 41.0. What does this point contribute to SSres? Give your answer to 2 decimal places.
2. Two models are fitted to the same data. A quadratic gives SSres = 48 and a cubic gives SSres = 31. A student concludes the cubic is the better model. Why is that not yet justified?
3. The coffee data is used to predict the temperature at 60 minutes. Which model would you trust, and why?
Computing SSres from a table is routine and worth doing carefully: observed minus predicted, square each, add. Marks go for the method even when the arithmetic slips.
Justifying a model choice needs the context, not the number. "The exponential, because cooling tends towards room temperature" earns the mark. "The exponential, because SSres was smallest" often does not, because it would also pick the cubic.
If you fit with technology, say which model family you asked for and why. The calculator cannot tell you that a cooling curve should have an asymptote.
These pages are free and stay free, but they are general and your IA is not. Send me your research question, or whatever exists so far, and I will tell you in writing whether the topic has a ceiling on it, where the marks are going, and what to change first. That costs nothing and it comes back within 24 hours.
Written by a serving IB Diploma and Career-related Programme Coordinator and Head of Mathematics, who reads internal assessments across every subject group every year. If you then want the whole draft reviewed properly against all five criteria, that is the paid one, and it is refunded if it does not name at least three specific things to fix.
Get a free verdict Full written review, $99
I never write any part of it. Not a sentence, not a calculation, not your data. Under 18: a parent buys this and the thread is with them. I do not work with students at my own school.