Unit Roots and the Dickey–Fuller Test

Deciding how many times to difference a series — the d of an ARIMA model — sounds like it should be a matter of eyeballing a plot. It is not, and the reason is one of the most consequential facts in applied time series: a genuinely non-stationary random walk and a stationary but highly persistent process can look identical to the eye, yet they demand completely different treatment. Get it wrong and your forecasts, confidence intervals, and any regression involving the series can be badly, invisibly wrong.

The precise question — "does this series have to be differenced?" — has a precise answer, phrased in the language of the AR polynomial's roots. That answer is the unit root, and the Dickey–Fuller test is the hypothesis test built to detect it.

What a unit root is

Take the autoregressive polynomial from the AR part of the model, \phi(z) = 1 - \phi_1 z - \dots - \phi_p z^{p}. Everything about stationarity is decided by where this polynomial's roots sit in the complex plane: causality requires every root to lie outside the unit circle (|z| > 1).

So "test for a unit root" and "test whether we must difference" are the same question. If the largest root is at 1 we difference; if it is safely outside the circle the series is already stationary and differencing would only harm it.

The two that look alike

Below are two series driven by the same sequence of shocks. One is a random walk (\phi = 1, a true unit root, non-stationary). The other is a stationary AR(1) with \phi = 0.9 — persistent, wandering in long swings, but ultimately mean-reverting. Try to say which is which. You cannot, reliably — and that visual ambiguity is the entire reason a formal test exists.

The difference is invisible over any short stretch, because near the boundary the mean-reverting pull of \phi = 0.9 is so weak it takes dozens of steps to show. The test has to tease apart what the picture cannot.

The Dickey–Fuller regression

Start from an AR(1), y_t = \phi\, y_{t-1} + \varepsilon_t. Subtract y_{t-1} from both sides and write \gamma = \phi - 1:

\Delta y_t = (\phi - 1)\,y_{t-1} + \varepsilon_t = \gamma\, y_{t-1} + \varepsilon_t.

This clever reparametrisation turns the awkward "is \phi = 1?" into a clean regression of the change \Delta y_t on the level y_{t-1}, with the whole question resting on the single coefficient \gamma:

You compute the usual-looking statistic \text{DF} = \hat\gamma / \operatorname{se}(\hat\gamma) and, as in any hypothesis test, reject H_0 when it falls below a critical value.

The twist: it is not a t-test

Here is what makes Dickey–Fuller special — and a favourite exam trap. The statistic \hat\gamma / \operatorname{se}(\hat\gamma) looks exactly like a t-statistic, but under the null it does not follow a t (or normal) distribution. The reason is deep: under H_0 the regressor y_{t-1} is itself a non-stationary random walk, which violates the standard regression asymptotics. Its sampling distribution — the Dickey–Fuller distribution — is non-standard, skewed to the left, and was originally found by Monte-Carlo simulation.

The practical consequence: you must use Dickey and Fuller's own tabulated critical values, which are considerably more negative than the familiar -1.65 or -1.96. For a model with a constant, the 5% cutoff is around -2.86, not -1.96. Grab a t-table by mistake and you will reject the unit root far too often — declaring series stationary that are not. The p-value likewise must come from the DF distribution, which is why software reports a special "MacKinnon" p-value.

ADF and KPSS: the working toolkit

Real series are rarely pure AR(1). The Augmented Dickey–Fuller (ADF) test handles that by throwing extra lagged differences into the regression to soak up any leftover autocorrelation, so the test on \gamma stays valid:

\Delta y_t = \alpha + \gamma\, y_{t-1} + \sum_{i=1}^{k} \delta_i\, \Delta y_{t-i} + \varepsilon_t.

(Optional terms \alpha and a trend let you test around a non-zero mean or a deterministic trend.) The hypotheses are unchanged; only the nuisance structure is cleaned up.

A wise analyst also runs the KPSS test, which is built the other way round: its null is stationarity and its alternative is a unit root — the mirror image of ADF. Because the two tests swap null and alternative, they are complementary. When ADF fails to reject (suggesting a unit root) and KPSS rejects (also suggesting non-stationarity), you can difference with real confidence. When they disagree, the evidence is genuinely ambiguous — and that is useful to know rather than to paper over.

TestNull hypothesis H₀Rejecting H₀ suggests
ADFunit root (non-stationary)stationary
KPSSstationaryunit root (non-stationary)

Unit-root tests have low power near the boundary. A stationary process with \phi = 0.97 is genuinely mean-reverting, but the ADF test will usually fail to reject the unit root anyway — it simply cannot distinguish 0.97 from 1.00 in a sample of a few hundred points. So "failed to reject H_0" is not proof of a unit root; it is the ordinary absence of evidence. The failure mode this creates is over-differencing: reflexively differencing every series the test won't clear, thereby injecting a spurious non-invertible MA term into a series that was fine. Combine the test with economic sense, the KPSS cross-check, and a look at whether differencing actually reduced the variance — never let a single p-value near the knife-edge make the call alone.

The unit root is not just an ARIMA bookkeeping detail — it is the source of the notorious spurious regression. Regress one independent random walk on another and you will routinely get a huge t-statistic and an R^2 near 1, screaming a relationship that does not exist. Both series merely wander, and wandering series drift together by accident often enough to fool the standard errors completely. Recognising unit roots — and either differencing or testing for a genuine long-run link (cointegration) — is what rescues you. It is precisely this problem that won the field a Nobel Prize, and it all traces back to a root sitting at z = 1.