Have you ever noticed how some things seem to have a ‘memory’? A stock price that was high yesterday seems more likely to be high today. An economy that was growing quickly last quarter is probably still growing this quarter. This simple observation-that the past influences the present-is the core idea behind one of the most fundamental tools in economics: the Autoregressive (AR) model. It’s a way of formalizing this ‘memory’ to understand data, make forecasts, and guide policy.
Table of Contents
- What is an autoregressive model?
- The crucial condition for stationarity
- What happens when the condition is violated?
- Generalizing to the AR(p) model
- Using the backshift operator for AR models
- Key statistical properties of AR models
- The autocorrelation function (ACF)
- The partial autocorrelation function (PACF)
What is an autoregressive model?
At its heart, an Autoregressive (AR) model is a type of time series model that explains the current value of a variable using only its own past values. The name “auto-regressive” literally means “regressing on oneself.” Instead of predicting a variable $Y$ (like sales) using other variables $X$ (like ad spend), it predicts $Y$ using… well, $Y$.
The simplest and most common form is the AR(1) model, which means the current value depends only on the value from one period ago. Think of it as a model with a one-day or one-quarter memory.
The equation for an AR(1) model looks like this:
$Y_t = \phi Y_{t-1} + u_t$
Let’s break that down in plain English:
- $Y_t$ is the value of our variable at the current time period (e.g., this month’s inflation).
- $Y_{t-1}$ is the value from the period immediately before (e.g., last month’s inflation).
- $\phi$ (the Greek letter ‘phi’) is the autoregressive coefficient. This is the most important number! It tells us how strong the ‘memory’ is. It’s a value that measures how much of last period’s value is carried over to this period.
- $u_t$ is the error term, often called ‘white noise’. This represents new, random shocks or information that hits the series in the current period. It’s the part of $Y_t$ that cannot be explained by the past.
For example, if $\phi$ is 0.8, it means that 80% of last month’s inflation value will stick around, plus any new economic shocks ($u_t$). If $\phi$ is 0, the series has no memory, and it’s just a string of random shocks.
The crucial condition for stationarity
The single most important concept for understanding AR models is stationarity. A stationary series is one whose statistical properties (like its mean and variance) are constant over time. It’s a series that is stable and predictable. It may fluctuate, but it always tends to return to its long-run average. Think of it as a river that stays within its banks.
Why do we care? Because if a series isn’t stationary, all our standard statistical tools and models produce nonsensical results. You can’t model something that is constantly changing its fundamental behavior.
For an AR(1) model, the crucial condition for it to be stationary is that the absolute value of the coefficient $\phi$ must be less than one:
$|\phi| < 1$ (or $-1 < \phi < 1$)
When this condition holds, it means that the ‘memory’ is finite. The influence of the past eventually fades away. A shock that happened 10 periods ago will have almost no impact on today. The series will always revert to its mean.
What happens when the condition is violated?
This is where things get dangerous. If $\phi = 1$, the model becomes $Y_t = Y_{t-1} + u_t$. This is no longer a stable, mean-reverting series. This is a “unit root”, and it creates a “random walk.”
A random walk is like a drunkard’s walk. The next step is just the last step plus a random stumble ($u_t$). The series has no ‘anchor’ or long-run mean to return to. If it gets hit by a positive shock, it never ‘forgets’ it. The variance of a random walk is not constant; it actually grows infinitely over time. According to the IMF, failing to account for unit roots can lead to “spurious regressions,” where you find statistically significant relationships between variables that are, in reality, completely unrelated.
If $|\phi| > 1$, the situation is even more chaotic. The series is ‘explosive’. Each period, the value gets bigger and bigger, accelerating away to infinity. This is rare in economics, as explosive growth (or collapse) cannot be sustained.
Generalizing to the AR(p) model
The real world is often more complex than a one-period memory. Today’s inflation might depend on last month’s inflation and the inflation from two months ago. This is where the AR(p) model comes in.
The ‘p’ simply stands for the number of past ‘lags’ (periods) we want to include in the model. An AR(2) model uses two lags, an AR(3) uses three, and so on. The general AR(p) model is written as:
$Y_t = \phi_1 Y_{t-1} + \phi_2 Y_{t-2} + \dots + \phi_p Y_{t-p} + u_t$
Here, $Y_t$ is explained by a weighted sum of its past ‘p’ values. Each lag has its own $\phi$ coefficient, measuring the strength of its specific influence. The stationarity condition for an AR(p) model is more complex-it involves checking the ‘roots’ of the model-but the principle is the same: the combined influence of the past must eventually die out.
Using the backshift operator for AR models
When you work with these models, the equations can get long and clumsy. Econometricians developed a convenient shorthand called the backshift operator (or lag operator), usually written as $B$ (or $L$).
The operator $B$ has a very simple job: when you apply it to a variable, it ‘shifts’ it back one time period.
- $B Y_t = Y_{t-1}$
- $B^2 Y_t = B(B Y_t) = B(Y_{t-1}) = Y_{t-2}$
- $B^p Y_t = Y_{t-p}$
This little trick allows us to do some powerful algebra. Let’s rewrite our AR(1) model: $Y_t = \phi Y_{t-1} + u_t$
First, get all the $Y$ terms on one side: $Y_t – \phi Y_{t-1} = u_t$
Now, use the backshift operator. Since $Y_{t-1} = B Y_t$, we can substitute it: $Y_t – \phi B Y_t = u_t$
Finally, factor out $Y_t$: $(1 – \phi B)Y_t = u_t$
This compact notation is incredibly useful. For a general AR(p) model, we can group all the $\phi$ terms into a “polynomial lag operator,” $\Phi(B)$, and write the entire complex model in one simple line: $\Phi(B)Y_t = u_t$
This notation isn’t just for looks. As seen in the documentation for statistical software like Statsmodels, this polynomial form is how the model’s stationarity is mathematically checked by finding the roots of $\Phi(B)$.
Key statistical properties of AR models
So, you have a dataset. How do you know if an AR model is appropriate, and if so, how do you choose the right number of lags ‘p’? You look for its statistical signature, primarily using two tools: the Autocorrelation Function (ACF) and the Partial Autocorrelation Function (PACF).
But first, a quick note on the mean. For any stationary AR model (as defined by $Y_t = \phi Y_{t-1} + u_t$), the long-run, unconditional mean is zero. If the model has a constant term $c$ (i.e., $Y_t = c + \phi Y_{t-1} + u_t$), the mean will be $c / (1 – \phi)$.
The autocorrelation function (ACF)
The ACF measures the correlation between a series and its own lagged values. The ACF at lag $k$ measures the correlation between $Y_t$ and $Y_{t-k}$.
The key signature of an AR(p) process is that its ACF decays exponentially (or in a wave-like pattern) towards zero. It never just ‘cuts off’.
Why? Think of the AR(1) model. $Y_t$ is directly linked to $Y_{t-1}$. But $Y_{t-1}$ is linked to $Y_{t-2}$, which is linked to $Y_{t-3}$, and so on. A shock at $Y_{t-10}$ has an indirect influence on $Y_t$ because it ripples forward through all the periods in between. The ACF captures both this direct and indirect influence, so the correlation fades slowly, like a ripple in a pond.
The partial autocorrelation function (PACF)
The PACF is a more surgical tool. The PACF at lag $k$ measures the correlation between $Y_t$ and $Y_{t-k}$ after removing the influence of all the shorter lags in between (lags 1, 2, …, $k-1$). It looks for the direct relationship.
This is where the signature becomes clear. For an AR(p) model, the PACF has significant spikes for the first ‘p’ lags and then cuts off abruptly to zero (or within a non-significant range). As explained in statistical courses at institutions like Penn State, this is the classic identifier.
Think of it this way: In an AR(2) model ($Y_t$ depends on $Y_{t-1}$ and $Y_{t-2}$), the PACF will show a direct link at lag 1 and lag 2. But at lag 3? There is no direct link. The only reason $Y_{t-3}$ is correlated with $Y_t$ is because of its influence on $Y_{t-2}$ and $Y_{t-1}$, which the PACF has already removed. So, the PACF at lag 3 will be zero.
By looking at a plot of the PACF and seeing where it ‘cuts off’, an analyst can confidently identify the ‘p’ for their AR(p) model.
What do you think? Can you think of a real-world example, perhaps from business or your daily life, that seems to follow an autoregressive pattern? And if a forecaster discovered that their model had a unit root ($\phi = 1$), what would be the first thing they should do to their data before trying to model it again?
Leave a Reply