AI Glossary / Time series and signal processing / Intermediate

Autocorrelation function

Definition

The autocorrelation function, or ACF, gives a time series' autocorrelation across different lags. For a weakly stationary process, it describes how linear association changes with the separation between observations. A sample ACF estimates those relationships from data, and a plot of the estimates against lag is often called a correlogram.

What it means

A single autocorrelation describes one separation, such as one day. The ACF places many separations together, revealing whether association fades gradually, alternates in sign or recurs near seasonal intervals. This makes it a useful summary of temporal structure.

The theoretical ACF belongs to a specified process, while the sample ACF is noisy evidence about that process. Their shapes need not match exactly in a finite dataset. A series with no meaningful trend can still have a substantial ACF, because stationarity does not imply independence. Conversely, an ACF close to zero at nonzero lags does not rule out nonlinear dependence.

How it works

Choose a suitable range of lags and calculate a sample autocorrelation at each one. A common estimator uses the overall sample mean, lagged products of deviations and a common full-series sum of squared deviations. Other denominator conventions exist, so implementation settings should be documented.

Interpret the plot alongside the time series itself. A slowly decaying sample ACF can suggest persistent dynamics or nonstationarity; recurring peaks may suggest seasonality. Neither pattern proves a unique model. Reference bands depend on assumptions and whether raw data or residuals are being analyzed. Individual pointwise bands do not automatically provide simultaneous error control across all displayed lags. Model fitting, sample size and missing observations also affect interpretation.

Three practical examples

1. Forecast development: Analysts inspect a demand series' ACF to identify candidate temporal structures, then compare fitted models through diagnostics and later-period forecast evaluation.

2. Residual review: A team checks whether one-step model residuals retain association at operationally relevant lags. Remaining structure prompts investigation of omitted effects or an unsuitable error model.

3. Seasonal exploration: A service planner examines whether correlations recur at weekly separations in daily observations. Calendar knowledge helps distinguish a plausible weekly mechanism from a coincidental sample pattern.

Think of it this way

Think of asking the same question at many distances: how much does the series resemble itself one step away, two steps away and so on? The ACF collects the answers into a profile. It is a map of linear association across separations, not a complete explanation of the system producing the observations.

Worked example

For an original theoretical example, assume the stationary model x_t = 0.5x_(t-1) + e_t, where the innovations have mean zero, finite positive variance and are uncorrelated with past states. The mean of x_t is zero. Multiplying the recurrence by x_(t-k) and taking expectations gives gamma(k) = 0.5gamma(k-1) for positive k.

Dividing by gamma(0) yields rho(k) = 0.5rho(k-1), with rho(0) = 1. Thus the theoretical ACF at lags zero through five is 1, 0.5, 0.25, 0.125, 0.0625 and 0.03125.

If the autoregressive coefficient were -0.5 instead, those values would alternate in sign: 1, -0.5, 0.25, -0.125, 0.0625 and -0.03125. Both examples decay in magnitude. They are properties of specified stationary models, not sample estimates or statistical test results. A finite observed series generated by either model would generally produce a sample ACF that differs from these exact numbers.

Illustrative case study

Fictional case: Oakline Support sees high correlations at several lags in its daily ticket series. A first analyst concludes that an autoregressive model must be the answer. A second analyst notices a weekday schedule and a recent change in the service's scale.

The team examines time plots, calendar effects and transformed or adjusted versions of the series before fitting candidates. It then reviews residual ACFs and evaluates forecasts on later weeks. Some apparent persistence disappears after the known effects are represented. The team records the ACF as one piece of diagnostic evidence rather than treating its visual shape as a model-selection verdict.

Common misconceptions and mistakes

The ACF is not the partial autocorrelation function. ACF values include relationships transmitted through intervening lags; partial autocorrelation isolates a different conditional linear relationship. A cutoff or decay pattern in an ideal model is not a requirement that every finite-sample estimate follow that pattern exactly.

Do not confuse lag numbers with calendar units without checking observation spacing. Do not interpret lag zero's value of one as evidence of predictability. Finally, uncorrelated data need not be independent, and an ACF does not by itself test all forms of randomness, establish stationarity or identify causal relationships.

Business use

The ACF can help explain why operational data require time-aware modeling and why a large row count may overstate independent information. It also helps teams detect dependence left after fitting a forecasting or monitoring model.

For review, request the plotted series definition, time frequency, preprocessing, estimator and band assumptions. Ask which lags matter to the business decision and whether the apparent structure persists across periods. A useful workflow connects the ACF to a modeling hypothesis, then tests that hypothesis through broader diagnostics and future-data performance rather than stopping at a visually persuasive chart.

People also ask

Is the ACF a forecast?

No. It summarizes lagged association and can inform a forecasting model.

Why does the theoretical ACF start at one?

A nondegenerate variable is perfectly correlated with itself at zero lag.

Can an ACF alternate in sign?

Yes, as the negative-coefficient example illustrates.

Does a spike outside a reference band prove a model is wrong?

It is evidence to assess under the band's assumptions, the number of lags inspected and the wider diagnostic context.

Check your understanding

What is rho(3) in the positive-coefficient example?

Answer: It is 0.125.

Does a sample ACF have to equal the theoretical ACF?

Answer: No. Sampling variation and estimation choices affect its values.

What additional feature distinguishes the negative-coefficient example?

Answer: Its autocorrelations alternate in sign while their magnitudes decay.

Related terms

  • Autocorrelation
  • Partial autocorrelation function
  • Stationarity
  • correlogram
  • lag
  • autoregressive model
  • seasonality
  • residual diagnostics

Learn next

Learn next the theoretical ACF patterns of AR and MA models, then compare them with simulated sample ACFs. Study pointwise versus simultaneous uncertainty and combine ACF inspection with chronological forecast evaluation.

More in Time series and signal processing

  • Assumed-density filter - An assumed-density filter is a sequential Bayesian approximation method that keeps the evolving probability distribution within a chosen manageable family.
  • Augmented Lagrangian - An augmented Lagrangian is an optimization function that combines the original objective, multiplier terms for constraints and an additional penalty for...
  • Autocorrelated errors - Autocorrelated errors are model errors that are correlated with errors at other times or ordered positions.
  • B-splines - B-splines are basis functions used to represent piecewise-polynomial curves and surfaces.
  • Backward shift operator - The backward shift operator is a notation that moves a time-series value back by one observation period.
  • Box-Jenkins methodology - The Box-Jenkins methodology is an iterative approach to building time-series models, especially ARMA and ARIMA models, through identification, parameter...

Sources

NIST/SEMATECH, Autocorrelation Plot: https://www.itl.nist.gov/div898/handbook/eda/section3/autocopl.htm . statsmodels developers, acf: https://www.statsmodels.org/stable/generated/statsmodels.tsa.stattools.acf.html . The primary technical references describe plotting and estimator choices. The AR(1) derivation and numeric sequences are original teaching examples, independently checked under the stated assumptions.

Previous: Autocorrelation Next: Autoencoder

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer