Unit Root Tests
Unit root tests tell you whether a time series is stationary or non-stationary. This matters because non-stationary data can produce spurious regressions, where two unrelated series appear to have a significant relationship simply because they both trend over time. Before you model a time series, you need to know what you're working with.
The two main tests covered here are the Augmented Dickey-Fuller (ADF) test and the Kwiatkowski-Phillips-Schmidt-Shin (KPSS) test. They approach the question from opposite directions: ADF assumes non-stationarity until proven otherwise, while KPSS assumes stationarity until proven otherwise. Using both together gives you a much more reliable answer.
Unit roots and time series stationarity
A unit root is a feature of a time series where shocks don't fade away over time. Instead, they permanently shift the level of the series. A classic example is a random walk: each value equals the previous value plus some random noise, so any shock gets "baked in" forever.
Why does this matter for stationarity?
- A stationary series has a constant mean, constant variance, and autocovariance that depends only on the lag (not on time). It tends to revert to its mean after a shock.
- A series with a unit root is non-stationary. Its mean and variance change over time, and it can drift upward or downward without bound.
- If you run a regression on non-stationary data without addressing the unit root, you risk finding relationships that don't actually exist. Standard t-tests and F-tests become unreliable.

Application of ADF test
The Augmented Dickey-Fuller (ADF) test checks whether a unit root is present. Its null hypothesis is that the series has a unit root (is non-stationary). You're trying to gather enough evidence to reject that null.
The "augmented" part means it extends the original Dickey-Fuller test by including lagged difference terms. These extra terms absorb any serial correlation in the residuals so the test statistic remains valid.
The ADF regression equation:
Here's what each piece does:
- : The first difference of the series (today's value minus yesterday's)
- : A constant (intercept), allowing for a non-zero mean
- : A deterministic time trend (you can include or exclude this depending on whether you think the series has a trend)
- : The lagged level of the series. This is the key term. If , the series has a unit root.
- : Lagged differences that capture short-run dynamics and clean up autocorrelation. You choose the lag order using information criteria (like AIC or BIC).
Steps to run the ADF test:
- Decide whether to include a constant only, or a constant plus trend, based on what the data looks like.
- Choose the lag order (often selected automatically by AIC/BIC).
- Estimate the regression above using OLS.
- Compute the t-statistic for .
- Compare that t-statistic to the ADF critical values (these are not standard t-distribution critical values; they come from special Dickey-Fuller tables).

Interpretation of ADF test results
The ADF test statistic is a t-ratio for , but you compare it against Dickey-Fuller critical values, not the usual t-distribution. These critical values are more negative than standard ones.
- If the test statistic is more negative than the critical value at your chosen significance level (1%, 5%, or 10%), you reject the null. The series is stationary.
- If the test statistic is less negative than the critical value, you fail to reject the null. The evidence suggests a unit root is present.
For example, suppose your ADF statistic is and the 5% critical value is . Since , you reject the null and conclude the series is stationary.
When you fail to reject, the typical next step is to difference the series (take ) and test again. If the differenced series is stationary, you say the original series is "integrated of order 1," or .
KPSS test for stationarity
The KPSS test flips the logic. Its null hypothesis is that the series is trend-stationary (or level-stationary, depending on the version you use). The alternative is that a unit root is present.
This reversal is useful because the ADF test's failure to reject doesn't confirm non-stationarity; it just means you didn't find enough evidence against it. The KPSS test lets you actively test for stationarity.
Steps to run the KPSS test:
- Regress the series on a constant (level-stationarity version) or a constant plus time trend (trend-stationarity version).
- Collect the residuals from that regression.
- Compute the KPSS test statistic from the cumulative sum of those residuals. The statistic is based on a ratio involving the partial sum of residuals and an estimate of the long-run variance.
- Compare the test statistic to KPSS critical values.
- A large test statistic means you reject the null of stationarity, suggesting the series has a unit root.
- A small test statistic means you fail to reject, supporting stationarity.
One practical detail: the KPSS test requires choosing a bandwidth (lag truncation parameter) to estimate the long-run variance. Results can be sensitive to this choice, so it's worth checking whether your conclusion changes with different bandwidth settings.
ADF vs KPSS test comparison
The key difference between these tests is their null hypotheses:
| ADF | KPSS | |
|---|---|---|
| Null hypothesis | Unit root (non-stationary) | Trend-stationary |
| Alternative hypothesis | Stationary | Unit root (non-stationary) |
| Reject null means | Series is stationary | Series is non-stationary |
| Strengths and limitations: |
- The ADF test is widely used and straightforward to interpret, but it has low power against near-unit-root processes. If the true autoregressive coefficient is close to 1 (say, 0.97), ADF often fails to reject the null even though the series is technically stationary. It also struggles with small samples.
- The KPSS test is more sensitive at detecting departures from stationarity, but it's sensitive to the bandwidth parameter. Different bandwidth choices can lead to different conclusions.
Using both tests together gives you four possible outcomes:
| ADF result | KPSS result | Conclusion |
|---|---|---|
| Rejects null (stationary) | Fails to reject null (stationary) | Strong evidence of stationarity |
| Fails to reject (unit root) | Rejects null (non-stationary) | Strong evidence of non-stationarity |
| Rejects null (stationary) | Rejects null (non-stationary) | Conflicting results; may need more investigation |
| Fails to reject (unit root) | Fails to reject (stationary) | Conflicting results; may need more investigation |
When both tests agree, you can be more confident in your conclusion. When they conflict, the series may be near the boundary between stationary and non-stationary, and you might need a longer sample, a different test (like the Phillips-Perron test), or careful judgment about how to proceed.