I am using python for time-series analysis of count data and came across a problem where I have a time-series that to me looks non-stationary but the Augmented Dickey-Fuller test (implemented in statsmodels) rejects the null hypothesis quite strongly and thus suggests the time-series is stationary.
Here are the specifics: I have included a plot of the time-series below as well as the raw data. Raw Data:
[17.0, 1.0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 20.0, 866.0, 5386.0, 295.0, 452.0, 227.0, 632.0, 2821.0, 989.0, 1244.0, 934.0, 1462.0, 541.0, 2030.0, 573.0, 1191.0, 466.0, 585.0, 3045.0, 3386.0, 3354.0, 2310.0, 4094.0, 3850.0, 4800.0, 1082.0, 1032.0, 247.0, 1830.0, 3912.0, 2959.0, 2157.0, 1741.0, 1231.0, 1099.0, 60.0, 14.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 7.0, 2.0, 0.0, 0.0, 0.0, 7.0, 0.0, 4.0, 1.0, 2.0, 30.0, 43.0, 241.0, 147.0, 26.0, 94.0, 4.0, 9.0, 3.0, 3.0, 9.0, 11.0, 21.0, 13.0, 5.0, 9.0, 21.0, 17.0, 52.0, 23.0, 1489.0, 646.0, 1515.0, 589.0, 623.0, 143.0, 77.0, 11.0, 25.0, 124.0, 74.0, 197.0, 72.0, 199.0, 963.0, 1058.0, 310.0, 866.0, 537.0, 502.0, 248.0, 786.0, 655.0, 667.0, 864.0, 336.0, 126.0, 127.0, 58.0, 70.0, 43.0, 836.0, 49.0, 38.0, 137.0, 194.0, 157.0, 5.0, 9.0, 60.0, 84.0, 21.0, 17.0, 4.0, 2.0, 9.0, 433.0, 284.0, 6.0, 22.0, 25.0, 42.0, 33.0, 6.0, 1.0, 8.0, 15.0, 27.0, 19.0, 220.0, 415.0, 96.0, 210.0, 449.0, 15.0, 49.0, 173.0, 842.0, 290.0, 59.0, 10.0, 2.0, 5.0, 0.0, 0.0, 0.0, 20.0, 11.0, 50.0, 39.0, 139.0, 15.0, 19.0, 16.0, 30.0, 6.0, 9.0, 15.0, 291.0, 53.0, 65.0, 148.0, 845.0, 157.0, 33.0, 33.0, 14.0, 14.0, 91.0, 113.0, 91.0, 513.0, 187.0, 54.0, 5.0, 4.0, 2.0, 1.0, 2.0, 0.0, 2.0, 4.0, 3.0, 243.0, 90.0, 35.0, 67.0, 134.0, 590.0, 462.0, 159.0, 45.0, 5.0, 0.0, 1.0, 0.0, 0.0, 2.0, 0.0, 4.0, 25.0, 8.0, 46.0, 18.0, 32.0, 1431.0, 98.0, 1648.0, 1056.0, 3938.0, 8227.0, 915.0, 565.0, 762.0, 529.0, 1776.0, 384.0, 127.0, 11.0, 30.0, 1591.0, 462.0, 111.0, 349.0, 4154.0, 1355.0, 412.0, 485.0, 419.0, 713.0, 1098.0, 668.0, 139.0, 460.0, 966.0, 1543.0, 317.0, 475.0, 162.0, 880.0, 376.0, 333.0, 541.0, 313.0, 301.0, 89.0, 238.0, 122.0, 633.0, 186.0, 62.0, 38.0, 9.0, 951.0, 5.0, 450.0, 36.0, 20.0, 36.0, 28.0, 3.0, 12.0, 2.0, 3.0, 1.0, 2.0, 5.0, 14.0, 8.0, 19.0, 38.0, 59.0, 23.0, 31.0, 174.0, 16.0, 28.0, 69.0, 26.0, 141.0, 8.0, 10.0, 6.0, 3.0, 1.0, 33.0, 11.0, 8.0, 519.0, 138.0, 43.0, 694.0, 379.0, 864.0, 37.0, 39.0, 27.0, 5.0, 59.0, 24.0, 15.0, 10.0, 6.0, 8.0, 39.0]
And here is the results of the Augmented Dickey-Fuller from statsmodels:
ADF Statistic: -4.191
Corresponding p-value: 0.00068
My question really boils down to:
- Am I doing the analysis wrong (i.e., do you get a different answer or am I using the test inappropriately?) or interpreting the results wrong?
- If I am interpreting this correctly, can someone give me some intuition for why the above time-series is stationary? To me it looks like the variance and the expected value would not be constant throughout the time-series.