Ljung-Box Test

Author

John Robin Inston

Published

September 25, 2026

0.1 Ljung-Box Test

After fitting a model (ARMA, GARCH, regression), the residuals should behave like white noise if the model is correctly specified. The Ljung-Box test is a portmanteau (joint) test of whether the first \(K\) residual autocorrelations are simultaneously zero, rather than testing each lag individually (which would inflate false-positive rates).

Given sample residual ACF \(\hat\rho(h)\) (see Autocovariance and Autocorrelation Function) from \(n\) residuals of a fitted model with \(m\) estimated parameters, \[ Q_{LB} = n(n+2)\sum_{h=1}^K \frac{\hat\rho(h)^2}{n-h}. \] Under \(H_0\): the residuals are white noise, \(Q_{LB} \sim \chi^2_{K-m}\) approximately for large \(n\) (degrees of freedom reduced by the \(m\) parameters already fit). Large \(Q_{LB}\) (small \(p\)-value) rejects white-noise residuals, indicating remaining structure the model failed to capture — suggesting a higher \(ARMA\) order, missed seasonality (check seasonal lags, see SARIMA Processes), or (if applied to squared residuals) remaining ARCH effects requiring a GARCH-type variance model.

Practical use. Standard final diagnostic step after model fitting, alongside inspecting the ACF/PACF of residuals directly and comparing candidates via Model Selection Criteria (AIC BIC). Applying the test to squared residuals is the standard way to check whether conditional heteroskedasticity (ARCH/GARCH effects) remains unmodeled.

0.2 References

1 Backlinks

Back to top