Module 1 · Demystifying Time Series Data and Modeling

ACF and PACF, Bar by Bar

Autocorrelation is the correlation of a series with a shifted copy of itself. Pick a lag, and watch one bar being made: the column pushed down, the pairs on a scatter plot, the number. Then see what the PACF keeps: only the direct links.

Goes with Deep Forecasting, Module 1, Part 1: time series basics

Series
How many steps the copy is shifted. You can also click a bar.
Order of the values
Same numbers, random order.

One bar being made

ACF: how strongly is each lag related to today?

Lag 1 Lag 2 Lags 12, 24, 36: one, two, three years back Band: too small to tell apart from 0

PACF: the direct links only

ACF at this lag-
PACF at this lag-
ACF bars outside the band-

The PACF at lag 2, by hand

There is a catch in the ACF bars. This value is close to the one before it. That one is close to the one before it. So this value and the one two steps back look related, even if they have no link of their own. It is a chain. Is there also a direct line from the first to the last? That is what the partial autocorrelation measures.

How to read the two plots

What you seeWhat it tells youWhere to see it
ACF bars that fade slowlyEach value is close to the one before it: a trend, or a series that wanders.Airline, Apple price
ACF peaks at 12, 24, 36A yearly season: this July looks like last July.Airline
PACF: one tall bar, then nothingOnce you know the last value, older values add nothing.Apple price
Every bar inside the bandNo straight-line memory at all.Shuffled; Apple, daily change

A warning. An ACF near 1 does not mean a series is predictable. For the Apple price it is 0.998: that says tomorrow's price will be near today's price. It does not say which way it will move.

1 · Correlation with a shifted copy

You know correlation: a number between −1 and 1 that says how closely two columns move together, along a straight line. Autocorrelation uses one column twice: the series, and the same series pushed down by a few rows.

2 · The band

Even a series with no memory gives bars that are not exactly 0. The band marks what is too small to tell apart from 0. About 1 bar in 20 pokes out by chance, so one or two bars outside is not a pattern.

3 · Which lags does a model need?

The ACF shows every lag that is related to today, directly or through the chain. The PACF keeps the direct links. Together they tell you which lags to hand to a model. ARIMA models are built by reading these two plots.

4 · Apple has one bar

Everything the past can tell you about the price is already in today's price. That is the reason for the simplest benchmark there is, tomorrow equals today: see Beat the benchmark. Its daily changes have no memory left: see Stationary or not?