Autocorrelation is the linear dependence of a variable with itself at two points in time. For stationary processes, autocorrelation between any two observations only depends on the time lag h between them. Define Cov(yt, yt–h) = γh. Lag-h autocorrelation is given by
Correlation between two variables can result from a mutual linear dependence on other variables (confounding). Partial autocorrelation is the autocorrelation between yt and yt–h after removing any linear dependence on y1, y2, ..., yt–h+1. The partial lag-h autocorrelation is denoted
The autocorrelation function (ACF) for a time series yt, t = 1,...,N, is the sequence h = 1, 2,...,N – 1. The partial autocorrelation function (PACF) is the sequence h = 1, 2,...,N – 1.
The theoretical ACF and PACF for the AR, MA, and ARMA conditional mean models are known, and quite different for each model. The differences in ACF and PACF among models are useful when selecting models. The following summarizes the ACF and PACF behavior for these models.
|Conditional Mean Model||ACF||PACF|
|AR(p)||Tails off gradually||Cuts off after p lags|
|MA(q)||Cuts off after q lags||Tails off gradually|
|ARMA(p,q)||Tails off gradually||Tails off gradually|
Sample autocorrelation and sample partial autocorrelation are statistics that estimate the theoretical autocorrelation and partial autocorrelation. As a qualitative model selection tool, you can compare the sample ACF and PACF of your data against known theoretical autocorrelation functions .
For an observed series y1, y2,...,yT, denote the sample mean The sample lag-h autocorrelation is given by
autocorrto plot the sample autocorrelation function (also known as the correlogram), approximate 95% confidence intervals are drawn at by default. Optional input arguments let you modify the calculation of the confidence bounds.
The sample lag-h partial autocorrelation
is the estimated lag-h coefficient in an AR model
containing h lags, The standard error for testing
the significance of a single lag-h partial autocorrelation
is approximately When you use
parcorr to plot the sample partial autocorrelation
function, approximate 95% confidence intervals are drawn at by default. Optional input arguments
let you modify the calculation of the confidence bounds.
 Box, G. E. P., G. M. Jenkins, and G. C. Reinsel. Time Series Analysis: Forecasting and Control. 3rd ed. Englewood Cliffs, NJ: Prentice Hall, 1994.