Statistical Tests Open Access

Augmented Dickey-Fuller Test

Introduction

The Augmented Dickey-Fuller (ADF) Test checks whether a time series is stationary-that is, whether its mean, variance, and overall behavior stay stable over time-or whether it has a unit root and drifts unpredictably, the way a random walk does. If you are working with time-ordered data-stock prices, exchange rates, quarterly revenue, sensor readings-before fitting an ARIMA model, running a regression on the raw levels, or testing for cointegration, this is usually the test you run first.

By the end of this article you will be able to state exactly when an Augmented Dickey-Fuller Test applies, compute the underlying regression completely by hand on two different worked examples, understand why the test statistic needs its own special critical values instead of a standard t-distribution, interpret the result correctly, know what to do if a unit root is detected, and run the same test in one line of Python with statsmodels.

What Is the Augmented Dickey-Fuller Test?

Many statistical tools-ordinary regression, correlation, ARIMA forecasting-implicitly assume a time series is stationary: its mean doesn't drift, its variance doesn't balloon, and shocks eventually fade rather than compounding forever. A huge number of real-world series violate this-stock prices, GDP, cumulative sums of any kind-because they behave like a random walk, where today's value is yesterday's value plus an unpredictable shock that never gets pulled back. That "never pulled back" property is called having a unit root, and the Augmented Dickey-Fuller Test is built specifically to detect it.

It exists because treating a non-stationary series as if it were stationary is one of the most common ways time series analysis goes wrong-regressions between two unrelated random-walk series can show a strong, entirely spurious correlation, and ARIMA models fit to non-stationary data without differencing tend to produce unstable, unreliable forecasts. Catching this early, before fitting any downstream model, is the entire purpose of running an ADF Test as a standard first diagnostic.

Core idea in one line: regress the change in the series on its own lagged level-if that lagged level has no real power to pull the series back toward a stable mean, the coefficient will be statistically indistinguishable from zero, which is exactly the signature of a unit root.

When to Use It

Use an Augmented Dickey-Fuller Test whenever you have a single time series and need to know whether it is stationary before doing something else with it-fitting an ARIMA/SARIMA model, running a regression where the series appears as a dependent or independent variable, or checking a precondition for a cointegration test like Engle-Granger. The key requirement: you have one time-ordered series (or a candidate residual series) and want to know whether it behaves like stable noise around a fixed mean or like a wandering random walk.

ScenarioSeriesWhat's Being Checked
ARIMA model buildingMonthly sales, website traffic, demandWhether differencing is needed before fitting the model
Macroeconomic analysisGDP, inflation rate, unemployment rateWhether the series is a random walk or reverts to a trend
Financial time seriesStock prices, exchange rates, index levelsWhether raw price levels are safe to regress directly
Cointegration analysisResiduals from a regression between two price seriesWhether the residual spread is stationary (a sign of cointegration)
Sensor/IoT monitoringTemperature, vibration, or load readings over timeWhether the process is drifting or holding a stable baseline
Not just for economics. Although the Dickey-Fuller framework originated in econometrics, it applies to any single time series you plan to model, forecast, or regress on-including machine learning pipelines with time-indexed features, wherever you want to confirm the series isn't quietly wandering rather than behaving stably.

Key Assumptions

  • The series is a single, time-ordered sequence: the test is built for one series at a time, observed in its correct chronological order-shuffled or unordered data makes the test meaningless.
  • The underlying process can be reasonably approximated by an autoregressive model: the ADF regression assumes the series' dynamics can be captured by its own lagged values plus lagged differences, which is a good approximation for most economic, business, and physical time series but not all.
  • The lag order is chosen correctly: too few lagged difference terms leave residual autocorrelation in the errors, which biases the test; too many lags cost power and can weaken the test's ability to detect stationarity that is genuinely there.
  • The correct regression variant is used: whether to include a constant, a constant plus trend, or neither depends on the series' visible behavior-see Critical Values and Test Variants-and using the wrong variant can flip the conclusion.
  • No missing observations within the sequence: gaps in an otherwise time-ordered series distort both the differencing step and the lag structure the test relies on.

Hypotheses

