Monday, September 21, 2026

ARIMA → ARIMAX → SARIMA → SARIMAX | Time Series Field Manual
Time Series Field Manual · 01

ARIMA
ARIMAX
SARIMA
SARIMAX

Four names. One family of ideas. Learn exactly what they are, why they exist, and when the extra complexity is actually useful.

PAST → PATTERNS → FUTURE

↓ Start with the problem

CHAPTER 01

First: what problem are we solving?

Suppose you have a value changing over time: sales, temperature, demand, electricity usage, website traffic, stock inventory, etc.

TIME → → → → → → → → → → → → →

The key question is not merely: "What is the average?"

The forecasting question is:

Given everything I know up to time t, what should I expect at time t + 1?
A time-series model is basically a disciplined way of saying: "Yesterday matters — but exactly HOW it matters?"
CHAPTER 02

AR — AutoRegressive

Before ARIMA, understand the simplest idea: the past value can help predict the future value.

yₜ = c + φ₁yₜ₋₁ + εₜ AR(1): today's value depends partly on yesterday's value.
AR = MEMORY

What does AR mean?

"Auto" = itself.

"Regressive" = use previous values to explain the current value.

So AR asks:

"Does my own past help predict my future?"

EXAMPLE

Temperature

Yesterday: 30°C

Today is probably not randomly 10°C.

The recent temperature contains useful information.

That is temporal memory.

Philosophy: Don't throw away yesterday. If observations are correlated over time, the previous observations contain predictive information. AR tries to capture that dependence explicitly.
CHAPTER 03

MA — Moving Average

MA does something different. Instead of directly remembering past observations, it remembers past prediction errors.

yₜ = c + εₜ + θ₁εₜ₋₁ MA(1): today's value depends on today's and yesterday's error.
MA = ERROR MEMORY

Imagine this

Your model predicted:

100

Actual value:

120

Error:

+20

The model remembers that shock when making the next prediction.

IMPORTANT

Not the normal moving average

This is where beginners get ambushed. 😄

ARIMA's MA does NOT simply mean:

"average the last 7 values."

It models past forecast errors.

CHAPTER 04

ARIMA = AR + I + MA

Now the pieces finally meet.

ARIMA(p,d,q)

p = AR order
d = differencing order
q = MA order
p

AR

How much should we look at previous observations?

d

I

How many times should we difference the series to remove trend / achieve stationarity?

q

MA

How much should we use previous forecast errors?

The "I" is the important twist

Suppose:

100 → 105 → 111 → 118 → 126

The level keeps increasing. Instead of modelling the raw values, we can model the changes:

5 → 6 → 7 → 8

That is differencing.

Δyₜ = yₜ − yₜ₋₁ First difference
ARIMA's philosophy: "If the series has a trend that makes the level unstable, model the changes rather than forcing the model to understand the trend directly."

Example

Suppose after experimentation you determine:

p = 2
d = 1
q = 1

Your model becomes:

ARIMA(2,1,1)

Meaning:

  • use 2 AR lags
  • difference once
  • use 1 past error term
CHAPTER 05

ARIMAX — ARIMA + External Information

What if the past of Y is not enough? What if another variable helps explain Y?

yₜ = c + φ₁yₜ₋₁ + β₁xₜ + εₜ X = exogenous / external variable
Y

What are we forecasting?

Example:

Ice-cream sales

X

What external variable helps?

Example:

Temperature

Why would temperature matter?

Because ice-cream demand is not caused only by yesterday's ice-cream demand.

A very hot day can cause demand to jump even if yesterday's sales were ordinary.

ARIMA: "What did Y do before?"
ARIMAX: "What did Y do before + what else is happening?"

Think like this

ARIMA = internal memory

ARIMAX = internal memory + outside information
The "X" is basically the model saying: "Hey, there are other variables in the real world. Please don't pretend they don't exist."
CHAPTER 06

Then comes the seasonal problem.

Some time series have a repeating pattern. Every day. Every week. Every month. Every year.

PEAK → FALL → LOW → RISE → PEAK → ...

For example:

  • Retail sales spike every December.
  • Electricity demand repeats every day.
  • Website traffic behaves differently on weekdays and weekends.
  • Tourism demand repeats every summer.
Seasonal period = m

