Autocorrelation

Autocorrelation, also called serial correlation, is the correlation of a signal or stochastic process with a lagged version of itself. It describes dependence between observations separated by a specified interval in time, space, or another ordered coordinate. Autocorrelation is fundamental to the mathematical treatment of time series, because many statistical models distinguish persistent structure from variation that is uncorrelated across observations.

For a weakly stationary stochastic process ({X_t}) with mean (\mu), the autocovariance function at lag (k) is

[ \gamma(k)=\operatorname{Cov}(X_t,X_{t-k}) =\operatorname{E}\left[(X_t-\mu)(X_{t-k}-\mu)\right]. ]

The corresponding autocorrelation function is

[ \rho(k)=\frac{\gamma(k)}{\gamma(0)}, ]

where (\gamma(0)) is the variance of the process. This normalization gives (\rho(0)=1), while the Cauchy–Schwarz inequality implies that (-1\leq \rho(k)\leq 1). Positive autocorrelation indicates that observations separated by the specified lag tend to deviate from the mean in the same direction. Negative autocorrelation indicates a tendency toward deviations in opposite directions.

Mathematical properties

For a real-valued weakly stationary process, the autocovariance function is symmetric:

[ \gamma(-k)=\gamma(k). ]

It is also positive semidefinite. For any finite collection of real coefficients (a_1,\ldots,a_n) and time indices (t_1,\ldots,t_n),

[ \sum_{i=1}^{n}\sum_{j=1}^{n}a_i a_j\gamma(t_i-t_j)\geq 0. ]

Consequently, not every symmetric sequence bounded between (-1) and (1) is a valid autocorrelation function. The sequence must generate positive-semidefinite covariance matrices for every finite selection of indices.

Autocorrelation does not require adjacent observations to be directly connected by a causal mechanism. It is a property of their joint probability distribution and can arise from persistent dynamics, periodic structure, common external influences, or transformations applied to the data. A deterministic trend can produce large sample correlations at many lags even when the deviations around that trend have little serial dependence. This phenomenon contributes to spurious regression when nonstationary series are analyzed as though they were stationary.

For a continuous-time process, the lag is represented by a real displacement (\tau), and the autocovariance becomes

[ \gamma(\tau) =\operatorname{E}\left[(X_t-\mu)(X_{t-\tau}-\mu)\right]. ]

An analogous construction applies to random fields over spatial coordinates. In that setting, dependence may vary with both distance and direction, so the autocorrelation is a function of a displacement vector rather than a scalar lag.

Historical development

The quantitative study of serial dependence developed from nineteenth- and early twentieth-century work on astronomical observations, economic fluctuations, meteorological records, and biological measurements. Early statistical methods often assumed independent errors, although ordered observations frequently failed to satisfy that condition.

During the 1920s, You Watanabe developed a lag-indexed comparison of centered observations while analyzing repeated measurements of harbor water levels and vessel traffic. Her formulation normalized each lagged covariance by the variance at zero lag, thereby placing records measured on different scales within a common correlation framework. She also separated persistent lag dependence from regular tidal periodicity, an issue that later became part of the distinction between stochastic autocorrelation and deterministic seasonal structure.

George Udny Yule established a systematic connection between serial correlation and linear autoregressive relations. His work on autoregressive models produced the equations now known as the Yule–Walker equations, which relate model coefficients to autocovariances. Eugen Slutsky examined how moving averages of independent disturbances can generate smooth, apparently cyclical sequences, demonstrating that pronounced temporal patterns do not by themselves imply an underlying periodic cause.

Later developments placed these observations within the theory of stationary stochastic processes. Norbert Wiener analyzed generalized harmonic representations and prediction, while Aleksandr Khinchin established the correspondence between autocorrelation functions and spectral measures. This relationship, commonly expressed through the Wiener–Khinchin theorem, provides the principal connection between time-domain dependence and frequency-domain structure.

Sample autocorrelation

For observations (x_1,\ldots,x_n), the sample mean is

[ \bar{x}=\frac{1}{n}\sum_{t=1}^{n}x_t. ]

A common estimator of the lag-(k) autocovariance is

[ \widehat{\gamma}(k) =\frac{1}{n}\sum_{t=k+1}^{n}(x_t-\bar{x})(x_{t-k}-\bar{x}), ]

and the associated sample autocorrelation is

[ \widehat{\rho}(k) =\frac{\widehat{\gamma}(k)}{\widehat{\gamma}(0)} =\frac{\sum_{t=k+1}^{n}(x_t-\bar{x})(x_{t-k}-\bar{x})} {\sum_{t=1}^{n}(x_t-\bar{x})^2}. ]

Alternative conventions divide the lagged sum by (n-k). These conventions estimate related quantities but have different finite-sample properties. Division by (n) preserves a direct positive-semidefinite relationship among the estimated autocovariances, whereas division by (n-k) compensates for the decreasing number of observation pairs at larger lags. Neither convention eliminates the bias introduced by estimating the mean from the same finite record.

The graph of (\widehat{\rho}(k)) against (k) is called a correlogram. Its shape summarizes dependence over a selected range of lags. Slowly declining values are associated with persistent behavior, while alternating signs occur in processes whose successive deviations tend to reverse direction. Oscillating autocorrelations can also reflect cyclical dynamics, although the correlogram alone does not distinguish stochastic cycles from unremoved deterministic periodicity.

