Ljung-Box Test (Autocorrelation)
Computes the Ljung-Box test statistic, which checks whether a time series exhibits autocorrelation — that is, whether the values carry memory of past values instead of being independent. Rather than looking at one lag at a time, it combines the autocorrelations of several lags into a single statistic that approximately follows a chi-square. It's the standard test for checking whether an ARIMA model's residuals have become white noise. Enter the series and the number of lags.
Resultado
—
Ljung-Box Test (Autocorrelation)
Computes the Ljung-Box test statistic, which checks whether a time series exhibits autocorrelation — that is, whether the values carry memory of past values instead of being independent. Rather than looking at one lag at a time, it combines the autocorrelations of several lags into a single statistic that approximately follows a chi-square. It's the standard test for checking whether an ARIMA model's residuals have become white noise. Enter the series and the number of lags.
Do the residuals still hold a pattern or are they noise?
After fitting a model to a time series, the decisive question is whether structure remains in the residuals. If it does, the model left information on the table. The Ljung-Box test answers this in one shot, looking not at an isolated lag but at the set of the first autocorrelation lags together.
The statistic sums the squares of the autocorrelations up to the chosen lag, each weighted so that more reliable lags carry more weight. If the series were pure white noise, those autocorrelations would all be near zero and the sum would stay small; remaining structure inflates the Q value, which approximately follows a chi-square with degrees of freedom equal to the number of lags.
Enter the series and the number of lags to examine. The tool returns the Q statistic and the degrees of freedom. A common lag choice is around the logarithm of the sample size, or a value that covers the expected seasonality. Use it both to check ARIMA model residuals and to test whether a raw series has memory.
Related Tools
Mann-Kendall Trend Test
Computes the Mann-Kendall test, used to detect a monotonic trend (upward or downward) in a time series without assuming the data are normal or the trend is linear. It sums the signs of all pairwise comparisons between values: if the series tends to rise over time, positive signs prevail. It's widely used in hydrology, climatology and environmental science to assess trends in long series. The S statistic becomes a z via the normal approximation, with a tie correction. Enter the series in chronological order.
Cochran's Q Test
Computes Cochran's Q test, the extension of McNemar's test to three or more binary treatments measured on the same subjects. Imagine asking each person whether they approve of three different products (yes/no): the test checks whether the approval proportion differs across products, respecting the fact that they're the same respondents. It's effectively the dichotomous-response version of the Friedman test. The Q statistic approximately follows a chi-square. Enter the subjects with 0/1 treatments.
Kruskal-Wallis H Test
Computes the Kruskal-Wallis H test, the non-parametric version of ANOVA for comparing three or more independent groups. Just as Mann-Whitney does for two groups, it works with the ranks of the data instead of the raw values, dispensing with the normality assumption. The H statistic approximately follows a chi-square distribution. It's the choice when the data are ordinal or clearly non-normal. Enter the groups: values by comma, groups by semicolon.
The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.