Menu

Forecasting and Time-Series Basics

Lesson 1: Forecasting and Time-Series Basics

What is forecasting?

Forecasting estimates future values using historical observations and relevant context.

Use case

What's forecast

Inventory planningUnits needed per product per week
StaffingSupport tickets per hour
FinanceMonthly revenue
CapacityWebsite traffic during a sale

A forecast is an estimate with uncertainty, not a promise. Good forecasts include a range (prediction interval), not just a single number.

Understand the time series

Component

Meaning

Example

TrendLong-term upward or downward movementSteady user growth
SeasonalityRegular repeating patternWeekend peaks; festive-season spikes
CyclesLonger, irregular ups and downsEconomic cycles
NoiseRandom variationDay-to-day fluctuations
One-off eventsUnusual spikes or dropsOutage, viral campaign, pandemic

Check before modelling:

  • Time interval (daily, weekly, monthly)
  • Missing periods
  • Changes in how data was collected
  • Holidays and special events

Start with a baseline

Baseline

Forecast

Good for

NaiveNext value = last valueStable series
Seasonal naiveNext value = same period last seasonStrong seasonality
Moving averageAverage of the last k periodsSmoothing noise
MeanAverage of all historyVery stable series

More advanced methods include exponential smoothing (e.g., Holt-Winters), ARIMA / SARIMA, Prophet, and machine-learning models with lag features.

A complex model is only useful if it beats a reasonable baseline on data it wasn't trained on.

Evaluation

Metric

Meaning

Notes

MAE (mean absolute error)Average size of errorsEasy to explain, in original units
RMSE (root mean squared error)Penalises large errors moreUseful when big misses are costly
MAPE (mean absolute percentage error)Average error as % of actualBreaks down when actual values are zero or near zero
  • Compare methods over the same test periods.
  • Use time-based splits or rolling-origin (walk-forward) validation.

Common mistakes

  • Randomly shuffling time-series data: future information leaks into training. Always train on earlier periods and test on later ones.
  • Ignoring one-off events that won't repeat.
  • Presenting a single number without a range.
  • Not comparing with a baseline.

Try it: Plot monthly sales over two years. Identify any trend or seasonality and suggest a simple baseline forecast.


Data Analytics Tutorial



Learn via Video Course

Data Analysis and Processing with Python using Pandas - Data Science Course Logo

Data Analysis and Processing with Python using Pandas - Data Science Course

5 hrs



Get in Touch For Details