# Understanding Dickey-Fuller test results on series with non-constant variance

My understanding is that a time series that does not appear to have constant variance over time is not stationary and that the Dickey Fuller test tests for stationarity (with the null hypothesis that the series is not stationary).

I created a synthetic series of 1000 points where each successive point is drawn from a Gaussian distribution with increasing variance. I ran the Dickey Fuller test on the series and consistently get significant p-values indicating the series is stationary. I'm not sure if I'm misunderstanding the test or what a stationary series is.

import numpy as np
result = []
np.random.seed(42)
for i in np.arange(0,10,0.001):
result.append(np.random.normal(scale=i))


Output

-23.097799978008958
{'1%': -3.431005409094333, '5%': -2.8618296517685877, '10%': -2.566924176499291}

• Hi @Yandle. Perhaps print the output? But for the time being, the null is "the series exhibits unit root" Commented Oct 3, 2023 at 22:10
• Commented May 7 at 13:28

The null hypothesis of the augmented Dickey-Fuller test is not that the time series is nonstationary in general but specifically that it contains a unit root. The time series you generated does not contain a unit root, so the ADF test predictably rejects $$H_0$$, just as it should.
• The Wikipedia article seems to imply that unit root and non-stationary are synonymous "A unit root is present if $\rho =1$. The model would be non-stationary in this case.", is this incorrect? Commented Oct 4, 2023 at 15:05
• So the alternative hypothesis is $\rho\neq 1$, not 'stationarity'? Commented Oct 4, 2023 at 18:37
• @Yandle, the alternative hypothesis is $\rho<1$. There is also a version of the test where the alternative is $\rho>1$ (an explosive process) but it is less commonly applied. Commented Oct 4, 2023 at 19:03