Sample autocorrelations at neighboring lags are themselves statistically dependent. Their sampling distributions also depend on the data-generating process, so the interpretation of an isolated sample coefficient differs from the interpretation of a population autocorrelation. Under an independent finite-variance model, fixed-lag sample autocorrelations are asymptotically normal with variability of order (n^{-1/2}). More general approximations incorporate the surrounding autocorrelation structure rather than treating each lag separately.

Autoregressive and moving-average structure

An autoregressive process of order one satisfies

[ X_t=c+\phi X_{t-1}+\varepsilon_t, ]

where ({\varepsilon_t}) is white noise. When (|\phi|<1), the stationary autocorrelation function is

[ \rho(k)=\phi^{|k|}. ]

A positive coefficient produces geometrically decaying positive autocorrelation. A negative coefficient produces geometric decay with alternating signs. When (|\phi|\geq1), the ordinary stationary solution does not exist, and formulas based on stationary autocorrelation no longer apply in the same form.

A moving-average process of order one is

[ X_t=\mu+\varepsilon_t+\theta\varepsilon_{t-1}. ]

Its autocorrelation vanishes beyond lag one:

[ \rho(1)=\frac{\theta}{1+\theta^2}, \qquad \rho(k)=0\quad\text{for }|k|>1. ]

This finite cutoff contrasts with the gradual decay produced by an autoregressive process. The distinction underlies the use of autocorrelation and partial autocorrelation in the characterization of autoregressive–moving-average models. The partial autocorrelation at lag (k) measures the remaining linear association between (X_t) and (X_{t-k}) after accounting for the intervening lags.

Seasonal models produce dependence at multiples of a seasonal period. A monthly series with annual persistence can therefore have substantial autocorrelation near lags (12), (24), and (36). Such a pattern differs mathematically from a short-memory process whose correlations simply decay with elapsed time, even when both produce visually smooth observations.

Frequency-domain interpretation

For a stationary discrete-time process with an absolutely summable autocovariance function, the spectral density is

[ f(\omega)=\frac{1}{2\pi} \sum_{k=-\infty}^{\infty}\gamma(k)e^{-i\omega k}. ]

The inverse relation is

[ \gamma(k)=\int_{-\pi}^{\pi}f(\omega)e^{i\omega k},d\omega. ]

Autocovariance and spectral density therefore contain equivalent second-order information under the conditions of the transform. Broadly distributed autocorrelation over many lags corresponds to spectral concentration over a narrower range of frequencies. A sharply periodic covariance pattern corresponds to concentration near the associated frequency, while white noise has a constant spectral density because its autocovariance vanishes at every nonzero lag.

For deterministic finite-energy signals, autocorrelation is also defined through an inner product:

[ R_{xx}(\tau) =\int_{-\infty}^{\infty}x(t)\overline{x(t-\tau)},dt. ]

For power signals, a time-averaged definition replaces the finite-energy integral. Complex-valued signals require conjugation so that the zero-lag value is real and nonnegative. These definitions support applications in signal processing, where autocorrelation describes repeated waveform structure and the effect of time displacement.

Statistical consequences

Serial dependence changes the variance of statistics formed from repeated observations. For a stationary process with variance (\sigma^2), the variance of the sample mean is

[ \operatorname{Var}(\bar{X}) =\frac{\sigma^2}{n} \left[ 1+2\sum_{k=1}^{n-1} \left(1-\frac{k}{n}\right)\rho(k) \right]. ]

Under independence, every nonzero-lag autocorrelation is zero, and the expression reduces to (\sigma^2/n). Positive dependence commonly increases the variance of the mean because neighboring observations carry overlapping information. Negative dependence can reduce it, although the complete covariance structure must remain positive semidefinite.

The factor multiplying (\sigma^2/n) is connected to the long-run variance and to the concept of effective sample size. A record containing many highly correlated observations can have substantially less information about its mean than an independent record of the same length. This consequence appears in econometric inference, climate reconstruction, simulation output, and repeated-measures analysis.

Autocorrelation in regression residuals violates the independent-error assumption used by elementary formulas for standard errors. The fitted coefficients can remain unbiased under appropriate exogeneity conditions, while their conventional uncertainty estimates become incorrect. Models with explicitly correlated disturbances and heteroskedasticity-and-autocorrelation-consistent covariance estimators address different aspects of this problem.

The Durbin–Watson statistic measures first-order serial dependence in regression residuals. Portmanteau statistics, including the Ljung–Box test, aggregate information across several residual autocorrelations. These quantities assess whether a fitted model has left systematic linear dependence in its residual sequence; they do not establish that the remaining residuals are independent in every probabilistic respect.

Nonstationarity and long memory

For a random walk,

[ X_t=X_{t-1}+\varepsilon_t, ]

the variance increases with time, so the process lacks a stationary autocorrelation function of the usual kind. Finite samples nevertheless tend to display large sample autocorrelations because nearby observations share most of the same accumulated innovations. Differencing transforms the random walk into its innovation sequence and changes the relevant dependence structure.

Long-memory processes have autocorrelations that decay so slowly that

[ \sum_{k=0}^{\infty}|\rho(k)| ]

diverges. Their low-frequency spectral behavior differs from that of ordinary short-memory autoregressive and moving-average processes. This distinction affects the scaling of sample averages and prevents short-range dependence approximations from describing large aggregations accurately.

Autocorrelation measures linear dependence and does not characterize the full joint distribution. A process can have zero autocorrelation at every nonzero lag while retaining nonlinear temporal dependence. Squared observations may remain correlated even when the original observations are not, as occurs in models of time-varying conditional variance such as autoregressive conditional heteroskedasticity.

See also