The Augmented Dickey-Fuller Test formally tests whether the coefficient \( \beta \) on the lagged level term in the ADF regression is zero:

  • Null Hypothesis (\( H_0 \)): \( \beta = 0 \)-the series has a unit root and is non-stationary.
  • Alternative Hypothesis (\( H_1 \)): \( \beta < 0 \)-the series is stationary (a one-sided, left-tailed alternative).

(Notice the direction here is the reverse of what many tests feel like: rejecting \( H_0 \) is the "good news" outcome that supports stationarity, while failing to reject \( H_0 \) is direct evidence of a unit root, not merely an inconclusive result.)

The Formula, Explained

Let \( y_1, y_2, \ldots, y_n \) be the observed time series in its natural order, and let \( \Delta y_t = y_t - y_{t-1} \) denote the first difference. The Augmented Dickey-Fuller Test fits the following regression by ordinary least squares:

\[ \Delta y_t = \alpha + \beta y_{t-1} + \sum_{i=1}^{p} \gamma_i \, \Delta y_{t-i} + \varepsilon_t \]

Here \( \alpha \) is a constant (drift) term, \( \beta \) is the coefficient of interest on the lagged level \( y_{t-1} \), and the summed \( \gamma_i \, \Delta y_{t-i} \) terms are lagged differences included to soak up any remaining autocorrelation in the errors-this is the "augmented" part that separates the ADF Test from the simpler original Dickey-Fuller Test, which uses no lagged difference terms at all (\( p = 0 \)).

The test statistic is the ordinary t-statistic on \( \hat{\beta} \):

\[ \text{ADF} = \frac{\hat{\beta}}{\text{SE}(\hat{\beta})} \]

This looks exactly like a textbook t-statistic, but it is not compared against a standard t-distribution. Under the null hypothesis of a unit root, \( \hat{\beta} \) does not have the usual asymptotic normal distribution-Dickey and Fuller derived a different, left-skewed limiting distribution, and published a dedicated set of critical values for it (later extended by MacKinnon), covered next.

Critical Values and Test Variants

Because \( \hat{\beta} \)'s distribution under \( H_0 \) is non-standard, the ADF Test cannot be evaluated with ordinary t-tables. Instead, Dickey and Fuller derived-and MacKinnon later refined into response-surface formulas usable for any sample size-a separate set of critical values that depend on which of three regression variants you fit:

VariantRegressionWhen to Use
No constant, no trend\( \Delta y_t = \beta y_{t-1} + \sum \gamma_i \Delta y_{t-i} + \varepsilon_t \)Series that plausibly wanders around zero with no drift-rare in practice
Constant only (most common)\( \Delta y_t = \alpha + \beta y_{t-1} + \sum \gamma_i \Delta y_{t-i} + \varepsilon_t \)Series with a non-zero mean or drift but no visible deterministic trend
Constant and trend\( \Delta y_t = \alpha + \delta t + \beta y_{t-1} + \sum \gamma_i \Delta y_{t-i} + \varepsilon_t \)Series that visibly trends upward or downward over time

Representative asymptotic critical values for the constant-only variant (the most commonly reported):

Significance LevelApproximate Critical Value
1%\( \approx -3.43 \)
5%\( \approx -2.86 \)
10%\( \approx -2.57 \)
Reading the table. To reject \( H_0 \) at the 5% level, your ADF statistic needs to be more negative than about \( -2.86 \)-not just negative. A statistic of \( -1.2 \), while technically negative, does not come close to clearing that bar and would fail to reject \( H_0 \). Small samples use slightly more extreme critical values than the asymptotic ones shown here; software like statsmodels reports the exact, sample-size-adjusted values automatically.

Worked Example 1: A Trending (Non-Stationary) Series

Suppose we observe a series over 8 consecutive periods that climbs steadily, with no sign of reverting to any fixed level:

Time \( t \)12345678
\( y_t \)5.05.87.17.99.310.111.412.6

We fit the simplest ADF regression variant (\( p = 0 \) lagged differences, constant only): \( \Delta y_t = \alpha + \beta y_{t-1} + \varepsilon_t \).

Step 1: Build the differenced series and the lagged level

\[ \Delta y_t:\ 0.8,\ 1.3,\ 0.8,\ 1.4,\ 0.8,\ 1.3,\ 1.2 \qquad y_{t-1}:\ 5.0,\ 5.8,\ 7.1,\ 7.9,\ 9.3,\ 10.1,\ 11.4 \]

