1. University MCA (AI/ML) Semester 2
  2. CAB206
  3. Unit 5

CAB206 · Unit 5: AI for business intelligence

Time-series forecasting and error measures

9 practice questions

Key points

  • Trend, seasonality, noise
  • Naive and seasonal naive are the baselines
  • SES: higher alpha = more weight on recent data
  • MAE, RMSE (penalises big errors), MAPE (percent, fails at zero actuals)
  • Split by time, never shuffle

A time series is data ordered in time. Business forecasting (demand, revenue, footfall) looks for trend (long-run direction), seasonality (repeating pattern such as festival peaks) and noise (random variation).

Simple baselines (always beat these first)

  • Naive: next value = last observed value.
  • Seasonal naive: next value = the value from the same season last cycle (next January = last January).
  • Moving average (k periods): mean of the last k values. For 100, 120, 110, 130 and k = 3, the forecast is (120 + 110 + 130) / 3 = 120.
  • Simple exponential smoothing (SES): s_t = alpha x y_t + (1 - alpha) x s_(t-1). A larger alpha weights recent data more. For y = 100, 120, 140 and alpha = 0.5: 100, 110, 125, so the forecast is 125.
  • Linear trend: fit a line to time; for y = 10, 12, 14, 16, 18 (t = 1..5) the slope is 2 and t = 6 gives 20.
  • Holt-Winters (triple exponential smoothing) handles trend and seasonality; ARIMA and ML models are further options.

Error measures (error = actual - forecast)

  • MAE: mean of absolute errors. Same units as the data.
  • MSE / RMSE: squared errors penalise large misses more. RMSE = square root of MSE, in data units.
  • MAPE: mean of |error| / actual, as a percentage. Undefined when an actual is 0 and unstable for small actuals.
  • Bias: mean error; positive means the forecast is too low on average.

Example: actual 100, 120, 110 and forecast 110, 115, 100 give errors -10, 5, 10: MAE = 8.33, MSE = 75, RMSE = 8.66, MAPE = 7.75%.

Validation. Split chronologically (train on the past, test on the later period). Random shuffling leaks future information into training. Use walk-forward (rolling-origin) validation for several test windows.

Try two questions

Question 1 · Tier 2, Understand

For simple exponential smoothing, what does increasing alpha do?

  1. Removes all trend from the series
  2. Gives more weight to the oldest observations
  3. Makes the forecast equal to the long-run mean always
  4. Gives more weight to recent observations
Show the answer

D. Higher alpha makes the forecast react faster to recent values; lower alpha smooths more heavily.

Question 2 · Tier 3, Apply

Actual demand is 100, 120, 110 and the forecast is 110, 115, 100. What is the MAE?

  1. About 8.33
  2. About 7.75
  3. About 8.66
  4. 75
Show the answer

A. Absolute errors are 10, 5 and 10, so MAE = 25 / 3 = 8.33. The 8.66 option is RMSE and 7.75 is MAPE in percent.