Performing stationarity checks on time series data
Stationarity is an essential concept in time series. Stationary data has statistical properties such as mean, variance, and covariance, which do not change over time. Also, stationary data doesn’t contain trends and seasonality; typically, time series with these patterns are called non-stationary. Checking for stationarity is important because non-stationary data can be challenging to model and predict. Overall, stationarity can help inform forecasting model selection and prediction accuracy.
To test stationarity, we can use a statistical test called the Dickey-Fuller test. Without going into technicalities, the Dickey-Fuller Test works with the following hypotheses:
- Null hypothesis: The time series data is non-stationary
- Alternative hypothesis: The time series data is stationary
The test generates a test statistic and critical values at significant levels of 1%, 5%, and 10%. We typically compare the value...