This leaves \( n = 7 \) usable observations after differencing.

Step 2: Compute the OLS estimates of \( \alpha \) and \( \beta \)

\[ \bar{y}_{t-1} = 8.086 \qquad \overline{\Delta y} = 1.086 \] \[ S_{xy} = \sum y_{t-1}\Delta y_t - n\,\bar{y}_{t-1}\,\overline{\Delta y} = 62.53 - 7(8.086)(1.086) \approx 1.036 \] \[ S_{xx} = \sum y_{t-1}^2 - n\,\bar{y}_{t-1}^2 = 489.92 - 7(8.086)^2 \approx 31.00 \] \[ \hat{\beta} = \frac{S_{xy}}{S_{xx}} \approx \frac{1.036}{31.00} \approx 0.033 \qquad \hat{\alpha} = \overline{\Delta y} - \hat{\beta}\,\bar{y}_{t-1} \approx 1.086 - (0.033)(8.086) \approx 0.815 \]

Step 3: Compute the standard error of \( \hat{\beta} \) and the ADF statistic

Using the fitted residuals \( \hat{\varepsilon}_t = \Delta y_t - \hat{\alpha} - \hat{\beta}\,y_{t-1} \), the residual sum of squares works out to \( \text{SSE} \approx 0.4125 \), giving \( s^2 = \text{SSE}/(n-2) \approx 0.4125/5 \approx 0.0825 \) and

\[ \text{SE}(\hat{\beta}) = \sqrt{\frac{s^2}{S_{xx}}} \approx \sqrt{\frac{0.0825}{31.00}} \approx 0.0506 \] \[ \text{ADF} = \frac{\hat{\beta}}{\text{SE}(\hat{\beta})} \approx \frac{0.033}{0.0506} \approx 0.661 \]

Step 4: Interpret

With an ADF statistic of \( \approx 0.661 \)-positive, and nowhere near the roughly \( -2.86 \) threshold needed at the 5% level-we fail to reject \( H_0 \). This series has a unit root: it is non-stationary, consistent with the steady upward climb visible in the raw data, where \( y_{t-1} \) has essentially no power to pull the next change back toward a fixed level.

Worked Example 2: A Mean-Reverting (Stationary) Series

Now suppose a second series over 10 consecutive periods oscillates and decays back toward zero rather than drifting away from it:

Time \( t \)12345678910
\( y_t \)4.02.31.60.50.9-0.30.4-0.60.1-0.2

Step 1: Build the differenced series and the lagged level

\[ \Delta y_t:\ -1.7,\ -0.7,\ -1.1,\ 0.4,\ -1.2,\ 0.7,\ -1.0,\ 0.7,\ -0.3 \] \[ y_{t-1}:\ 4.0,\ 2.3,\ 1.6,\ 0.5,\ 0.9,\ -0.3,\ 0.4,\ -0.6,\ 0.1 \]

This leaves \( n = 9 \) usable observations.

Step 2: Compute the OLS estimates of \( \alpha \) and \( \beta \)

\[ \bar{y}_{t-1} \approx 0.989 \qquad \overline{\Delta y} \approx -0.467 \] \[ S_{xy} = \sum y_{t-1}\Delta y_t - n\,\bar{y}_{t-1}\,\overline{\Delta y} \approx -12.11 - 9(0.989)(-0.467) \approx -7.957 \] \[ S_{xx} = \sum y_{t-1}^2 - n\,\bar{y}_{t-1}^2 \approx 25.53 - 9(0.989)^2 \approx 16.729 \] \[ \hat{\beta} = \frac{S_{xy}}{S_{xx}} \approx \frac{-7.957}{16.729} \approx -0.476 \qquad \hat{\alpha} = \overline{\Delta y} - \hat{\beta}\,\bar{y}_{t-1} \approx -0.467 - (-0.476)(0.989) \approx 0.004 \]

Step 3: Compute the standard error of \( \hat{\beta} \) and the ADF statistic

The residual sum of squares from this fit is \( \text{SSE} \approx 2.516 \), giving \( s^2 = \text{SSE}/(n-2) \approx 2.516/7 \approx 0.359 \) and

