Skip to main content
ExplainerTime Series AnalysisEvidence Pack· Updated · 4 min read· in Data & Analysis

Unit Root Tests: Detecting Non-Stationarity to Prevent Spurious Regressions

When two independent datasets trend upward over time, standard regression models will falsely declare them highly correlated. Econometricians use unit root tests to detect this non-stationarity and difference the data before the illusion of cause and effect can take hold.

By Nicolas Laurent

Share this story

Listen

In short

  • Spurious regression occurs when models falsely identify a correlation between independent trending variables.
  • A unit root indicates that a time series is non-stationary and its variance will grow infinitely.
  • The Augmented Dickey-Fuller (ADF) test is the primary tool used to detect unit roots.

Before an econometrician can trust a relationship between two variables over time, they must first prove the underlying data does not wander endlessly. The tool they deploy to make this decision is the unit root test, which determines whether a time series has a constant mean and variance, or if it must be mathematically differenced before any regression model is run.[2]

The danger of skipping this step is a mathematical trap known as spurious regression. When two completely independent datasets—such as cumulative rainfall in London and the closing price of the S&P 500—both trend upward over time, standard regression models will falsely declare them highly correlated. The model interprets the shared upward trajectory as a causal relationship, generating artificially high confidence metrics that deceive the analyst.[4]

This phenomenon was formally diagnosed in 1974 by statisticians Clive Granger and Paul Newbold. Through Monte Carlo simulations of 120 independent random walks, they demonstrated that standard Ordinary Least Squares (OLS) regressions would report a statistically significant relationship 76% of the time, despite the variables having absolutely zero actual connection. They found that these false regressions consistently produced an R-squared value greater than 0.90 and t-statistics well above the standard 2.0 threshold.

Two independent random walks will often produce a falsely high correlation if not differenced.

The root cause of this deception is non-stationarity. A stationary time series reverts to a constant mean over time, with a stable variance that makes future states predictable. A non-stationary series, however, possesses a "stochastic trend" where each new value is simply the previous value plus a random shock. Because these shocks accumulate permanently, the variance of the series grows infinitely over time, violating the core assumptions of classical regression.[1][3]

In mathematical terms, this accumulating behavior is called a "unit root." The name derives from the characteristic equation of the autoregressive model; if one of the roots of this equation equals exactly 1.0, the series is non-stationary. As the WallStreetMojo documentation explains, detecting this condition is the primary gateway in time-series forecasting, ensuring that "the statistical properties of the system do not change over time."[5]

To catch a unit root before it ruins a model, analysts rely on the Augmented Dickey-Fuller (ADF) test, developed in 1979. The ADF test sets a null hypothesis that a unit root is present. The analyst calculates a test statistic and compares it to a critical value; if the statistic is more negative than the critical value (typically at a 0.05 alpha level), the null hypothesis is rejected, confirming the data is stationary.[5]

The null hypotheses of the primary stationarity tests.

The "Augmented" portion of the ADF test allows it to handle more complex time-series dynamics by including lagged differences of the data. This ensures that serial correlation in the error terms does not artificially inflate the test statistic. However, selecting the correct number of lags is crucial; too few lags leave the test biased, while too many drain its statistical power.[2]

Because the ADF test assumes the error terms have a constant variance, it can struggle with real-world financial data that exhibits volatility clustering. In 1988, Peter Phillips and Pierre Perron introduced the Phillips-Perron (PP) test to solve this. Instead of adding lagged differences, the PP test applies a non-parametric correction to the standard error of the test statistic, making it robust to unspecified autocorrelation and heteroskedasticity.[1]

Both the ADF and PP tests suffer from low statistical power in small samples, meaning they often fail to reject the null hypothesis when a series is actually stationary but highly persistent. To counter this, econometricians use the KPSS test, which flips the framework entirely. The KPSS test sets its null hypothesis to assume the data is stationary. By running the ADF and KPSS tests concurrently, analysts can cross-verify the results and isolate series that are merely trend-stationary.[2]

