Module 8: Relationships and business data · Lesson 8.5 · about 25 min
Simple forecasting and its uncertainty
Start every forecast with a naive baseline, try seasonal naive, moving averages and exponential smoothing, score them on held-out recent data with MAE and MAPE, and always give a range, not a single number.
Module 8 · about 25 minutes · school maths. You’ll be able to build and score simple forecasts, choose between them on held-out data, and give a forecast with a range.
In everyday terms: “tomorrow’s weather will be like today’s” is right surprisingly often. Any fancy forecast has to beat that simple guess on real past days before you trust it.
1. Four simple methods
- Naive: tomorrow = today.
- Seasonal naive: next Tuesday = last Tuesday (next December = last December).
- Moving average: the mean of the last k periods.
- Exponential smoothing: a weighted average where weights fall off for older data; α (0 to 1) sets how fast. Extensions (Holt, Holt-Winters) add a trend and a seasonal pattern.
Switch methods and compare the errors. With a strong weekend effect, “same day last week” wins easily; drop the weekend boost to 0 and the smoothers catch up.
2. Testing a forecast honestly
- Hold out the end: fit on everything except the last few periods, forecast them, compare. Never test on random days; that lets the future leak into the past.
- Rolling origin: repeat for several cut-off dates and average the errors (like cross-validation for time; see ML foundations).
- Score: MAE (average absolute miss, in units), MAPE (average percentage miss; breaks down near zero), RMSE (punishes big misses more).
3. Give a range
A point forecast will be wrong; the question is by how much. A simple honest range: look at your holdout errors and take their spread. If 80 % of past one-week-ahead errors were within ±12 %, give “1,200 (80 % range 1,060 to 1,340)”. Ranges grow with the horizon: next week is more certain than next quarter.
4. When simple isn’t enough
Several seasonal cycles (hour and weekday and year), holidays, promotions, prices and weather as drivers: these call for regression with calendar features, Holt-Winters, ARIMA-type models or forecasting libraries. Even then, report the baseline beside the model.
- Naive forecast
- Next value = last value.
- Seasonal naive
- Next value = same period last season.
- Exponential smoothing
- New forecast = α × latest value + (1 − α) × old forecast.
- MAE
- Mean absolute error: the average size of the misses, in the data's units.
- Physical meaning
- A forecast error is the part of tomorrow the past could not see. Its size on held-out weeks is the honest width of your forecast range.
“The model fits past data well, so it will forecast well.” Fitting the past is easy; forecasting is tested only on data the model has not seen. Hold out the latest weeks and score every method on them.
Watch it happen, one step at a time:
Maths and principle
Principle: a forecast is only as good as its errors on data it has not seen.
Exponential smoothing:
Unrolled, the weight on data periods old is : α = 0.3 puts 30 % on today, 21 % on yesterday, 15 % on the day before, and so on.
Errors (actual , forecast , n periods):
Range from errors: if past errors are roughly normal with SD , an 80 % range is and a 95 % range .
5. Worked example
Made-up data: weekly orders, forecasting next week. The last four weeks were held out.
| Week | Actual | Naive | 4-week average | Smoothing (α = 0.3) |
|---|---|---|---|---|
| 1 | 1,180 | 1,150 | 1,120 | 1,135 |
| 2 | 1,240 | 1,180 | 1,140 | 1,149 |
| 3 | 1,210 | 1,240 | 1,165 | 1,176 |
| 4 | 1,260 | 1,210 | 1,195 | 1,186 |
| MAE | 42.5 | 67.5 | 61 |
- Naive wins here: orders are trending up, and averages lag behind a trend.
- That points to adding a trend term (Holt’s method) rather than abandoning simple methods.
- Naive’s errors on the holdout had SD about 40. Forecast for next week: 1,260, 80 % range about 1,210 to 1,310 (four errors is a thin basis; use more weeks in practice).
6. Practice
- Actuals 100, 120, 90; forecasts 110, 110, 110. MAE and MAPE?
- Why does a moving average lag behind a trending series?
- Your model’s MAE is 52 and seasonal naive’s is 50. What do you recommend?
Answers
- Errors 10, 10, 20: MAE = 13.3. Percentages 10 %, 8.3 %, 22.2 %: MAPE ≈ 13.5 %.
- It averages past values, which are all lower than today’s when the series is rising, so it trails by about half its window.
- Use seasonal naive: it’s simpler and at least as accurate. Revisit the model if it can add something the baseline can’t, such as promotion effects.
Try it on your own data: the time series tool fits ARIMA forecasts with 80 % and 95 % ranges to your own series; regression workbench fits trends with calendar dummy columns.
New words: naive forecast, seasonal naive, exponential smoothing, holdout, rolling origin, MAE, MAPE, RMSE, prediction interval.
- Always compare with naive and seasonal-naive baselines.
- Score methods on held-out recent data (MAE, MAPE).
- Exponential smoothing: forecast = α × latest + (1 − α) × previous forecast.
- Give a range from the size of past errors.
Check yourself
Sources
- Hyndman, R. J. and Athanasopoulos, G. (2021), Forecasting: Principles and Practice, 3rd edition, OTexts, Chapters 5 and 8 https://otexts.com/fpp3/
- Makridakis, S., Spiliotis, E. and Assimakopoulos, V. (2018), The M4 Competition: Results, findings, conclusion and way forward, International Journal of Forecasting 34(4), 802-808 https://doi.org/10.1016/j.ijforecast.2018.06.001
Your ticks stay in this browser. Save them as a file on the course home.
Updated 2026-11-22. Numbers in the examples are made up to show the idea unless a source is given. Simulations run in your browser; nothing you type is sent anywhere.