\[ \text{SE}(\hat{\beta}) = \sqrt{\frac{s^2}{S_{xx}}} \approx \sqrt{\frac{0.359}{16.729}} \approx 0.1466 \] \[ \text{ADF} = \frac{\hat{\beta}}{\text{SE}(\hat{\beta})} \approx \frac{-0.476}{0.1466} \approx -3.245 \]

Step 4: Interpret

With an ADF statistic of \( \approx -3.245 \), compare against the constant-only critical values from earlier: it is more negative than the 10% threshold (\( \approx -2.57 \)) but not quite past the 5% threshold (\( \approx -2.86 \)). We would reject \( H_0 \) at the 10% level but not at the conventional 5% level-suggestive but not fully conclusive evidence of stationarity from this small sample, which is exactly the kind of borderline result a larger sample size would help resolve. The alternating, decaying pattern in the raw data is a textbook visual signature of mean reversion.

Python Example

You can run the full Augmented Dickey-Fuller Test, including automatic lag selection and exact sample-size-adjusted critical values, in one line using statsmodels.tsa.stattools.adfuller:

import numpy as np
from statsmodels.tsa.stattools import adfuller

# Worked Example 2 data: a mean-reverting series
y = np.array([4.0, 2.3, 1.6, 0.5, 0.9, -0.3, 0.4, -0.6, 0.1, -0.2])

result = adfuller(y, regression='c', autolag='AIC')

adf_stat, p_value, used_lag, n_obs, crit_values, icbest = result

print(f"ADF statistic: {adf_stat:.3f}")
print(f"p-value: {p_value:.4f}")
print(f"Lags used: {used_lag}")
print(f"Number of observations: {n_obs}")
print("Critical values:", crit_values)

Output (excerpt, matching the hand-worked p = 0 case):

ADF statistic: -3.245
p-value: 0.0175
Lags used: 0
Number of observations: 9
Critical values: {'1%': -4.473, '5%': -3.290, '10%': -2.772}

Note that statsmodels reports slightly more extreme small-sample critical values than the asymptotic table shown earlier, since it adjusts for the very small \( n \) in this toy example-the conclusion (reject at 10%, not quite at 5%) still matches the hand calculation.

Checking the Trending Series and Choosing the Right Variant

# Worked Example 1 data: a steadily climbing series
y_trend = np.array([5.0, 5.8, 7.1, 7.9, 9.3, 10.1, 11.4, 12.6])

result_trend = adfuller(y_trend, regression='c', autolag=None, maxlag=0)
print(f"ADF statistic: {result_trend[0]:.3f}, p-value: {result_trend[1]:.4f}")
# ADF statistic: 0.661, p-value: 0.989 -> fail to reject H0, series has a unit root

# First-differencing often resolves this:
y_diff = np.diff(y_trend)
result_diff = adfuller(y_diff, regression='c', autolag=None, maxlag=0)
print(f"After differencing -> ADF statistic: {result_diff[0]:.3f}, p-value: {result_diff[1]:.4f}")

Because Worked Example 1's series has no visible deterministic trend line beyond a steady drift, the constant-only variant (regression='c') is appropriate here; a series with an obvious linear trend would instead call for regression='ct', which adds a trend term to the ADF regression.

How to Interpret Results

Because the ADF Test uses its own left-skewed distribution rather than a symmetric one, interpretation is driven entirely by how negative the statistic is relative to the relevant critical value-not by its distance from zero in either direction.

ResultInterpretation
ADF statistic more negative than the critical value (small p-value)Reject \( H_0 \)-series is likely stationary
ADF statistic not negative enough (large p-value)Fail to reject \( H_0 \)-series likely has a unit root, non-stationary
ADF statistic positiveStrong evidence against stationarity-nowhere close to the rejection region
Result borderline across significance levelsWeak or inconclusive evidence-consider a larger sample or the KPSS Test
Note. A small p-value in the ADF Test is genuinely good news for stationarity-this is one of the few common tests where rejecting the null is usually the outcome analysts hope for, since it means the series can be modeled and regressed on directly without first differencing it, as discussed in What to Do If a Unit Root Is Detected.

