Time Series ACF / PACF
Inspect autocorrelation in a series with ACF and PACF online. Ljung-Box test included.
When to use it
Use to inspect a univariate time series for autocorrelation before fitting any model. The autocorrelation function (ACF) and partial autocorrelation function (PACF) at increasing lags are the standard Box-Jenkins identification step: a slow ACF decay with a sharp PACF cutoff at lag p suggests AR(p); a sharp ACF cutoff at lag q with a slow PACF decay suggests MA(q). The Ljung-Box test summarises whether the series is consistent with white noise.
When NOT to use it
Do not interpret ACF and PACF on a non-stationary series; difference first (ACF that fails to decay is the diagnostic). For very short series (under about 30 observations), the sample ACF is too noisy to be useful. For seasonal series, also inspect at seasonal lags (12 for monthly, 7 for daily). Use the ARIMA tool to fit and forecast once order is identified.
What you get
ACF plot with lag on the x-axis and autocorrelation on the y-axis, with the white-noise 95 percent confidence band drawn at +/- 1.96 / sqrt(n); PACF plot with the same band; numeric ACF and PACF values per lag; Ljung-Box Q statistic at multiple lags with the chi-square approximation p-value; first lag of ACF and PACF crossing the band flagged.
How to interpret the output
Autocorrelations inside the band are statistically indistinguishable from white-noise. A significant spike at lag k flags either a true serial dependence at that lag or seasonality. The classical Box-Jenkins identification rules: AR(p) shows PACF cut-off at lag p with ACF tailing off; MA(q) shows ACF cut-off at lag q with PACF tailing off; ARMA(p,q) shows both tailing off. Ljung-Box p below alpha rejects white noise.
Common pitfalls
- Reading ACF and PACF without first checking stationarity (difference, then re-inspect).
- Over-interpreting individual significant lags in a long series; they appear by chance at the nominal alpha.
- Ignoring seasonal lags (lag 12, 24 for monthly; lag 7, 14 for weekly cycles).
- Picking p and q by ACF / PACF alone without confirming with residual diagnostics after fitting.
Try it in StatVeda
The Time Series ACF / PACF engine runs entirely in the browser. No signup, no install, no data sent to a server. Paste your data, hit Run, copy the output.
Open Time Series ACF / PACFReferences
- Box, G. E. P., Jenkins, G. M., Reinsel, G. C. and Ljung, G. M. (2015). Time Series Analysis: Forecasting and Control, 5th edition. John Wiley and Sons, Hoboken. Chapter 3.
- Hyndman, R. J. and Athanasopoulos, G. (2021). Forecasting: Principles and Practice, 3rd edition. OTexts, Melbourne. Chapter 9.
- Ljung, G. M. and Box, G. E. P. (1978). On a measure of lack of fit in time series models. Biometrika, 65(2), 297 to 303.