First-Order Differencing
You'll learn how to remove linear trends from time series data by computing the change between consecutive observations.
What is First-Order Differencing?
First-order differencing means subtracting each observation from the one that comes after it. Instead of looking at the actual values in your time series, you look at how much they changed from one time step to the next.
Think of it like tracking your bank balance versus tracking your daily spending. Your balance might steadily grow over time (a trend), but your daily spending changes show a different, more stationary pattern.
Why It Works
When your time series has a linear trend—values consistently going up or down—it's non-stationary. Many time series models require stationarity to work properly. By computing differences, you remove that upward or downward drift and focus on the changes, which are often much more stable.
The Mathematics
For a time series Y at time t, the first difference is:
ΔY_t = Y_t - Y_(t-1)
You lose the first observation (since there's nothing before it to subtract), but gain a new series showing period-to-period changes.
When to Use It
First-order differencing is your go-to tool when:
- Visual inspection shows a clear upward or downward trend
- The ACF plot decays very slowly (indicating non-stationarity)
- Stationarity tests like Augmented Dickey-Fuller fail
After differencing, recheck your ACF, PACF, and stationarity tests. If the trend was linear, one round of differencing should be enough.
Key Takeaway: First-order differencing transforms a trending time series into a series of changes, effectively removing linear trends and often achieving stationarity in one step.