# Is detrending equivalent to differencing?

Given a non-stationary time series, there are many statistical tests (e.g. ADF, KPSS, etc.) to test whether the series has unit root or not. Equivalently, they test whether a trending time series has a deterministic trend (trend stationary) or stochastic trend (difference stationary).

However, I am confused as in the book 'Time Series Analysis: With Applications in R' by Jonathan D. Cryer and Kung-Sik Chan, page 90, they mention:

Several somewhat different sets of assumptions can lead to models whose first difference is a stationary process. Suppose $$Y_t = M_t + X_t$$ where $$M_t$$ is a series that is changing only slowly over time. Here $$M_t$$ could be either deterministic or stochastic. If we assume that $$M_t$$ is approximately constant over every two consecutive time points, we might estimate (predict) $$M_t$$ at $$t$$ by choosing $$\beta_0$$ so that $$\sum_{j=0}^{1} (Y_{t-j}-\beta_{0,t})^2$$ is minimized. This clearly leads to $$\hat{M_t}=\frac{1}{2}(Y_t+Y_{t-1})$$ and the “detrended” series at time $$t$$ is then $$Y_t-\hat{M_t}=Y_t-\frac{1}{2}(Y_t+Y_{t-1})=\frac{1}{2}(Y_t-Y_{t-1})=\frac{1}{2}\nabla Y_t$$ This is a constant multiple of the first difference, $$\nabla Y_t$$.

Thus the author proves that whether you de-trend or take the first difference, the result is the same (up to a constant). Why, then, do we need to use unit root tests if both trend stationary and difference stationery are equivalent?

• He doesn't actually prove that the result is the same; he shows that if $M_t-M_{t-1}$ is "approximately" zero ("If we assume that $M_t$ is approximately constant over every two consecutive time points"), i.e., that the stochastic component is "small", that a stochastic trend is not much different than a deterministic trend. But what if it isn't "small"? – jbowman Apr 14 at 20:49
• By detrending, you do not mess up the error term. By differencing, the error term of the original series, $\varepsilon_t$, becomes $\varepsilon_t-\varepsilon_{t-1}$ in the differenced series. The process $\varepsilon_t-\varepsilon_{t-1}$ has a negative unit root. – Richard Hardy Apr 15 at 9:16