A stationarity test is a statistical hypothesis test, such as the Augmented Dickey-Fuller (ADF) or Kwiatkowski-Phillips-Schmidt-Shin (KPSS) test, used to determine if a time series is stationary. Stationarity implies that key properties like the mean, variance, and autocorrelation structure do not change over time. The absence of stationarity, indicated by trends, seasonality, or changing volatility, often signals an underlying data drift that can invalidate model assumptions and degrade predictive performance.
Glossary
Stationarity Test

What is a Stationarity Test?
A statistical procedure used to determine if a time series has constant statistical properties over time, a key assumption for many forecasting models and a critical check for underlying stability before drift analysis.
In concept drift detection, stationarity tests provide a foundational analysis of the input feature stream. A non-stationary signal suggests the data-generating process is evolving, which may necessitate drift adaptation strategies like model retraining. These tests are typically applied to a reference window of historical data. It is crucial to distinguish between stationarity (constant internal properties) and stability (no change relative to a baseline), as the latter is the direct target of most drift detection methods.
Key Stationarity Tests
Stationarity tests are formal statistical procedures used to determine if a time series has constant statistical properties over time, a foundational assumption for many forecasting models and drift detection systems.
Augmented Dickey-Fuller (ADF) Test
The Augmented Dickey-Fuller (ADF) test is the most common unit root test for stationarity. It assesses the null hypothesis that a time series has a unit root (i.e., is non-stationary). A low p-value (typically <0.05) leads to rejecting the null, indicating the series is stationary.
- Mechanism: It fits a regression model to the differenced series with lagged difference terms to correct for higher-order autocorrelation.
- Key Output: A test statistic and a p-value. The more negative the test statistic, the stronger the rejection of non-stationarity.
- Use Case: The standard first test for checking if a series needs differencing to become stationary for ARIMA modeling.
Kwiatkowski-Phillips-Schmidt-Shin (KPSS) Test
The Kwiatkowski-Phillips-Schmidt-Shin (KPSS) test inverts the hypothesis of the ADF test. Its null hypothesis is that the series is stationary (around a deterministic trend). A test statistic exceeding a critical value rejects stationarity.
- Mechanism: It decomposes the series into a deterministic trend, a random walk, and a stationary error, testing the variance of the random walk component.
- Complementary Use: Used alongside the ADF test for a robust conclusion. An ideal result is ADF rejects non-stationarity (p<0.05) and KPSS does not reject stationarity (p>0.05).
- Trend Handling: Has variants for testing stationarity around a level versus around a deterministic trend.
Phillips-Perron (PP) Test
The Phillips-Perron (PP) test is another unit root test similar to the Dickey-Fuller test but uses non-parametric statistical methods to account for serial correlation and heteroskedasticity in the error terms.
- Key Difference: Unlike the ADF test, which adds lagged difference terms to the model, the PP test modifies the test statistic directly. This makes it more robust to a wide range of error specifications.
- Advantage: It is often more powerful than the basic Dickey-Fuller test when the error process is complex.
- Consideration: While robust, it can be less reliable in finite samples compared to the ADF test with appropriately chosen lags.
Zivot-Andrews Test
The Zivot-Andrews test is a unit root test that allows for a single structural break in the series at an unknown point in time. This is critical because a structural break can make a stationary series appear non-stationary to standard tests.
- Mechanism: It tests the null hypothesis of a unit root with drift, against the alternative of a trend-stationary process with a one-time break in the intercept, trend, or both.
- Primary Use: Diagnosing whether an apparent unit root is actually caused by a sudden shift in the series' mean or growth rate (e.g., a policy change, market crash).
- Drift Detection Link: A detected structural break is a definitive form of drift, signaling a permanent change in the data-generating process.
Ljung-Box Test (for Residuals)
While not a direct test of series stationarity, the Ljung-Box test is applied to the residuals of a time series model (like ARIMA) to check for remaining autocorrelation. Its failure is a key diagnostic for inadequate stationarity transformation.
- Purpose: Tests the null hypothesis that the residuals are independently distributed (no autocorrelation).
- Application in Stationarity: After differencing a series to achieve stationarity, the Ljung-Box test on the resulting series' autocorrelations helps verify if the differencing was sufficient. Significant p-values indicate remaining structure and potential non-stationarity.
- Lag Parameter: The test is applied over a set number of lags (e.g., 10, 20) to check for long-range dependence.
Visual Analysis: ACF/PACF Plots
Autocorrelation Function (ACF) and Partial Autocorrelation Function (PACF) plots are essential visual diagnostics for stationarity before formal testing.
- Stationary Series ACF: The ACF of a stationary series decays to zero relatively quickly. A slow, linear decay suggests a unit root (non-stationarity).
- Differencing: If the ACF decays slowly, differencing the series and re-plotting the ACF is the standard remedy. A stationary series after differencing will show an ACF that cuts off or decays rapidly.
- PACF Role: The PACF helps identify the order of an autoregressive (AR) process, which is only valid for stationary series. A sharp cutoff in the PACF suggests the AR order.
- Practical First Step: Always plot the series, its ACF, and PACF to guide the choice and interpretation of formal statistical tests.
Role in Concept Drift Detection
Stationarity tests provide a formal statistical framework for identifying a fundamental type of change in time-series data, serving as a critical early-warning system for predictive models.
A stationarity test is a statistical hypothesis test, such as the Augmented Dickey-Fuller (ADF) or Kwiatkowski–Phillips–Schmidt–Shin (KPSS) test, used to determine if a time series has constant statistical properties—like mean, variance, and autocorrelation—over time. In concept drift detection, rejecting the null hypothesis of stationarity signals a non-stationary process, which is a primary indicator that the underlying data distribution has changed and a model's assumptions are violated. This makes it a foundational tool for unsupervised drift detection in sequential data.
These tests are applied to model inputs, outputs, or error streams to detect covariate shift or concept drift without requiring true labels. A detected change in stationarity often triggers further investigation with two-sample hypothesis tests or drift localization. While powerful for trend detection, stationarity tests alone cannot pinpoint the drift's cause or specific features affected, necessitating integration with broader statistical process control (SPC) and model monitoring pipelines for actionable adaptation.
Frequently Asked Questions
Stationarity tests are foundational statistical tools for analyzing time series data, crucial for detecting concept drift and ensuring model reliability. This FAQ addresses common technical questions about their application in machine learning systems.
A stationarity test is a statistical hypothesis test used to determine if the properties of a time series—such as its mean, variance, and autocorrelation—are constant over time, a condition known as stationarity. In machine learning, it is a critical diagnostic tool for concept drift detection, as non-stationarity in the input data or target variable often indicates that the underlying data-generating process has changed, which will degrade a model's predictive performance. Common tests include the Augmented Dickey-Fuller (ADF) test and the Kwiatkowski-Phillips-Schmidt-Shin (KPSS) test.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Stationarity tests are a foundational statistical tool for detecting drift in time series data. The following terms are essential for understanding the broader ecosystem of drift detection and adaptation.
Concept Drift
A change in the statistical properties of the target variable (the concept a model aims to predict) over time in relation to the input features. This degrades a model's predictive performance. Key characteristics:
- The relationship P(Y|X) between inputs and outputs changes.
- Often requires labeled data for detection.
- A stationarity test on model error rates can be an indirect indicator of concept drift.
Data Drift (Covariate Shift)
A change in the distribution of the input features P(X) between training and deployment, while the relationship P(Y|X) remains stable. Key characteristics:
- Can be detected on unlabeled data.
- Stationarity tests (like ADF) are directly applied to individual feature streams to detect non-stationarity.
- A primary cause of model performance decay even if the underlying concept is stable.
Change Point Detection
The identification of specific points in a time series where its statistical properties undergo a significant, often abrupt, change. Key characteristics:
- Focuses on locating the when of a shift.
- Methods include CUSUM and the Page-Hinkley Test.
- Stationarity tests (e.g., ADF) can signal a change but do not precisely localize it; they assess an entire series.
Two-Sample Hypothesis Testing
A statistical method for determining if two data samples originate from the same underlying distribution. Forms the basis for batch drift detection. Common tests include:
- Kolmogorov-Smirnov Test: Compares empirical cumulative distribution functions.
- Maximum Mean Discrepancy (MMD): A kernel-based test.
- Stationarity tests like ADF are a specialized form for time series, testing a single sample against the property of stationarity.
Statistical Process Control (SPC)
A method of quality control using statistical techniques like control charts to monitor a process. Adapted for model monitoring. Key tools:
- Control Charts: Plot a metric (e.g., prediction error) over time with control limits.
- CUSUM Charts: A specific type for detecting small mean shifts.
- Stationarity is an underlying assumption for many SPC methods; non-stationarity violates control limit assumptions.
Out-of-Distribution (OOD) Detection
The task of identifying input data that falls outside the distribution of a model's training data. A key component of unsupervised drift detection. Relation to stationarity:
- A stream of OOD detection scores (e.g., likelihood) should be stationary under normal operation.
- A stationarity test on this score can signal when novel, anomalous data patterns are becoming systematic, indicating drift.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us