Daily data with weekly seasonality → m = 7
Monthly data with yearly seasonality → m = 12
Hourly data with daily seasonality → m = 24
If ARIMA looks backward one step at a time, SARIMA also remembers the same point in the previous season.
CHAPTER 07

SARIMA — ARIMA with seasonal memory

SARIMA(p,d,q)(P,D,Q,m)
NON-SEASONAL

p, d, q

Normal ARIMA behaviour.

  • p → AR
  • d → differencing
  • q → MA
SEASONAL

P, D, Q, m

Seasonal version of the same ideas.

  • P → seasonal AR
  • D → seasonal differencing
  • Q → seasonal MA
  • m → seasonal period

Seasonal differencing

Suppose monthly sales have a yearly pattern. Compare this January with last January:

Δ₁₂ yₜ = yₜ − yₜ₋₁₂

Instead of comparing:

January 2026 − December 2025

we compare:

January 2026 − January 2025

That isolates the seasonal movement.

SARIMA(1,1,1)(1,1,1,12)

Interpretation:

  • ordinary AR order = 1
  • ordinary differencing = 1
  • ordinary MA order = 1
  • seasonal AR order = 1
  • seasonal differencing = 1
  • seasonal MA order = 1
  • season length = 12
CHAPTER 08

SARIMAX — The full family

Now combine the two extensions:

Seasonality + External Variables
SARIMAX(p,d,q)(P,D,Q,m) + X

Example: Electricity Demand

You want to forecast electricity demand.

There may be:

  • short-term dependence
  • weekly seasonality
  • temperature effects
  • holidays
  • working-day effects

So a SARIMAX model can use:

Past demand + Seasonal demand + Temperature + Holiday indicator
SARIMAX is not "better ARIMA." It is ARIMA's toolbox expanded for seasonality and external predictors.
CHAPTER 09

Interactive model selector

Answer three questions. The page will tell you which family matches the structure of your forecasting problem.

1. Does your series have a repeating seasonal pattern?


2. Do you have useful external predictors?
Choose the answers above.

Build the model name

Pick what your data needs.

MODEL CONSTRUCTOR

ARIMA

Internal temporal behaviour without seasonality or external predictors.

CHAPTER 10

The whole evolution in one picture

1. AR

"Past values of Y might predict future Y."

2. MA

"Past prediction errors might contain information."

3. ARIMA

"Combine AR + differencing + MA."

4. ARIMAX

"Also give me useful external variables."

5. SARIMA

"Also model repeating seasonal behaviour."

6. SARIMAX

"Give me seasonality AND external variables."

CHAPTER 11

One-table cheat sheet

Model Core idea Seasonality? External X? Use when...
AR Past Y predicts future Y No No Simple temporal dependence
MA Past errors influence future No No Short-lived shocks/errors matter
ARIMA AR + differencing + MA No No Trend/non-stationary series without strong seasonality
ARIMAX ARIMA + external predictors No YES Weather, price, promotions, etc. explain Y
SARIMA ARIMA + seasonal structure YES No Weekly/monthly/yearly repeating patterns
SARIMAX SARIMA + external predictors YES YES Seasonality + useful outside variables
FINAL EXAM

Interview flash cards

Click the card. Don't peek. 😄

What does ARIMA stand for?

CLICK TO REVEAL

Answer

AutoRegressive Integrated Moving Average.

AR + Differencing + MA

What is the X in ARIMAX?

CLICK TO REVEAL

Answer

Exogenous / external variables.

Variables outside the target series that may help forecast it.

What does m mean in SARIMA?

CLICK TO REVEAL

Answer

Seasonal period.

Weekly daily observations → m = 7
Yearly monthly observations → m = 12
Daily hourly observations → m = 24

THE 30-SECOND ANSWER

How to explain it in an interview

ARIMA models temporal dependence using past values, differencing, and past forecast errors.

If I also have useful external variables, I use ARIMAX.

If the series contains repeating seasonal behaviour, I use SARIMA.

If it contains both seasonality and external predictors, I use SARIMAX.

ARIMA
↓ + X
ARIMAX

ARIMA
↓ + SEASONALITY
SARIMA

SARIMA
↓ + X
SARIMAX
The model should follow the structure of the data — not the other way around.

TIME SERIES FIELD MANUAL · ARIMA FAMILY

AR → MA → ARIMA → ARIMAX → SARIMA → SARIMAX

Built as a one-page learning reference.

No comments:

Post a Comment