Differencing
Study guide: Exam MAS-II
Differencing is the replacement of a time series by its changes from one period to the next. It turns a series with a stochastic trend into a stationary one. The first difference of a series \{x_t\} is
\nabla x_t = x_t - x_{t-1}
In the backward shift operator, \nabla = 1 - \mathbf{B}, and differencing d times is \nabla^d = (1 - \mathbf{B})^d. The number of differences is the d of an ARIMA(p, d, q) model.
A series is
12, 15, 19, 22, 27. What are its first differences?
- Each first difference is a value minus the one before it.
- The differences are
3, 4, 3, 5.
Differencing a linear trend
For a linear trend plus a stationary series, x_t = \alpha_0 + \alpha_1 t + z_t, the first difference is
\nabla x_t = \alpha_1 + z_t - z_{t-1}
The intercept cancels and the slope remains as a constant. One difference removes a linear trend, and a second removes a quadratic one.
A series is
x_t = 5 + 2t + z_t, with\white noise. What is the mean of its first differences?
- The first difference is
2 + z_t - z_{t-1}.- The white noise terms have mean zero, so the mean of the differences is
2, the slope.
Seasonal differencing
The seasonal difference at lag s removes a pattern that repeats every s periods:
\nabla_s x_t = x_t - x_{t-s} = (1 - \mathbf{B}^s)\,x_t
s = 4for quarterly data ands = 12for monthly data.
Quarterly claim counts are 210 in Q1 of one year and 234 in Q1 of the next. What is the seasonal difference at the second Q1?
- The seasonal difference compares a quarter with the same quarter a year earlier, at lag
s = 4.\nabla_4 x_t = 234 - 210 = 24.
Choosing the number of differences
A series whose sample autocorrelations decay very slowly is differenced. When the autocorrelations of the differences die out quickly, the differences are stationary and no further difference is needed. Differencing more than needed inflates the variance and creates a large negative autocorrelation at lag 1.
A series' autocorrelations fall from 0.97 at lag 1 to 0.71 at lag 10. After one difference they are 0.31, 0.05 and −0.02, and after a second they are −0.48, 0.02 and 0.01. How many differences should be taken?
- The slow decay of the original autocorrelations shows the series is not stationary.
- After one difference the autocorrelations die out quickly, so the differences are stationary.
- The second difference creates a large negative lag 1 autocorrelation, the sign of differencing too often.
- One difference should be taken.