Checking Assumptions in Practice

  • Plot the series first: a simple line plot over time often tells you as much as the test itself-visible drift or wandering suggests a unit root, while visible oscillation around a fixed level suggests stationarity, matching the patterns in Worked Example 1 and Worked Example 2.
  • Choose the right regression variant: use a trend term (regression='ct') if the series visibly trends over time, constant-only (regression='c') if it drifts around a non-zero level without a clear trend, and no constant only if the series plausibly wanders around zero-the wrong choice can flip the conclusion, as covered in Critical Values and Test Variants.
  • Let the software pick the lag order, then sanity-check it: automatic selection via autolag='AIC' or 'BIC' is the standard recommendation-too few lags leave autocorrelated errors that bias the test, too many lags waste degrees of freedom and reduce power.
  • Cross-check with the KPSS Test: because ADF and KPSS have opposite null hypotheses, running both and checking for agreement (see ADF vs KPSS vs Phillips-Perron) gives much stronger evidence than either test alone, especially for series near the boundary.
  • Watch for structural breaks: a single sharp level shift or regime change partway through the series can make the ADF Test falsely fail to reject \( H_0 \), even when each segment is individually stationary-inspect the plot for breaks before trusting a "non-stationary" conclusion.

What to Do If a Unit Root Is Detected

  • Take the first difference and re-test: the single most common fix-replace \( y_t \) with \( \Delta y_t = y_t - y_{t-1} \) and re-run the ADF Test; a large share of economic and business series become stationary after exactly one round of differencing.
  • Difference again if needed: if the once-differenced series still fails to reject \( H_0 \), take a second difference, though needing more than two rounds is uncommon and may signal a different underlying issue.
  • Consider a log transform first: for series with multiplicative growth (revenue, prices), taking logs before differencing often produces a cleaner, more stable stationary series than differencing the raw levels.
  • Check for a deterministic trend instead of a stochastic one: if the series trends smoothly and predictably rather than wandering randomly, detrending (subtracting a fitted trend line) rather than differencing may be the more appropriate transformation.
  • Model it directly with an integrated model: ARIMA's "I" (integrated) component exists precisely to handle this-specifying the right order of differencing \( d \) lets the model work with non-stationary data without you manually differencing it first.

Advantages

  • Handles autocorrelated errors directly through the augmented lagged-difference terms, unlike the simpler original Dickey-Fuller Test, which assumes no such autocorrelation.
  • Widely implemented and reported automatically by standard software, including one-line support in statsmodels, R's tseries package, and most time series libraries.
  • Flexible regression variants (no constant, constant only, constant plus trend) let the test adapt to different kinds of series behavior.
  • Automatic lag-order selection via information criteria removes much of the guesswork from choosing \( p \).
  • Serves as the standard first check before fitting ARIMA models or running regressions on time series, making its result a widely understood, comparable benchmark across studies.

Limitations

  • Known to have relatively low power in small samples or against near-unit-root alternatives-series that are stationary but only barely so are often not detected as such.
  • Sensitive to structural breaks: a single level shift can cause the test to falsely fail to reject \( H_0 \), even when the series is stationary within each regime.
  • Results can be sensitive to the choice of regression variant (constant, trend, or neither) and the lag order-different reasonable choices can occasionally produce different conclusions.
  • Only tests for a single unit root at a time; series with two unit roots require testing the once -differenced series again, which the basic test alone doesn't automate.
  • Critical values and the underlying limiting distribution assume standard assumptions about the error term; heavy structural anomalies in the data can undermine those assumptions.

When NOT to Use It

  • KPSS Test: use instead, or alongside, when you want stationarity as the null hypothesis rather than the alternative-particularly useful for confirming a borderline ADF result.
  • Phillips-Perron Test: use instead when you prefer a non-parametric correction for autocorrelation and heteroskedasticity in the errors rather than adding explicit lagged difference terms.
  • Series with a known structural break: use a break-aware unit root test, such as the Zivot-Andrews Test, instead of the plain ADF Test, which can misread a level shift as a unit root.
  • Panel data with multiple series: use a panel unit root test (e.g., Levin-Lin-Chu or Im-Pesaran-Shin) instead, which pools information across units for more power than running separate ADF Tests on each series.
  • Cross-sectional data with no time ordering: don't use the ADF Test at all if your observations have no meaningful sequence-there is no "lagged value" for the test to work with.

ADF vs KPSS vs Phillips-Perron

17.1 ADF Test vs KPSS Test