When a unit root test confirms the data is non-stationary, the analyst cannot proceed with a standard regression. Instead, they must transform the data through "first differencing"—subtracting the previous observation from the current one. As MathWorks documentation notes, "A unit root process is a data-generating process whose first difference is stationary."[2][3]

First-differencing transforms a non-stationary series into a stationary one by measuring the rate of change.

Differencing shifts the analysis from absolute values to rates of change. Instead of regressing the total GDP against total carbon emissions, the econometrician regresses the month-over-month change in GDP against the month-over-month change in emissions. This strips away the shared stochastic trend, revealing whether the two variables actually move together on a granular level.[4]

While unit root tests are foundational to modern econometrics, they are not infallible. Structural breaks—sudden shifts in a time series caused by external shocks like a pandemic or a policy change—can trick both the ADF and PP tests into falsely identifying a unit root. In these edge cases, analysts must deploy specialized algorithms, such as the Zivot-Andrews test, which account for structural breaks while evaluating stationarity.[1]

Definitions

Spurious Regression
A statistical illusion where two independent variables appear highly correlated because they both trend over time.
Unit Root
A mathematical characteristic of a time series indicating that its variance grows infinitely over time, making it non-stationary.
Stationarity
A property of a time series where its mean, variance, and autocorrelation structure do not change over time.
First Difference
A data transformation technique where each value is subtracted from the subsequent value to remove a trend.
Null Hypothesis
The default assumption in a statistical test that the researcher attempts to disprove or reject.

Analysis by camp

Frequentist Econometricians

Rely strictly on p-values and critical thresholds to dictate data transformations.

For classical econometricians, the unit root test is an absolute gatekeeper. If the Augmented Dickey-Fuller test fails to reject the null hypothesis at the 0.05 level, the data must be differenced, regardless of the theoretical relationship between the variables. This camp prioritizes mathematical safety over narrative, arguing that running an Ordinary Least Squares regression on non-stationary data is statistical malpractice that guarantees invalid t-statistics and inflated R-squared values.

Cointegration Advocates

Argue that differencing destroys valuable long-term equilibrium data.

While acknowledging the danger of spurious regression, this camp argues that blindly differencing non-stationary data throws away crucial long-term information. If two variables share a unit root but move together over the long run—such as short-term and long-term interest rates—they are 'cointegrated.' Instead of differencing the data into short-term noise, these analysts use error-correction models to capture both the short-term dynamics and the long-term equilibrium, preserving the economic reality the data represents.

Classical Econometricians 60%Time-Series Forecasters 40%
Classical Econometricians
Prioritize strict hypothesis testing and differencing to ensure regression assumptions are never violated.
Time-Series Forecasters
Focus on predictive accuracy and often use cointegration techniques to preserve long-term relationships that differencing destroys.

Perspectives this story doesn't cover

  • High-frequency algorithmic traders
  • Climate scientists modeling non-stationary global temperatures

Sources

Source coverage

6 outlets

2 viewpoints surfaced

Classical Econometricians 60%Time-Series Forecasters 40%
  1. [1]Yale University (Cowles Foundation)Classical Econometricians

    UNDERSTANDING SPURIOUS REGRESSIONS IN ECONOMETRICS

    Read on Yale University (Cowles Foundation) →
  2. [2]MathWorksClassical Econometricians

    Unit Root Nonstationarity

    Read on MathWorks →
  3. [3]Principles of Econometrics with RClassical Econometricians

    Chapter 12 Time Series: Nonstationarity

    Read on Principles of Econometrics with R →
  4. [4]ResearchGate

    Spurious Regressions in Econometrics

    Read on ResearchGate →
  5. [5]WallStreetMojoTime-Series Forecasters

    Unit Root Tests - What Are They, Formula, Examples, Importance

    Read on WallStreetMojo →
  6. [6]Factlen Editorial Team

    Synthesis by Factlen editorial team

    Read on Factlen Editorial Team →
Listen

Comments

Stay informed

Every angle. Every day.

Get Data & Analysis stories with full source coverage and perspective breakdowns, free every day.