Autocorrelation and autocovariance measure how a stochastic process relates to itself over time. They quantify the dependence structure at different time lags, which is essential for identifying patterns, selecting models, and forecasting future behavior in fields like finance, signal processing, and econometrics.
Definition of autocorrelation
Autocorrelation measures the correlation between a time series and a lagged version of itself. If today's value tends to be similar to yesterday's, the lag-1 autocorrelation will be high. This makes autocorrelation the primary tool for characterizing how "memory" works within a single process.
Autocorrelation vs cross-correlation
Cross-correlation measures the correlation between two different time series, while autocorrelation is the special case where both series are the same process, just shifted by a time lag. You can think of autocorrelation as "self-correlation." Cross-correlation helps you find relationships between processes; autocorrelation reveals structure within one process.
Mathematical formulation
For a stationary process with mean , the autocorrelation at lag is:
Because stationarity guarantees that , this simplifies to:
The numerator is the autocovariance at lag , and the denominator is just the variance (autocovariance at lag 0). The simplification only works because stationarity makes the variance constant over time.
Interpretation of autocorrelation values
Autocorrelation values are bounded between and :
- : Perfect positive linear relationship with the lagged version. The process at time moves in lockstep with the process at time .
- : Perfect negative linear relationship. High values at time correspond to low values at time , and vice versa.
- : No linear dependence between the process and its lag- version. (Note: nonlinear dependence could still exist.)
The sign tells you the direction, and the magnitude tells you the strength.
Autocorrelation function (ACF)
The ACF is the function plotted against the lag . It gives you a complete picture of the linear dependence structure across all lags at once. In practice, you'll see it displayed as a bar chart (correlogram) with one bar per lag.
ACF for stationary processes
For a stationary process, the ACF has three important characteristics:
- It depends only on the lag , not on the absolute time
- It is symmetric:
- It typically decays toward zero as increases, reflecting the fact that most stationary processes have finite memory (distant observations become less correlated)
Sample ACF
In practice, you don't know the true ACF and must estimate it from data. For a time series with sample mean , the sample autocorrelation at lag is:
Notice the denominator sums over all observations (not just ). This ensures and that the sample autocovariance matrix remains positive semi-definite.
Confidence intervals for ACF
To decide whether an observed autocorrelation is statistically significant, you compare it against a confidence band. Under the null hypothesis that the process is white noise, the sample autocorrelations are approximately normally distributed:
So an approximate 95% confidence interval is:
Any sample autocorrelation falling outside this band is considered significant at the 5% level. Most statistical software draws these bands automatically on ACF plots.
ACF for non-stationary processes
When a process is non-stationary (e.g., it has a trend or changing variance), the ACF can be misleading. A trending series will show high autocorrelation at many lags that decays very slowly, which reflects the trend rather than genuine short-range dependence. The standard approach is to difference the series or apply another transformation to achieve stationarity before interpreting the ACF.
Properties of autocorrelation
Symmetry of autocorrelation
This follows directly from the symmetry of covariance: . In practice, this means you only need to look at non-negative lags.
Bounds on autocorrelation
This is a consequence of the Cauchy-Schwarz inequality applied to the covariance. Additionally, always, since any variable is perfectly correlated with itself.
Relationship to spectral density
The autocorrelation function and the power spectral density are a Fourier transform pair. For a discrete-time stationary process:
This is the Wiener-Khinchin relation. It means that any dependence structure you see in the time domain (via the ACF) has an equivalent representation in the frequency domain (via the spectral density). Peaks in the spectral density correspond to periodic components, while the ACF captures the same information as correlations at specific lags.

Autocovariance
Autocovariance is the unnormalized version of autocorrelation. It measures the covariance between a process and its own lagged values, retaining the original units of the data (squared units of ).
Definition of autocovariance
For a stationary process with mean :
Stationarity ensures that depends only on the lag , not on .
Autocovariance vs autocorrelation
The relationship between them is straightforward:
- Autocovariance has units (same as the variance) and is unbounded above by zero. It tells you the scale of the dependence.
- Autocorrelation is dimensionless and bounded between and . It tells you the strength of the dependence, normalized for scale.
Use autocorrelation when comparing dependence across different processes or different scales. Use autocovariance when you need the actual magnitude (e.g., in model parameter estimation).
Autocovariance function (ACVF)
The ACVF plots against lag . It carries the same structural information as the ACF but is not normalized, so the values at different lags reflect both the strength of dependence and the overall variability of the process.
Properties of autocovariance
- Symmetry:
- Variance at lag 0:
- Positive semi-definiteness: For any set of times and constants, the autocovariance matrix must be positive semi-definite. This is a necessary condition for to be a valid autocovariance function.
- For a stationary process, depends only on the lag, not on absolute time.
Estimating autocorrelation and autocovariance
In practice, the true and are unknown. You estimate them from observed data.
Sample autocorrelation function
For a time series :
This estimator is consistent: as , .
Sample autocovariance function
Note the divisor is (not ). Dividing by introduces a small bias but guarantees that the resulting sample autocovariance matrix is positive semi-definite, which is important for downstream modeling.
Bias and variance of estimators
- Both and are biased, but the bias shrinks as grows.
- Their variance also decreases with , so larger samples give more reliable estimates.
- For large lags relative to , the estimates become unreliable because fewer pairs of observations contribute to the sum. A common rule of thumb is to trust the sample ACF only up to about lag .
Bartlett's formula for variance
For a more refined assessment of sampling variability, Bartlett's formula gives the approximate variance of the sample ACF. Under a general stationary process:
Under white noise, all for , so this reduces to , which is where the standard confidence bands come from. For non-white-noise processes, Bartlett's formula accounts for the fact that existing autocorrelation inflates the variance of the sample ACF at higher lags.
Applications of autocorrelation and autocovariance
Time series analysis
Autocorrelation and autocovariance are the primary diagnostic tools for time series modeling. The shape of the ACF guides model selection:
- A slowly decaying ACF suggests an AR component or non-stationarity.
- An ACF that cuts off sharply after lag suggests an MA() process.
- The ACVF provides the parameter values needed for fitting AR and MA models (via the Yule-Walker equations, for instance).