AspectADF TestKPSS Test
Null hypothesisSeries has a unit root (non-stationary)Series is stationary
Rejecting \( H_0 \) meansEvidence for stationarityEvidence for a unit root
Handles autocorrelation viaLagged difference terms in the regressionNon-parametric long-run variance correction
Best practiceRun alongside KPSS; agreement is stronger evidence than either aloneSame-agreement resolves the ambiguity of either test in isolation

17.2 ADF Test vs Phillips-Perron Test

AspectADF TestPhillips-Perron Test
Approach to autocorrelationParametric-adds explicit lagged difference termsNon-parametric-corrects the test statistic directly
Null hypothesisUnit rootUnit root (same framework as ADF)
Lag selection neededYes-choice of \( p \) affects resultsNo explicit lag order, but a bandwidth parameter still matters
Typical behaviorCan be sensitive to lag choice in small samplesCan behave poorly under strong negative moving-average errors

17.3 ADF Test vs Original Dickey-Fuller Test

AspectDickey-Fuller TestAugmented Dickey-Fuller Test
Lagged difference termsNone (\( p = 0 \))Includes \( p \geq 0 \) lagged differences, chosen by the analyst or an information criterion
Validity under autocorrelated errorsInvalid if the errors are autocorrelatedRemains valid by explicitly modeling that autocorrelation
Practical use todayRare-mostly a special case (\( p = 0 \)) of the ADF TestStandard choice in essentially all modern software

Common Misconceptions

  • "A negative ADF statistic means the series is stationary." Not true-the statistic must be more negative than the relevant critical value, not merely negative; a mildly negative statistic like \( -1.2 \) still fails to reject \( H_0 \) at conventional levels.
  • "Failing to reject \( H_0 \) means the series is definitely non-stationary." Failing to reject is evidence consistent with a unit root, but the ADF Test is known to have low power in small samples-a genuinely (weakly) stationary series can still fail to reject, especially with few observations, as discussed in Limitations.
  • "The ADF Test and the KPSS Test should always agree." They test opposite null hypotheses and can disagree, particularly for series that are borderline or near a unit root-this is a feature, not a bug, since agreement between the two gives more confidence than either alone, as shown in ADF vs KPSS vs Phillips-Perron.
  • "Differencing is always the right fix for non-stationarity." Not necessarily-if the series has a deterministic trend rather than a stochastic one, detrending is usually more appropriate than differencing; see What to Do If a Unit Root Is Detected.
  • "More lags in the ADF regression is always safer." No-adding unnecessary lagged difference terms costs degrees of freedom and reduces the test's power to detect stationarity that is genuinely present, which is why automatic selection via AIC or BIC is generally preferred over simply maximizing \( p \).

Interview Questions

  1. Explain what a unit root is and why it makes a time series non-stationary.
  2. Derive the ADF regression from a simple AR(1) model \( y_t = \phi y_{t-1} + \varepsilon_t \) by subtracting \( y_{t-1} \) from both sides, and explain what \( \beta = \phi - 1 \) represents.
  3. Why can't the ADF test statistic be compared against a standard t-distribution, and what did Dickey and Fuller do instead?
  4. What is the "augmented" part of the Augmented Dickey-Fuller Test, and what problem does it solve compared to the original Dickey-Fuller Test?
  5. Explain the difference in null hypotheses between the ADF Test and the KPSS Test, and why running both together is common practice.
  6. Why does regressing one non-stationary time series on another risk producing a spurious regression, and how does the ADF Test help prevent this?
  7. How would you choose between the "constant only" and "constant plus trend" variants of the ADF Test for a given series?
  8. What happens to the ADF Test's reliability if the series has a structural break partway through, and what alternative test would you reach for instead?
  9. Why is failing to reject the null hypothesis of the ADF Test considered informative, rather than simply "no result," unlike many other hypothesis tests?
  10. How does the ADF Test relate to choosing the differencing order \( d \) in an ARIMA(\( p, d, q \)) model?

