A test of whether a proposed ARMA model describes a time series. Suppose that the model has p parameters and the time series has n observations. Let xj and x̂j be, respectively, the jth observed and fitted values, define aj by aj=xj−x̂j and define rk by The Box–Ljung statistic, Q, is given by where m is arbitrary and very much smaller than n, but usually about 24. If the model is correct then Q is an observation from a chi-squared distribution with (m−p) degrees of freedom.