Autocorrelation — Definition, Formula & Example
Autocorrelation (also called serial correlation) is the correlation between a time series and the same series shifted back by a fixed number of time steps. It tells you whether high values tend to be followed by high values (positive), by low values (negative), or by no predictable pattern.
For observations with mean , the sample autocovariance at lag is . The sample autocorrelation at lag is , where is the sample variance computed with divisor . Every satisfies . For a stationary process, the population version is .
Key Formula
Where:
- = Sample autocorrelation at lag k
- = Lag, the number of time steps between paired observations
- = Observation at time t
- = Mean of all n observations
- = Number of observations in the series
Worked Example
Problem: A town records its daily high temperature for 6 days: 68, 68, 70, 70, 72, 72 (°F). Find the lag-1 autocorrelation .
Step 1: Find the mean and each deviation from it.
Step 2: Compute the denominator. Square every deviation and add.
Step 3: Compute the numerator. Multiply each deviation by the next one (5 pairs for lag 1), add, then divide.
Answer: . This is a moderate positive autocorrelation: a warm day tends to be followed by another warm day.
Why It Matters
Least-squares regression assumes the errors are independent. In econometrics and forecasting courses, you check that assumption with the Durbin–Watson statistic, which is approximately for the residuals. Plots of against (ACF plots) also help you choose ARIMA models.
Common Mistakes
Mistake: Computing as an ordinary Pearson correlation of the pairs , with a separate mean for each column.
Correction: The standard sample autocorrelation uses the overall mean in every term. Its denominator sums over all observations. The Pearson shortcut usually gives a different value, especially for short series.
