Test whether a series is stationary with the Augmented Dickey-Fuller test, and learn to fix it when it isn't — trend differencing, seasonal differencing, and when a transformation actually helps.
Welcome to Stationarity and Differencing, the third module of the course. Module 2 decomposed Cyclepath into trend, seasonality, and residual and interpreted each one — but a series with a trend and a repeating seasonal wave is, by definition, not stationary: its mean keeps climbing and its typical value keeps swinging with the calendar. The ARIMA family of models you’ll meet starting in Module 5 assumes stationarity going in, which makes this module the bridge between “I understand my series” and “I can actually model it.”
You’ll start with what stationarity means precisely — constant mean, constant variance, autocorrelation that doesn’t depend on when you measure it — and see informally that Cyclepath fails all three. You’ll then make that judgment formal with the Augmented Dickey-Fuller test, a statistical test for exactly this question. From there you’ll fix non-stationarity with differencing: first removing trend, then removing seasonality, and — critically — learning that more differencing isn’t automatically better. The module capstone runs the full decision process on Cyclepath and lands on the specific transformation that stationarizes it without overdoing it.
Every test, every p-value, and every comparison in this module is computed for real with statsmodels.tsa.stattools.adfuller on the same seeded Cyclepath series from Modules 1 and 2. Start with Lesson 1 on what stationarity actually requires.
Complete all 5 lessons to finish the Stationarity and Differencing module.