Skip to content

Ljung–Box Test

A portmanteau hypothesis test that combines sample autocorrelations through a chosen lag to assess whether a time series or fitted-model residuals retain serial correlation across that lag set.

Version
v1 · 2026-09-28 · History
Domain-specific #
10456
Domain group
Formal Sciences
Origin domain
Experimental Design & Statistics
Subdomains
Time Series Diagnostics, Time Series Analysis → Experimental Design & Statistics
Aliases
Ljung-Box test, Ljung–Box portmanteau test, Modified Box–Pierce test

Core Idea

The Ljung–Box test asks a joint question about serial correlation. For a sequence of n observations and a chosen maximum lag h, it combines the squared sample autocorrelations at lags 1 through h using the weight n(n+2)/(n-k). Large values of the resulting Q statistic are inconsistent with a null in which the included population autocorrelations are zero, subject to the asymptotic approximation and other assumptions.

Scope of Application

  • ARIMA residual diagnostics. Analysts test whether fitted-model residuals retain autocorrelation after accounting for estimated parameters.
  • Time-series screening. A raw series can be checked for joint departure from zero autocorrelation across a stated horizon.
  • Model comparison. Residual portmanteau evidence can reveal that one candidate leaves more serial structure than another.
  • Simulation validation. Known null and alternative processes can test finite-sample calibration for a proposed lag rule.

Clarity

A report should state the sequence tested, sample size, maximum lag, statistic, degrees of freedom, p-value, and whether parameters were estimated. 'The data are random' is too broad: the null addresses selected autocorrelations, not every form of dependence. Lag selection should precede inspection when possible, because trying many horizons and reporting one p-value changes the evidential procedure.

Manages Complexity

Many lag-specific correlations become one diagnostic, reducing multiplicity and making residual adequacy easier to summarize. The price is localization: Q does not say which lags or dynamics dominate. Plotting residual autocorrelations, examining model structure, and checking conditional variance or distributional assumptions restore information hidden by the portmanteau statistic.

Abstract Reasoning

  1. Specify whether the input is a raw series or residuals from a named fitted model.
  2. Choose a maximum lag that fits the sampling frequency and diagnostic question.
  3. Compute sample autocorrelations consistently over the effective observations.
  4. Form the Ljung–Box Q statistic rather than silently substituting the Box–Pierce formula.
  5. Select reference degrees of freedom that account for fitted parameters where required.

Knowledge Transfer

The procedure transfers across econometric, engineering, environmental, and other time series when ordering, lag, and null assumptions are meaningful. It does not transfer to unordered cross-sectional data. A generic omnibus test in another domain shares the portmanteau pattern but is not the Ljung–Box test unless the weighted autocorrelation statistic and its calibration are retained.

Relationships to Other Abstractions

Local relationship map for Ljung–Box TestParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Ljung–Box TestDOMAINDomain-specific abstraction: Portmanteau test — is a kind ofPortmanteau testDOMAIN

Current abstraction Ljung–Box Test Domain-specific

Parents (1) — more general patterns this builds on

  • Ljung–Box Test is a kind of Portmanteau test Domain-specific

    The Ljung–Box Test is the Portmanteau Test that aggregates sample autocorrelations through a chosen lag into one residual-serial-correlation statistic.

Hierarchy paths (4) — routes to 4 parentless roots

Neighborhood in Abstraction Space

Ljung–Box Test sits in a moderately populated region (53rd percentile for distinctiveness): it has near-neighbors but no dense thicket of look-alikes.

Family — Statistical Hypothesis Tests & Diagnostics (9 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-08