A test for autocorrelated errors. The Box-Pierce Q statistic is computed as the weighted sum of squares of a sequence of autocorrelations. If the errors of the model are white noise, then the Box-Pierce statistic is distributed approximately as a chi-square distribution with h v Ljung-Box test, which is a version of the Box-Pierce test.