Written and maintained by CASRAI Editorial Board
Last updated
Autocorrelation is the correlation of a variable with a lagged copy of itself — today’s value predicted, in part, from yesterday’s. It is the default condition of almost any measurement taken repeatedly over time, and it is the reason the standard assumption behind most statistical tests — that each observation is independent of the others — routinely fails for time-ordered data. This guide covers autocorrelation as the general concept: what it is, why it breaks independence, and how the autocorrelation function (ACF) and partial autocorrelation function (PACF) are used to diagnose it. It is the conceptual layer underneath two more specific CASRAI guides — the Durbin-Watson test, which checks for autocorrelation in regression residuals specifically, and ARIMA modeling, which uses the ACF/PACF patterns introduced here to identify a model’s order. Read this first if either of those assumes background you don’t have yet.
What Autocorrelation Means, Formally
For a time series y1, y2, …, yn, the lag-k autocorrelation coefficient is the correlation between the series and itself shifted by k periods:
rk = Σt=k+1n (yt − ȳ)(yt−k − ȳ) ÷ Σt=1n (yt − ȳ)2
It behaves exactly like an ordinary Pearson correlation — it runs from −1 to +1, with 0 meaning no linear relationship — except one of the two variables being correlated is the same series, offset in time. Positive autocorrelation means a value above the mean tends to be followed by another value above the mean (the series has momentum, or “runs”); negative autocorrelation means a value above the mean tends to be followed by one below it (the series oscillates). Autocorrelation is not one number: a series has a separate rk for every lag k, and the pattern across lags — not any single value — is what identifies the underlying process.
Why It Violates the Independence Assumption
Ordinary least squares, the standard t-test, and most classical confidence-interval formulas all assume the observations (or, in a regression, the residuals) are drawn independently. That assumption is doing real work: it is what lets a formula treat each new observation as adding a full, independent unit of information, which is what makes a sample of size n shrink standard errors by a factor of roughly 1/√n. When observations are autocorrelated, each new one is partly predictable from the one before it, so it adds less genuinely new information than the formula assumes.
The practical consequence, worth stating precisely because it is easy to overstate: autocorrelation on its own does not bias a sample mean or a regression coefficient. What it corrupts is the standard error computed around that estimate — almost always by making it too small under the positive autocorrelation that shows up constantly in real time-ordered data, which inflates t-statistics and produces confidence intervals and p-values that look more precise than the data actually justify. That is exactly the mechanism the Durbin-Watson test guide works through in the regression-residual case specifically; this page is about detecting the same underlying property in any time-ordered variable, not only in residuals.
The Autocorrelation Function (ACF) and the Correlogram
The ACF is simply the full sequence of lag-k autocorrelation coefficients — r1, r2, r3, and so on — plotted as a bar chart against lag number. That plot is called a correlogram, and it is the standard first diagnostic for any time series. Two features matter when reading one:
- How far autocorrelation extends. A series with dependence limited to yesterday shows a large r1 and near-zero autocorrelation beyond it; a series with longer memory shows autocorrelation decaying gradually across many lags.
- The confidence band. Software typically overlays an approximate 95% band at ±1.96/√n around zero — the value a lag’s autocorrelation would need to exceed, under pure white noise, to be distinguishable from sampling noise alone. A bar inside the band is not good evidence of real autocorrelation at that lag; a bar outside it is.
The ACF alone, however, cannot distinguish direct dependence at lag k from dependence that is only inherited through the lags in between — if yt depends on yt−1, and yt−1 depends on yt−2, the ACF will show elevated correlation at lag 2 even if yt has no direct relationship with yt−2 once lag 1 is accounted for. That is what the PACF isolates.
The Partial Autocorrelation Function (PACF)
The PACF at lag k is the correlation between yt and yt−k with the effect of every intervening lag (1 through k−1) held constant — conceptually the same move as a partial correlation coefficient in a multiple regression, applied to a series and its own lags. It is computed recursively (the Durbin-Levinson recursion is the standard method; every statistical package implements it, so you would not normally hand-derive it) rather than from a simple formula, but the reading is straightforward: the PACF answers “does this lag add anything yt−1 through yt−k+1 haven’t already explained?”, lag by lag.
Used together, the ACF and PACF are a pattern-matching tool, and the pattern each shows is the primary signature used to identify what kind of process generated a series — the same logic the ARIMA guide builds into full model identification:
| Process | ACF pattern | PACF pattern |
|---|---|---|
| AR(p) — autoregressive | Decays gradually (exponentially or as a damped sine wave) | Cuts off sharply after lag p |
| MA(q) — moving average | Cuts off sharply after lag q | Decays gradually |
| ARMA(p,q) — mixed | Decays gradually | Decays gradually |
| White noise (no autocorrelation) | Stays inside the confidence band at every lag | Stays inside the confidence band at every lag |
| Non-stationary (trending/random-walk) | Decays extremely slowly, often still large at lag 20+ | Large spike at lag 1 only |
That last row matters in practice: a slowly-decaying ACF is usually a sign the series needs differencing before ACF/PACF are read for anything else — testing and correcting non-stationarity is its own step, covered in full (ADF and KPSS tests) in the ARIMA guide‘s stationarity section rather than here.
A Worked Example: Reading the ACF and PACF of a Simulated Series
The numbers below come from a seeded simulation, not a published dataset — labelled as such deliberately, so the pattern can be checked by anyone rather than taken on faith. A series of n = 200 points was generated from a known AR(1) process, yt = 0.7 × yt−1 + εt, with εt drawn from a standard normal distribution using a fixed pseudo-random seed (20260829) so the exact sequence is reproducible. The sample ACF and PACF were then computed directly from that generated series (Durbin-Levinson recursion for the PACF). The approximate 95% confidence band for this n is ±0.139.
| Lag | ACF | PACF |
|---|---|---|
| 1 | 0.743 | 0.743 |
| 2 | 0.545 | −0.017 |
| 3 | 0.386 | −0.030 |
| 4 | 0.314 | 0.093 |
| 5 | 0.235 | −0.046 |
| 6 | 0.158 | −0.040 |
| 7 | 0.090 | −0.024 |
| 8 | 0.006 | −0.097 |
This is the AR(1) signature from the table above, in real numbers: the ACF decays roughly geometrically (0.743, then 0.545 ≈ 0.743², then 0.386 ≈ 0.743³, tracking the theoretical AR(1) autocorrelation of φk reasonably closely given sampling noise at n = 200), while the PACF is large only at lag 1 (0.743, matching the true φ = 0.7 used to generate the data) and falls inside the ±0.139 band at every lag after that. A researcher reading this correlogram without knowing the generating process would correctly conclude “AR(1)” from the pattern alone — which is the point of learning to read one.
Common Sources of Autocorrelation in Research Data
- Trend. Any variable that grows, declines, or drifts over the study period (enrollment counts, cumulative citations, a biomarker tracked across disease progression) is autocorrelated almost by construction, since each value sits close to its neighbors relative to the overall range.
- Seasonality or cyclicality. Recurring patterns — academic terms, funding cycles, circadian or seasonal biological rhythms — produce autocorrelation concentrated at the lag matching the cycle length.
- Genuine persistence (momentum). Some processes really do carry over from one period to the next: a patient’s symptom severity, an institution’s publication output, a market price. Here the autocorrelation reflects a real dynamic worth modeling directly, not just a nuisance to correct for.
- Repeated measurement of the same unit. Longitudinal and panel designs measure the same subject repeatedly; observations from the same subject are typically more alike than observations from different subjects, independent of any time trend.
- An omitted lagged variable. In a regression, autocorrelated residuals sometimes indicate a genuinely dynamic relationship (the outcome depends on its own recent past) that the model has left out rather than an error to be patched over with a robust standard error.
Testing For and Correcting Autocorrelation: Where to Go Next
Reading a correlogram by eye is the right first step, but it is not a substitute for a formal test once a specific decision depends on the answer. Where to go from here depends on what you’re doing:
- Checking regression residuals specifically — the Durbin-Watson test guide covers the standard first-order test, its 0–4 statistic, the inconclusive dL/dU zone, and why it fails when a lagged dependent variable is among the regressors (the Breusch-Godfrey test is the standard alternative there, and higher-order autocorrelation in general).
- Modeling the autocorrelation structure itself, rather than just correcting for it — the ARIMA guide uses the exact ACF/PACF patterns from the table above to choose the AR, I, and MA orders through the Box-Jenkins identification process.
- Fixing standard errors without changing the model — Newey-West (HAC: heteroskedasticity- and autocorrelation-consistent) standard errors recompute valid inference around the same coefficient estimates, and are usually the simplest fix when the coefficients themselves are fine.
- Testing whether one series causally precedes another, rather than just whether either is autocorrelated — that is a distinct question, covered in the Granger causality guide.
- Confusing it with heteroscedasticity is a common mix-up: autocorrelation is about dependence between observations across time, while heteroscedasticity is about the error variance not being constant across observations. They are tested for differently and can co-occur; see the Breusch-Pagan test guide for the variance question specifically.
Autocorrelation also has a well-known downstream trap worth flagging here rather than leaving implicit: two independently trending or autocorrelated series can produce a strong, statistically “significant” correlation between them with no real causal or even associative link — the spurious correlation guide covers why, and it is a large part of why autocorrelation gets checked before a time-series relationship is taken at face value.
Frequently Asked Questions
What is autocorrelation in a time series, in plain terms?
It means a value in the series can be partly predicted from earlier values in the same series — the observations are not independent of each other the way a simple random sample would be. It is measured, lag by lag, with the autocorrelation function (ACF).
What’s the actual difference between the ACF and the PACF?
The ACF at lag k is the raw correlation between a series and its lag-k version, including any dependence inherited through shorter lags. The PACF at lag k is that same correlation with the effect of all shorter lags removed, so it isolates the direct relationship at exactly lag k.
Does autocorrelation bias my coefficients or my results?
Not directly. Under the standard assumptions, autocorrelation leaves point estimates (a mean, a regression coefficient) unbiased; what it corrupts is the standard error computed around them, usually making it too small and making results look more statistically significant than the data support.
How is autocorrelation different from heteroscedasticity?
Autocorrelation is about dependence between observations across time (does knowing yt−1 tell you something about yt?). Heteroscedasticity is about the variance of the errors not being constant across observations. They are different assumption violations, tested for with different diagnostics, and can both be present in the same dataset.
What test should I actually run to check for it?
For regression residuals specifically, the Durbin-Watson test is the standard first check for first-order autocorrelation, with Breusch-Godfrey as the standard choice for higher-order autocorrelation or when a lagged dependent variable is present. For a series on its own (not regression residuals), reading the ACF/PACF correlogram against the confidence band, as in the worked example above, is the standard first step before any formal modeling.
Can autocorrelation be a good thing, not just a problem to fix?
Yes — in forecasting contexts specifically, autocorrelation is the signal being modeled, not a nuisance. ARIMA and other time-series models exist precisely because a series’ dependence on its own past is genuine, exploitable structure; the “problem” framing applies mainly when autocorrelation shows up unexamined in the residuals of a model that assumed independence.








