ACF and PACF — Identifying ARIMA Orders
Statistics
Reading the Signature of Time Series Dependence
ACF and PACF plots reveal the autocorrelation structure needed to specify ARIMA models. The ACF shows total correlation at each lag, while the PACF isolates direct correlation after removing intermediate effects.
-
Economic Forecasting — Determine AR and MA orders for GDP growth models
-
Demand Planning — Identify seasonal lags in retail sales patterns
-
Sensor Networks — Detect temporal dependencies in IoT data streams
The cutoff patterns in these plots tell you exactly which lags matter.
The Autocorrelation Function (ACF) and Partial Autocorrelation Function (PACF) are essential tools for identifying the orders of ARIMA models.
DfAutocorrelation (ACF)
The correlation between a time series and its lagged version. The ACF at lag measures the linear dependence between and .
Autocorrelation Function
Here,
- =Autocorrelation at lag k
- =Autocovariance at lag k: $\text{Cov}(Y_t, Y_{t-k})$
- =Variance of the series
Sample ACF
The sample ACF is estimated as: . For a white noise series, .
Partial Autocorrelation (PACF)
The PACF measures the correlation between and after removing the linear effect of intermediate lags.
DfPartial Autocorrelation
The PACF at lag is the coefficient in the regression:
Identification Rules
The ACF and PACF patterns help determine the orders (p, d, q) of an ARIMA(p,d,q) model:
| Model | ACF Pattern | PACF Pattern |
|-------|------------|--------------|
| AR(p) | Tails off (exponential/sinusoidal decay) | Cuts off after lag p |
| MA(q) | Cuts off after lag q | Tails off |
| ARMA(p,q) | Tails off | Tails off |
Quick Guide
-
AR: Look at PACF for the order (where it cuts off)
-
MA: Look at ACF for the order (where it cuts off)
-
ARMA: Both tail off — use information criteria (AIC/BIC)
Confidence Bands
For a white noise series, approximately 95% of sample ACF values should fall within .
Significance Threshold
Here,
- =Length of the time series
Values outside these bounds are considered statistically significant at the 5% level.
Worked Examples
AR(1) Process
AR(1): $Y_t = 0.7Y_{t-1} + \varepsilon_t$
-
ACF: Exponential decay:
-
PACF: Spike at lag 1 (), then cuts off
This pattern clearly identifies an AR(1) model.
MA(1) Process
MA(1): $Y_t = \varepsilon_t + 0.5\varepsilon_{t-1}$
-
ACF: Spike at lag 1 (), then cuts off
-
PACF: Exponential decay
This pattern clearly identifies an MA(1) model.
Python Implementation
import numpy as np
import matplotlib.pyplot as plt
from statsmodels.graphics.tsaplots import plot_acf, plot_pacf
from statsmodels.tsa.arima_process import ArmaProcess
np.random.seed(42)
# AR(1) process
ar_params = np.array([1, -0.7])
ma_params = np.array([1])
ar1 = ArmaProcess(ar_params, ma_params)
y_ar1 = ar1.generate_sample(n=200)
# MA(1) process
ar_params_ma = np.array([1])
ma_params = np.array([1, 0.5])
ma1 = ArmaProcess(ar_params_ma, ma_params)
y_ma1 = ma1.generate_sample(n=200)
fig, axes = plt.subplots(2, 2, figsize=(12, 8))
plot_acf(y_ar1, ax=axes[0, 0], lags=20)
axes[0, 0].set_title('ACF - AR(1)')
plot_pacf(y_ar1, ax=axes[0, 1], lags=20)
axes[0, 1].set_title('PACF - AR(1)')
plot_acf(y_ma1, ax=axes[1, 0], lags=20)
axes[1, 0].set_title('ACF - MA(1)')
plot_pacf(y_ma1, ax=axes[1, 1], lags=20)
axes[1, 1].set_title('PACF - MA(1)')
plt.tight_layout()
plt.show()
Partial Autocorrelation via Durbin-Levinson
Durbin-Levinson Recursion
Here,
- =PACF at lag k
- =ACF at lag k
- =Previous order coefficients
Key Takeaways
Summary: ACF and PACF
-
ACF measures total correlation between and
-
PACF measures direct correlation after removing intermediate effects
-
AR(p): PACF cuts off at lag p; ACF tails off
-
MA(q): ACF cuts off at lag q; PACF tails off
-
ARMA(p,q): Both ACF and PACF tail off
-
Use significance bounds to identify significant lags
-
Combine ACF/PACF analysis with AIC/BIC for model selection
Related Topics
-
See ARIMA Models for fitting and forecasting with ARIMA
-
See Stationarity for testing and achieving stationarity
-
See Exponential Smoothing for alternative forecasting methods