# Statsmodel Ljung-Box test for non-zero mean

I have few time series, which I would like to model using ARIMA. But plotting ACF and PACF indicates these series are probably white noise. I am using Ljung-Box test to confirm it. I am implementing it in Python using statsmodel package. However, the documentation of statsmodel say for the series it:

Assumed to have mean zero

Does this test will give incorrect result if the time-series has non-zero mean or it calculates the mean and then proceeds further?

The statement that mean zero is assumed is incorrect in the development documentation.

The Ljung-Box test is usually used with residuals which have mean zero. However, the test statistic is based on the sum of autocorrelations which are computed from the demeaned data.

So, acorr_ljungbox in statsmodels always removes the mean.