What is Stationarity in Time Series Analysis?
Stationarity is one of the common assumptions in many of the time series analysis techniques. A stationary time series (or the underlying process) has mean, variance, and autocorrelation structure that do no change over time. Visually, a stationary time series will be a flat looking series, without trend, constant variance over time, a constant autocorrelation structure over time and no periodic fluctuations. In real-life scenarios lot of time series are not stationary, we need to often transform it to a stationary time series with one of the following techniques:
- Differencing the Data: One of the ways in which a time series can be transformed to a stationary time series is by taking the difference of the data. Suppose we are given a time series Z(t), we can create a new series (Yi=Z(i)−Z(i−1)). There will be one point less than the original data in this new differenced time series. We might be required to difference the data more than once, however, one difference is usually sufficient.
- Whenever there is a trend present in the data series, we can fit curve to the data and then model the residuals from that fit. After the trend is removed from the data, the time series often become stationary, or else we can use differencing to convert it into stationary time series.
- If the time series has got non-constant variance, we can take the logarithm or square root of the series. This may stabilize the variance in the data. If the data has negative values, we can add a suitable constant to make all the data positive and then apply the transformation. Later, the constant value can then be subtracted from the model to obtain fitted or the predicted values and forecasts for future points.
The above techniques are intended to generate series with constant location and scale. Although seasonality also violates stationarity, this is usually explicitly incorporated into the time series model.
(Source: NIST/SEMATECH e-Handbook of Statistical Methods)