Café sales versus temperature: the 34 °C forecast
A Christchurch café owner has recorded total daily sales (NZ dollars) and the 1 pm air temperature (°C) for 26 randomly selected days between September and February. Temperatures ranged from 11.4 °C to 27.8 °C. A linear regression of sales on temperature gives sales = 412 + 21.6 × temperature, with r = 0.84 and r² = 0.71. The residual plot shows a roughly even scatter, except for one day: 15.2 °C with sales of $1,380, a day when the café ran a 40%-off student promotion advertised on campus. The owner wants to use the model to plan staffing and stock, and asks whether a forecast 34 °C day in late February will bring in about $1,146 (412 + 21.6 × 34). She also wants to know whether she should simply buy extra ice cream 'whenever it's going to be hot'.
1. Interpret the slope, the intercept and r² in context, and state what r² does not tell the owner.
Read the worked answer
Slope (21.6): for each additional 1 °C in 1 pm temperature, daily sales are on average $21.60 higher, across the observed range of 11.4 °C to 27.8 °C. The 'on average' and the range are both essential - the slope is an average rate over these days, not a law holding at every temperature.
Intercept (412): the model's predicted sales at 0 °C. No day in the data is remotely near 0 °C, so this is an extrapolation and has no practical meaning; it should not be read as 'takings on a cold day'.
r² = 0.71: about 71% of the variation in daily sales is accounted for by the linear relationship with temperature. The remaining 29% is everything else - day of week, paydays, promotions, school holidays, other weather, staffing.
What r² does not say: it is not the proportion of days predicted correctly, and it says nothing about causation. It also does not measure how far an individual prediction will be off - that is the size of the residuals, which the owner needs for staffing. A high r² with large residual spread still gives poor single-day forecasts.
2. Evaluate the owner's predicted sales for a 34 °C day, and advise on how the prediction should be used for planning.
Read the worked answer
The arithmetic is right: 412 + 21.6 × 34 = 412 + 734.4 = $1,146.40. The problem is that 34 °C lies 6.2 °C beyond the highest temperature in the data (27.8 °C).
- Extrapolation. Nothing in the data shows the relationship stays linear above 27.8 °C. Sales might plateau or fall if people leave the city, stay home, or the café's outdoor seating becomes unusable. There is no evidence either way, so $1,146 is an untested guess dressed up as a model output.
- Sampling variability. The slope is estimated from only 26 days and has real uncertainty; a different 26 days would give a somewhat different line, and the interval around the prediction widens sharply the further you move from the mean temperature.
- Individual-day variation. Even inside the observed range, individual days sit well above and below the line. The prediction is a long-run average for such days, not a budget figure.
Advice: use the model only within roughly 11–28 °C, and present predictions as a range rather than a single number. For a 34 °C day, plan staffing on judgement plus the hottest comparable days actually observed, and treat the model as supporting evidence only. If she wants to forecast outside the range, she needs data from hotter days.
3. Calculate the residual for the promotion day and explain what should be done about that point before the model is used.
Read the worked answer
Predicted sales at 15.2 °C: 412 + 21.6 × 15.2 = 412 + 328.3 = $740.30. Residual = actual − predicted = 1380 − 740.3 = +$639.70.
That is a very large positive residual - the café took roughly $640 more than the temperature model expects. The plausible explanation is the promotion, not the weather, so that day is measuring a different process from the other 25.
Effect on the line: a point with a large residual at a middling temperature pulls the fitted line towards itself. It will lift the intercept and flatten the slope, so the apparent effect of temperature is distorted and r² is inflated or deflated depending on the pattern.
What to do - do not silently delete it:
- Check whether other promotion days exist in the data; if promotions are identifiable, fit a model with a promotion indicator (or analyse promotion and non-promotion days separately).
- Alternatively refit without that day and compare slope, intercept and r² - if they change materially, report both and say so.
- Either way, state the limitation: with 26 days and one unusual point, the model's coefficients are fragile, and any claim about the value of hot weather should be checked against more data.