Choosing a Model for Cooling Coffee in a School Lab
A Grade 12 class records the temperature of a cup of coffee left in a room held at 21 °C. Readings are taken every 2 minutes for 30 minutes. A student proposes three candidate models for temperature T (in °C) against time t (in minutes): a linear model T = 88 - 2.1t, a quadratic model T = 89 - 2.6t + 0.03t², and an exponential-decay-to-ambient model T = 21 + 67(0.94)^t. The class computes residuals and finds the linear model fits well for the first 8 minutes but then consistently over-predicts temperature by up to 6 °C. The quadratic model has the smallest sum of squared residuals over the full 30 minutes, but it predicts that the coffee reaches 21 °C at about t = 40 and then begins to rise again. The exponential model has a slightly larger sum of squared residuals than the quadratic but approaches 21 °C asymptotically. The teacher asks the group to justify which model should be used for a report predicting temperature at t = 45 minutes.
1. Which model should the group select for the t = 45 minute prediction, and on what mathematical grounds?
Read the worked answer
The exponential model should be chosen. The decision cannot rest on sum of squared residuals alone, because the quadratic's lower residual sum reflects only the fitted interval (0 to 30 minutes). Extrapolating the quadratic beyond that interval produces behaviour that contradicts the physical situation: it reaches ambient temperature near t = 40 and then rises, which is impossible for cooling coffee in a 21 °C room. The exponential model is built on Newton's law of cooling, so its structure encodes the correct long-run behaviour: T approaches 21 °C from above without crossing it. For t = 45, the exponential gives T = 21 + 67(0.94)^45 ≈ 21 + 67(0.062) ≈ 25.2 °C, a plausible value. The quadratic's prediction at t = 45 would be above its minimum and climbing, which is not credible. The key principle is that a model used outside its fitted range must be judged by structural plausibility as well as by fit; a slightly worse fit inside the data can still be the better model for extrapolation.
2. The teacher notes the linear model fits well for the first 8 minutes. Explain why this does not justify using it for the full 30-minute report, using the concept of local versus global fit.
Read the worked answer
A good fit over a short interval shows only local agreement, not global validity. Over the first 8 minutes the coffee temperature is still far above ambient, so the cooling curve is nearly straight there; a tangent line to an exponential decay looks linear over a small range. The linear model's slope of -2.1 °C per minute matches the initial rate, but a constant rate cannot capture the slowing of cooling as the temperature difference to the room shrinks. The residuals confirm this: the linear model over-predicts by up to 6 °C later, meaning its error grows with time. Selecting a model on the basis of a favourable short window is a form of overfitting to a local region. The report covers 30 minutes and predicts at 45 minutes, so the model must represent the whole cooling process, including the decreasing rate. The exponential model's decreasing magnitude of slope, produced by the factor (0.94)^t, captures that behaviour, whereas the linear model cannot.