Course contentsShow
← Data Science
Lesson 716 of 2,14519. Time Series FoundationsFree lesson

Augmented Dickey-Fuller Test

Apply the ADF test to formally test for unit roots and determine if a series is stationary using p-values.

Augmented Dickey-Fuller Test

You'll learn how to formally test whether a time series is stationary using a statistical test with a clear p-value.

What Is the Augmented Dickey-Fuller (ADF) Test?

So far, you've eyeballed plots to guess if a series is stationary. The Augmented Dickey-Fuller test gives you a rigorous, statistical answer. It tests the null hypothesis that a unit root is present—meaning the series is non-stationary. If you reject this null hypothesis (low p-value), you have evidence the series is stationary.

Think of a unit root like a "memory problem": the series keeps drifting because it remembers all past values instead of reverting to a mean. The ADF test checks if this memory problem exists.

How to Interpret the ADF Test

The test gives you:

  • Test statistic: A negative number; more negative = more evidence of stationarity
  • P-value: Probability the series has a unit root

Decision rule:

  • P-value < 0.05 (or your chosen α): Reject the null → series is stationary ✓
  • P-value ≥ 0.05: Fail to reject → series is non-stationary (has unit root) ✗

Example Interpretation

Imagine testing daily stock prices:

  • ADF statistic = -1.2, p-value = 0.67 → Non-stationary (prices drift, no mean reversion)

Now test the daily returns (price changes):

  • ADF statistic = -8.5, p-value = 0.0001 → Stationary (returns fluctuate around zero)

This confirms what you suspected from visual inspection: raw prices trend, but returns are stable.

Why This Matters

Many forecasting models (like ARIMA) require stationary data. The ADF test tells you definitively whether you need to difference your series or apply transformations before modeling.

Key Takeaway: The Augmented Dickey-Fuller test formally checks for unit roots using p-values: p < 0.05 means your series is stationary and ready for modeling.