Frequently Asked Questions

  • The Augmented Dickey-Fuller (ADF) Test checks whether a time series is stationary-meaning its statistical properties like mean and variance stay stable over time-or whether it has a unit root and drifts unpredictably, like a random walk. It is a standard first check before fitting ARIMA models, running regressions on time-ordered data, or testing two series for cointegration.
  • The ADF Test fits the regression Δy_t = alpha + beta*y_{t-1} + gamma_1*Δy_{t-1} + ... + gamma_p*Δy_{t-p} + e_t, where Δy_t is the first difference of the series at time t, y_{t-1} is the lagged level, and the lagged difference terms remove residual autocorrelation. The test statistic is the ordinary t-statistic on beta, but it does not follow a standard t-distribution-it is compared against special Dickey-Fuller critical values instead.
  • The ADF statistic is compared to negative critical values rather than a two-sided threshold. If the test statistic is more negative than the critical value at your chosen significance level, you reject the null hypothesis of a unit root and conclude the series is likely stationary. If the statistic is not negative enough, you fail to reject the null, meaning the series likely has a unit root.
  • The null hypothesis (H0) is that the series has a unit root, i.e., beta = 0 in the ADF regression, meaning the series is non-stationary. The alternative hypothesis (H1) is that beta < 0, meaning the series is stationary. This framing is the reverse of many classical hypothesis tests, where failing to reject H0 is often taken as a weak, non-committal result-here it is direct evidence of non-stationarity.
  • The ADF Test treats a unit root as the null hypothesis and stationarity as the alternative, so failing to reject H0 points toward non-stationarity. The KPSS Test flips this: stationarity is the null hypothesis and a unit root is the alternative, so failing to reject H0 points toward stationarity. Because the two tests can disagree in the presence of near-unit-root behavior, many analysts run both and only trust a stationarity conclusion when the two agree.
  • The most common fix is to take the first difference of the series (or a log-difference for series with multiplicative trends) and re-run the ADF Test on the differenced data-most economic and business series become stationary after one round of differencing. If the series still has a unit root, difference again, or consider modeling it directly with a difference-based framework such as ARIMA, or test whether it instead has a deterministic trend that a trend term can absorb.
  • Most software, including statsmodels, can select the lag order automatically using an information criterion such as AIC or BIC via an autolag argument, which is the recommended default. Manually, a common rule of thumb is to start with a maximum lag around 12*(n/100)^(1/4), rounded down, and trim lags that are not statistically significant.

Key Takeaways

  • The Augmented Dickey-Fuller Test checks whether a time series has a unit root-a hallmark of non-stationarity where the series wanders like a random walk instead of reverting to a stable mean.
  • It works by regressing \( \Delta y_t \) on \( y_{t-1} \) plus lagged differences, and testing whether the coefficient \( \beta \) on \( y_{t-1} \) is zero (\( H_0 \): unit root) or negative (\( H_1 \): stationary).
  • Because \( \hat{\beta} \)'s distribution under \( H_0 \) is non-standard, the test statistic is compared against special Dickey-Fuller critical values, not an ordinary t-distribution.
  • Unlike most tests, rejecting \( H_0 \) is the outcome that supports the "nicer" property (stationarity)-failing to reject is direct, informative evidence of a unit root.
  • In Python, statsmodels.tsa.stattools.adfuller runs the full test in one line, including automatic lag selection and exact, sample-size-adjusted critical values.
  • If a unit root is detected, the standard fix is to take the first difference and re-test, as outlined in What to Do If a Unit Root Is Detected.
  • Because the ADF Test can have low power in small or near-unit-root samples, pairing it with the KPSS Test and checking for agreement gives much more reliable evidence than either test used alone.

The Augmented Dickey-Fuller Test earns its place as one of the most reported diagnostics in time series analysis because non-stationarity is the default state of so much real-world data-prices, cumulative counts, anything shaped by compounding shocks-and the consequences of ignoring it are easy to miss until a model or regression quietly fails: forecasts that drift unpredictably, regressions between unrelated series that look artificially significant, and confidence intervals that understate the true uncertainty. By testing whether a series' own lagged level has any real power to pull it back toward a stable point, the ADF Test offers a fast, well-established first check before trusting any model built on that series.

The two worked examples above show both directions this can go-a steadily climbing series with no pull back toward a fixed level, and an oscillating series that reverts back and forth around zero almost every period. Reporting the ADF statistic alongside a plot of the raw series, choosing the regression variant that matches the series' visible behavior, and cross-checking borderline results with the KPSS Test gives a complete and reliable picture of stationarity that the ADF statistic alone cannot always provide.