A series is stationary when its mean, variance and autocorrelation don't drift over time. Real-world series rarely are — they carry a trend (deterministic drift) and/or a unit root (a random walk, where today's shock permanently shifts all future values). ARIMA and most classical forecasters require stationarity first.
Differencing removes a unit root by replacing the series with its own increments:
y'_t = y_t − y_{t−1} (regular diff, order d)
y'_t = y_t − y_{t−L} (seasonal diff, lag L=12)
Each extra order of d subtracts one more level of drift; a series with a single random-walk component becomes stationary after exactly one difference (I(1)), a quadratic trend needs two (I(2)).
The Augmented Dickey-Fuller test checks for a remaining unit root by regressing the increment on the lagged level and one lagged increment:
Δy_t = α + β·y_{t−1} + γ·Δy_{t−1} + ε_t
ADF stat = β̂ / SE(β̂)
If β is indistinguishable from 0, yt-1 has no pull back toward a mean — the series wanders forever (non-stationary). The more negative the t-statistic, the stronger the pull-back. This simulator computes that regression by ordinary least squares on whatever series the current transform produces, and compares it against the classic 5% asymptotic critical value of −2.86: statistic below the threshold ⇒ reject the unit-root hypothesis ⇒ stationary.
- Sliders — mix deterministic trend, random-walk drift and a 12-step seasonal cycle into the raw series (back row, dim).
- Seasonal diff / d buttons — build the transform pipeline (seasonal diff first, then d regular diffs); the front row (bright) shows the result and drives the ADF numbers.
- New Random Series — redraws the noise with a fresh seed so you can confirm the effect isn't a fluke of one draw.