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.
Partial Autocorrelation (PACF)
The PACF measures the correlation between and after removing the linear effect of intermediate lags.
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 |
Confidence Bands
For a white noise series, approximately 95% of sample ACF values should fall within .
Values outside these bounds are considered statistically significant at the 5% level.
Worked Examples
AR(1) Process
MA(1) Process
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
Key Takeaways
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