Risk Modelling and Survival Analysis · Applications of time series models
ARIMA Models and Differencing Explained for CS2
Updated 11 October 2026 · Fact-checked
An ARIMA(p,d,q) model is an ARMA(p,q) model fitted to a series after differencing it d times. Differencing removes trends or unit roots and makes the series stationary. To solve questions, find d first, then identify p and q from the ACF and PACF of the differenced series.
Understand ARIMA Models and Differencing
Most stationary-series models (AR, MA, ARMA) need the series to be weakly stationary: constant mean, constant variance, and covariance that depends only on the lag. Many real series are not. Prices, claim totals and index levels often drift upward or wander like a random walk.
Differencing is the fix. The difference operator ∇ is defined by ∇Xₜ = Xₜ − Xₜ₋₁. If a series has a linear trend, one difference removes it. If it has a quadratic trend, two differences are needed. A random walk Xₜ = Xₜ₋₁ + eₜ becomes white noise after one difference.
A process Xₜ is integrated of order d, written I(d), if it must be differenced d times to become stationary. It is ARIMA(p,d,q) if ∇ᵈXₜ is a stationary ARMA(p,q) process. So ARIMA is not a different kind of model from ARMA. It is ARMA applied to the differenced series. The difference between ARMA and ARIMA is the d.
In terms of the backshift operator B (BXₜ = Xₜ₋₁), the model is φ(B)(1 − B)ᵈXₜ = θ(B)eₜ. The factor (1 − B)ᵈ means the characteristic polynomial of the autoregressive part has d roots equal to 1. These are called unit roots. An ARIMA process with d ≥ 1 is never stationary, so you cannot apply stationary ACF formulas to Xₜ itself.
Some series repeat every s periods, for example s = 12 for monthly data. Seasonal differencing uses ∇ₛXₜ = Xₜ − Xₜ₋ₛ = (1 − Bˢ)Xₜ. Combining ordinary and seasonal parts gives a seasonal ARIMA model, written SARIMA or ARIMA(p,d,q)×(P,D,Q)ₛ.
Key rules to remember
- Difference operator
- ∇Xₜ = Xₜ − Xₜ₋₁ = (1 − B)Xₜ
- B is the backshift operator: BXₜ = Xₜ₋₁.
- Higher-order difference
- ∇²Xₜ = Xₜ − 2Xₜ₋₁ + Xₜ₋₂ = (1 − B)²Xₜ
- This is the difference of the first differences, not Xₜ − Xₜ₋₂.
- ARIMA(p,d,q) definition
- φ(B)(1 − B)ᵈ Xₜ = θ(B) eₜ
- φ(B) = 1 − φ₁B − … − φₚBᵖ and θ(B) = 1 + θ₁B + … + θ_qB^q. eₜ is white noise. Conventions for signs of θ differ; state yours.
- Integrated process
- Xₜ ~ I(d) if ∇ᵈXₜ is stationary and ∇ᵈ⁻¹Xₜ is not
- d is the smallest number of differences giving stationarity.
- Seasonal difference
- ∇ₛXₜ = Xₜ − Xₜ₋ₛ = (1 − Bˢ)Xₜ
- s is the season length, such as 12 for monthly data.
- Seasonal ARIMA form
- φ(B) Φ(Bˢ) (1 − B)ᵈ (1 − Bˢ)ᴰ Xₜ = θ(B) Θ(Bˢ) eₜ
- Capital letters are the seasonal AR and MA polynomials in Bˢ.
- Random walk as ARIMA
- Xₜ = Xₜ₋₁ + eₜ is ARIMA(0,1,0)
- With a constant added, it is a random walk with drift.
How to solve ARIMA Models and Differencing questions
Use this order for any question on differencing or ARIMA. It works for both identification and forecasting questions.
- 1Write the model in backshift form, or read off p, d and q from the notation ARIMA(p,d,q).
- 2Find d. Check the autoregressive polynomial for roots equal to 1, or inspect the series and its sample ACF. A slowly decaying ACF suggests differencing is needed.
- 3Difference the series d times (and seasonally D times if a seasonal pattern at lag s is present). Compute the new values carefully.
- 4Check the differenced series is stationary: no trend, roughly constant spread, ACF that dies away quickly.
- 5Identify p and q for the differenced series: ACF cutting off after lag q suggests MA(q); PACF cutting off after lag p suggests AR(p); both decaying suggests ARMA.
- 6Fit the ARMA model to the differenced series and check residuals look like white noise.
- 7To forecast, forecast the differenced series, then sum back (integrate) to return to the original level. Do this using the original equation Xₜ = Xₜ₋₁ + ∇Xₜ.
- 8State assumptions clearly: the white noise variance, whether a constant or drift is included, and the sign convention for θ.
Quickest way: Expand the backshift form to a recursion
When to use it: Use this when you are given an ARIMA model and asked for a one-step forecast, stationarity check, or the order of integration.
- Count the factors of (1 − B) in the autoregressive side. That count is d.
- Multiply out φ(B)(1 − B)ᵈ to get a single polynomial in B.
- Rearrange to write Xₜ as a combination of past X values plus eₜ and past e values.
- Replace future errors by 0 and known past errors by their values to get the forecast.
- Check that the remaining AR polynomial (after removing (1 − B)ᵈ) has all roots outside the unit circle.
Common mistakes in ARIMA Models and Differencing
Treating the ARIMA series itself as stationary and applying ARMA ACF formulas to Xₜ.
The name ARIMA sounds like ARMA, so the d is ignored.
Fix: Only ∇ᵈXₜ is stationary. Apply ACF and stationarity results to the differenced series.
Calculating the second difference as Xₜ − Xₜ₋₂.
Students read ∇² as a lag of 2.
Fix: ∇²Xₜ = ∇(∇Xₜ) = Xₜ − 2Xₜ₋₁ + Xₜ₋₂. A lag-2 difference is a different operation.
Over-differencing a series that is already stationary.
Students difference by habit.
Fix: Stop once the series looks stationary. Over-differencing adds an unnecessary MA unit root and inflates variance.
Forecasting the differenced series and reporting it as the forecast of Xₜ.
The last step of integrating back is forgotten.
Fix: Add the forecast difference to the last observed value: X̂ₙ₊₁ = Xₙ + forecast of ∇Xₙ₊₁.
Confusing ordinary differencing with seasonal differencing, using lag 1 for a seasonal pattern.
Both are called differencing.
Fix: Use lag s for the seasonal pattern, for example lag 12 for monthly data. Apply ordinary differencing as well if a trend remains.
Calling a process ARIMA(p,d,q) with d counted from the wrong polynomial, for example counting a root at 2 as a unit root.
Students look for any root outside the unit circle or non-stationary-looking factor.
Fix: Only roots exactly equal to 1 are unit roots. Roots with modulus greater than 1 are fine for stationarity.
Worked examples
Example 1
A time series follows the model Xₜ = 1.5Xₜ₋₁ − 0.5Xₜ₋₂ + eₜ, where eₜ is white noise. Identify the ARIMA(p,d,q) model and state whether Xₜ is stationary.
Show the solution
- Write in backshift form: (1 − 1.5B + 0.5B²)Xₜ = eₜ.
- Factorise: 1 − 1.5B + 0.5B² = (1 − B)(1 − 0.5B). Check: (1 − B)(1 − 0.5B) = 1 − 0.5B − B + 0.5B² = 1 − 1.5B + 0.5B². Correct.
- The factor (1 − B) is one unit root, so d = 1.
- The remaining factor (1 − 0.5B) gives an AR(1) part with φ = 0.5, with root B = 2, which lies outside the unit circle.
- So (1 − 0.5B)∇Xₜ = eₜ, meaning ∇Xₜ is a stationary AR(1).
Answer: Xₜ is ARIMA(1,1,0). It is not stationary because of the unit root, but ∇Xₜ is a stationary AR(1) process.
Example 2
Xₜ follows an ARIMA(1,1,0) model: ∇Xₜ = 0.6∇Xₜ₋₁ + eₜ. The last two observations are X₉₉ = 120 and X₁₀₀ = 130. Find the one-step and two-step forecasts of X₁₀₁ and X₁₀₂.
Show the solution
- The last difference is ∇X₁₀₀ = 130 − 120 = 10.
- One-step forecast of the difference: 0.6 × 10 = 6, taking E[e₁₀₁] = 0.
- So X̂₁₀₁ = X₁₀₀ + 6 = 130 + 6 = 136.
- Two-step forecast of the difference: 0.6 × 6 = 3.6, taking E[e₁₀₂] = 0.
- So X̂₁₀₂ = X̂₁₀₁ + 3.6 = 136 + 3.6 = 139.6.
Answer: X̂₁₀₁ = 136 and X̂₁₀₂ = 139.6.
Exam tips
- Always state d explicitly and show the factor (1 − B) when asked to identify an ARIMA model. Examiners award marks for the factorisation.
- When asked if a process is stationary, check roots of the full autoregressive polynomial. A single unit root is enough to make it non-stationary.
- In forecasting questions, show the difference step and the integration step separately so partial marks are available.
- For seasonal questions, write the operator (1 − Bˢ) with the correct s and say what it removes.
- For computer-based Paper B, difference the series with the right lag in R (for example diff(x, lag = 12)) and check the ACF of the result before fitting.
Practice questions from Applications of time series models
- A time series Y_t is described as ARIMA(1,1,0). Which statement correctly describes the process?
- An MA(1) process is X_t = e_t + 0.5 e_{t-1}, where e_t is white noise with variance 2. What is the autocorrelation at lag 1 and at lag 2?
- An analyst fits an ARIMA model to monthly claim counts and finds the sample autocorrelation function of the raw series decays very slowly fr…
- For an AR(2) process X_t = 0.5 X_{t-1} + 0.2 X_{t-2} + e_t, the lag-1 autocorrelation rho_1 is obtained from the Yule-Walker equations. What…
- In the Box-Jenkins approach to fitting an ARIMA model to a time series, which sequence of stages is correct?
ARIMA Models and Differencing: frequently asked questions
What is the difference between ARMA and ARIMA?
ARMA models are for stationary series. ARIMA models include d differencing steps, so they can handle series with trends or unit roots. An ARIMA(p,d,q) series becomes an ARMA(p,q) series after d differences.
How do I know how many times to difference?
Difference until the series looks stationary: no trend and an ACF that decays quickly. Usually d is 0, 1 or 2. Do not difference more than needed.
What is a unit root in CS2?
A unit root is a root equal to 1 in the autoregressive characteristic polynomial, meaning a factor (1 − B). It makes the process non-stationary, and differencing removes it.
How does seasonal ARIMA work?
It adds seasonal differencing at lag s, plus seasonal AR and MA terms in powers of Bˢ. For monthly data with yearly patterns, s = 12. You may combine seasonal and ordinary differencing.