Home▸Articles▸Data Science

Stationarity & Differencing: The ADF Test Explorer

Understanding stationarity is crucial for time series analysis, and this simulation helps visualize its importance.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

What Stationarity Is

Stationarity is an essential property of time series data where statistical properties such as mean, variance, and autocorrelation are constant over time. This means that the behavior of the series does not change with shifts in time. Non-stationary data can lead to misleading results in statistical models.

The Augmented Dickey-Fuller (ADF) test is a statistical hypothesis test used to determine whether a unit root is present in a time series, which indicates non-stationarity.

Why It Matters

Non-stationary data can cause problems when using traditional econometric models because they violate the assumptions of these models. By transforming non-stationary data into stationary through differencing, we ensure that our models are more reliable and accurate.

The ADF test helps us decide whether a series is stationary or not by providing a test statistic that indicates the presence of a unit root.

live demo · related simulation● LIVE

How Differencing Works

Differencing involves subtracting the previous observation from the current one, effectively removing trends and seasonality. This process can be applied multiple times (d=1 for first difference, d=2 for second difference) until the series becomes stationary.

In the simulation, you can mix trend, random-walk, and seasonal components to create a non-stationary time series and then apply differencing to observe how it transforms over time.

The ADF Test in Action

The Augmented Dickey-Fuller test statistic is calculated for the transformed data. If this statistic falls below a critical value, we can reject the null hypothesis of a unit root and conclude that the series is stationary.

In the 3D visualization, you can see how the ADF test statistic changes as differencing is applied, crossing the threshold from non-stationary to stationary.

Frequently asked questions

What does it mean if a time series is not stationary?

If a time series is not stationary, its statistical properties change over time, making it difficult to model and forecast accurately using standard methods.

Can I use differencing on any type of data?

Differencing is typically used for time series data where trends or seasonality are present. It may not be appropriate for other types of data that do not exhibit these characteristics.

What does the ADF test statistic tell us?

The ADF test statistic helps determine whether a unit root is present in the time series, indicating non-stationarity. If the statistic is below a critical value, it suggests that the series is stationary.

Why is stationarity important for forecasting models?

Stationary data allows us to make reliable forecasts because the statistical properties of the data remain constant over time, ensuring that past patterns can be used to predict future values accurately.

Try it live

Everything above runs in your browser — open Stationarity & Differencing: The ADF Test Explorer and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Stationarity & Differencing: The ADF Test Explorer simulation

What did you find?

Add reproduction steps (optional)