Temporal autocorrelation (Serial Correlation)
Temporal autocorrelation — also called serial correlation — is the correlation between a series and its own earlier values. The definition parallels ordinary correlation exactly: “just as correlation measures the extent of a linear relationship between two variables, autocorrelation measures the linear relationship between lagged values of a time series.“
There is one coefficient per lag — \(r_1\) relates \(y_t\) to \(y_{t-1}\), \(r_2\) relates \(y_t\) to \(y_{t-2}\), and so on — and together they “make up the autocorrelation function or ACF.” Two quite different audiences care about it, and for opposite reasons.
For forecasting: it is the signal
Structure in the ACF is what makes a series predictable, and the shape names the structure.
- Trend. “When data have a trend, the autocorrelations for small lags tend to be large and positive because observations nearby in time are also nearby in value,” so the ACF shows “positive values that slowly decrease as the lags increase.”
- Seasonality. “When data are seasonal, the autocorrelations will be larger for the seasonal lags (at multiples of the seasonal period).” See seasonality and seasonal lag.
- Both at once. “The slow decrease in the ACF as the lags increase is due to the trend, while the ‘scalloped‘ shape is due to the seasonality.”
It is also the standard diagnostic for stationarity: “for a stationary time series, the ACF will drop to zero relatively quickly, while the ACF of non-stationary data decreases slowly,” and for non-stationary data “the value of \(r_1\) is often large and positive.” That reading is the first step before fitting an ARIMA model, and the residual ACF is how you check one afterward — the guidance is to “always plot the ACF and histogram of the residuals to check the assumptions before producing prediction intervals.”
For inference: it is the problem
Simple iid standard-error formulas assume independent observations; other standard methods explicitly account for dependence. Positive autocorrelation often increases the variance of a sample mean because observations share information. Negative autocorrelation can reduce it. The direction is determined by the covariance structure and the statistic.
For 90 stationary observations with AR(1) correlation -0.5, the variance of the sample mean is about 0.338 times the iid calculation with the same marginal variance. Positive serial correlation often gives the opposite pattern. Thus using \(s/\sqrt{90}\) without examining dependence can overstate or understate uncertainty; counting rows is not enough.
Choose inference that respects the dependence: a suitable covariance estimator or time-series model, or a justified block bootstrap. Aggregating observations may help but does not guarantee independence between the aggregates. Assess the relevant time scale and residual dependence rather than assuming that weeks are independent because days were not.
The symptom to recognize when this has been ignored: a before-and-after comparison of two periods that shows a confidently significant change every time it is run, including for changes that did nothing. A trending series will produce that result whenever you split it in two, because the two halves differ for reasons that have nothing to do with the intervention — see causal impact for the version of the question that takes the trend seriously.
Further reading
- Hyndman & Athanasopoulos, Forecasting: Principles and Practice (3rd ed.), §2.8 “Autocorrelation”
- §9.1 “Stationarity and differencing”
- §9.5 “Non-seasonal ARIMA models”
- §9.8 “Forecasting”
Discover more from Insightful Data Lab
Subscribe to get the latest posts sent to your email.
