IKH

ACF and PACF

In the previous segment, you studied the methods to convert a non-stationary series into a stationary series. Recall the learnings of the second segment of this session where we had discussed the two fundamental requirements to build an Auto Regressive model i.e. stationarity and autocorrelation. Till the previous segment we have already discussed stationarity, let’s start this segment with autocorrelation.

Autocorrelation is capturing the relationship between observations yt at time t and  yt−k at time k time period before t. In simpler words, autocorrelation helps us to know how a variable is influenced by its own lagged values. We will look at two Autocorrelation measures here:

  • Autocorrelation function (ACF)
  • Partial autocorrelation function (PACF)

Let us study these in detail in the following video.

Note:

At 2:48, the final value on the X-axis is shown to be 200. This is a small mistake; it should be 20.

The autocorrelation function tells about the correlation between an observation with its lagged values. It helps you to determine which lag of the observation is influencing it the most. 

In the above example, we see the time series with lag 1 and lag 2 of its original time series. Now let’s see the autocorrelation plot of the same data.

Here, we clearly see that the current observation is significantly correlated with lag 1 and lag 2. The other interesting thing to notice is that the autocorrelation function captures both direct and indirect relationships between the variables. For example:

For  yt yt+1 and  yt+2: Autocorrelation function captures both direct and indirect relationship with its lagged values. Here, the big arrow on the bottom indicates the direct relationship that is captured between yt and yt+2.

Autocorrelation function also captures the indirect relationship between yt and  yt+2 through yt+1. In simpler words, yt will have some correlation with yt+1, and yt+1 will also have a correlation with yt+2. This transitive correlation that passes through yt+1 is the indirect relationship which is also captured by the Autocorrelation function.

Thus, you can’t differentiate out only the direct relationship using ACF. To capture only direct relationships, you have another measure called Partial Autocorrelation Function or PACF.

A partial autocorrelation function captures only the direct relationship between an observation and its lagged value with the relationships of intervening observations removed.


For ytyt+1 and yt+2: Partial autocorrelation function captures the direct relationship between yt and yt+2 and does not capture indirect relationship between yt and yt+2 passing through yt+1. 

After understanding the theoretical concept, let’s see the coding demonstration to plot ACF and PACF.

Till now, you have studied the two requirements to build an Auto Regressive model. In the upcoming segments you will build different Auto Regressive models.

Report an error