What Stationarity Is
Stationarity in the context of time series analysis refers to a property where statistical features like mean, variance, and autocorrelation are constant over time. A stationary process is one whose behavior does not change when shifted in time.
In contrast, non-stationary processes exhibit trends or seasonal patterns that evolve over time, making them challenging for many standard statistical techniques.
The Unit Root and Random Walk
A unit root is a characteristic of a time series where the process is not stationary. Specifically, an AR(1) model with a coefficient (φ) equal to 1 indicates a random walk, which is a non-stationary process.
In this context, a random walk can be thought of as a sequence of steps where each step is a random variable, often normally distributed.
AR(1) Process and Differencing
The AR(1) model describes a time series where the current value depends linearly on its previous value plus some noise. Mathematically, it can be expressed as Y_t = φY_{t-1} + ε_t, where ε_t is white noise.
Differencing is a technique used to transform non-stationary data into stationary by subtracting the previous observation from the current one. First differencing (d=1) and second differencing (d=2) are common methods to achieve stationarity.
The Dickey-Fuller Test
The Dickey-Fuller test is a statistical hypothesis test used to determine if a time series has a unit root. It tests the null hypothesis that the time series is non-stationary against the alternative that it is stationary.
By applying differencing and testing with an ADF-style statistic, one can decide whether first or second differencing is necessary to achieve stationarity.
Frequently asked questions
What does a unit root mean in time series analysis?
A unit root indicates that the time series has a stochastic trend and is non-stationary, meaning its statistical properties change over time.
How can we determine if a time series is stationary?
We can use tests like the Dickey-Fuller test to check for unit roots. If no unit root is detected, the series is considered stationary.
Why is stationarity important in time series analysis?
Stationarity allows us to apply standard statistical techniques and models that assume constant statistical properties over time, making it easier to forecast future values accurately.
What happens if we don't difference a non-stationary time series before modeling?
If we model a non-stationary time series without differencing, the resulting models may be unreliable and lead to incorrect inferences or forecasts.
Try it live
Everything above runs in your browser — open Stationarity & the Unit Root: Random Walk vs AR(1) Differencing and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Stationarity & the Unit Root: Random Walk vs AR(1) Differencing simulation