Signal processing
Autocorrelation measures how similar a signal is to a delayed copy of itself. This is directly useful for:
- Pitch detection: Periodic signals produce peaks in the autocorrelation at the period length
- Noise reduction: Separating signal (correlated) from noise (uncorrelated)
- Echo cancellation: Identifying delayed copies of a transmitted signal
Econometrics and finance
In financial markets, autocorrelation in asset returns is closely watched. The efficient market hypothesis predicts zero autocorrelation in returns (past prices shouldn't predict future prices). Significant autocorrelation in returns can indicate market inefficiency, momentum effects, or mean-reversion. Autocorrelation in squared returns is used to detect volatility clustering, which is a key feature modeled by GARCH-type processes.
Quality control and process monitoring
In manufacturing and industrial settings, autocorrelation helps detect when a process drifts from its target. Standard control charts (like Shewhart charts) assume independent observations; when autocorrelation is present, specialized charts like CUSUM (cumulative sum) and EWMA (exponentially weighted moving average) are used instead to avoid false alarms.
Models with autocorrelation
Autoregressive (AR) models
An AR() model expresses the current value as a linear combination of the most recent values plus a white noise term:
The ACF of an AR process decays gradually (exponentially or with damped oscillations), while the partial autocorrelation function (PACF) cuts off after lag . This is how you identify the order of an AR model in practice.
Moving average (MA) models
An MA() model expresses the current value as a linear combination of the current and most recent white noise terms:
The ACF of an MA() process cuts off sharply after lag (i.e., for ), while the PACF decays gradually. This is the mirror image of the AR case and is the key diagnostic for identifying MA order.
Autoregressive moving average (ARMA) models
ARMA() models combine both components:
Both the ACF and PACF of an ARMA process decay gradually, which makes order selection harder. In practice, you often use information criteria (AIC, BIC) to choose and .
Autoregressive integrated moving average (ARIMA) models
ARIMA() models handle non-stationary series by differencing times before fitting an ARMA() model. For example, if a series has a linear trend, first-order differencing () typically removes it, producing a stationary series that can be modeled with ARMA. ARIMA models are among the most widely used tools for time series forecasting.
Testing for autocorrelation
Ljung-Box test
The Ljung-Box test checks whether the first autocorrelations are jointly zero. The test statistic is:
Under the null hypothesis of no autocorrelation, follows a distribution with degrees of freedom (adjusted if model parameters were estimated). A large (small p-value) means you reject the null and conclude that significant autocorrelation exists. The choice of matters: too small and you miss higher-order dependence, too large and you lose power.
Durbin-Watson test
The Durbin-Watson test specifically targets first-order autocorrelation in regression residuals:
The statistic ranges from 0 to 4:
- : No first-order autocorrelation
- : Positive autocorrelation (residuals tend to stay on the same side of zero)
- : Negative autocorrelation (residuals tend to alternate signs)
A limitation is that it only detects lag-1 autocorrelation and can give misleading results when lagged dependent variables appear as regressors.
Breusch-Godfrey test
The Breusch-Godfrey test is more general than Durbin-Watson. It can detect autocorrelation of any specified order in regression residuals. The procedure is:
- Fit the original regression and obtain residuals
- Regress on the original regressors and lagged residuals
- Compute from this auxiliary regression, which follows a distribution under the null of no autocorrelation
This test works even when lagged dependent variables are included as regressors, making it more robust than the Durbin-Watson test.
Portmanteau tests
Portmanteau tests are a general class that includes both the Box-Pierce and Ljung-Box tests. They aggregate information across multiple lags into a single test statistic based on the sum of squared sample autocorrelations. These tests are good for detecting any autocorrelation up to lag , but they don't tell you which specific lags are significant. For that, you'd look at the individual ACF bars and their confidence bands.