Autoregressive (AR) models form one of the fundamental components of the ARIMA family. The core idea behind an AR model is simple yet powerful: the current value of a time series can be predicted using a linear combination of its own previous values. This directly models the dependency of the series on its past, a concept we explored visually through autocorrelation plots in the previous chapter.
An Autoregressive model of order p, denoted as AR(p), predicts the current value Yt based on the p preceding values (Yt−1,Yt−2,…,Yt−p). The mathematical representation is:
Yt=c+ϕ1Yt−1+ϕ2Yt−2+⋯+ϕpYt−p+ϵtLet's break down the terms:
Think of an AR(1) model (p=1). It states that the current value Yt is primarily dependent on the immediately preceding value Yt−1, plus a constant and some random noise:
Yt=c+ϕ1Yt−1+ϵtIf ϕ1 is positive, a high value yesterday suggests a high value today. If it's negative, a high value yesterday suggests a low value today. An AR(2) model would use the two most recent past values (Yt−1 and Yt−2), and so on.
How do we determine the appropriate order p? As discussed in Chapter 3, the Partial Autocorrelation Function (PACF) plot is extremely useful here. For a pure AR(p) process, the PACF plot typically shows:
Observing such a pattern in the PACF of your (stationary) time series suggests that an AR(p) model might be a good starting point.
A sample time series exhibiting AR(1) behavior. Notice how consecutive points tend to be relatively close in value, reflecting the influence of the previous point.
It's important to remember that standard AR models assume the time series Yt is stationary. Its mean, variance, and autocorrelation structure should not change over time. If your data is non-stationary (e.g., exhibits trends or seasonality), you'll typically need to transform it, often by differencing (as discussed in Chapter 2), before applying an AR model. This differencing step is the "Integrated" part represented by 'I' in ARIMA, which we will combine later in this chapter.
AR models capture one specific type of dependency structure in time series data. They form the basis for more complex models by explaining how past values influence the present. Next, we'll look at Moving Average (MA) models, which focus on the role of past forecast errors.
© 2025 ApX Machine Learning