Solving Yule-Walker Equations to Derive ACF Values for an AR(2) Model

Master solving Yule-Walker equations for an AR(2) model to derive ACF values. Rigorous theory, intuitive insights, and common pitfalls for BSc students.

The Formal Theorem

For a stationary Autoregressive model of order 2, denoted AR(2), given by Yt=ϕ1Yt1+ϕ2Yt2+ϵt Y_t = \phi_1 Y_{t-1} + \phi_2 Y_{t-2} + \epsilon_t , where ϵt \epsilon_t is white noise with E[ϵt]=0 E[\epsilon_t] = 0 and Var(ϵt)=σϵ2 Var(\epsilon_t) = \sigma_{\epsilon}^2 , the Yule-Walker equations provide a relationship between the autoregressive coefficients ϕ1,ϕ2 \phi_1, \phi_2 and the autocorrelation function (ACF) values ρ(k) \rho(k) . Specifically, for lags k=1 k=1 and k=2 k=2 , the equations are:
ρ(1)=ϕ1ρ(0)+ϕ2ρ(1)ρ(2)=ϕ1ρ(1)+ϕ2ρ(0) \begin{aligned} \rho(1) &= \phi_1 \rho(0) + \phi_2 \rho(1) \\ \rho(2) &= \phi_1 \rho(1) + \phi_2 \rho(0) \end{aligned}
Given that ρ(0)=1 \rho(0) = 1 for any stationary process, this system simplifies to:
ρ(1)=ϕ1+ϕ2ρ(1)(1)ρ(2)=ϕ1ρ(1)+ϕ2(2) \begin{aligned} \rho(1) &= \phi_1 + \phi_2 \rho(1) \quad & (1) \\ \rho(2) &= \phi_1 \rho(1) + \phi_2 \quad & (2) \end{aligned}
Solving equation (1) for ρ(1) \rho(1) yields: ρ(1)(1ϕ2)=ϕ1    ρ(1)=ϕ11ϕ2 \rho(1) (1 - \phi_2) = \phi_1 \implies \rho(1) = \frac{\phi_1}{1 - \phi_2} Substituting this expression for ρ(1) \rho(1) into equation (2) gives ρ(2) \rho(2) : ρ(2)=ϕ1(ϕ11ϕ2)+ϕ2=ϕ121ϕ2+ϕ2 \rho(2) = \phi_1 \left( \frac{\phi_1}{1 - \phi_2} \right) + \phi_2 = \frac{\phi_1^2}{1 - \phi_2} + \phi_2 Thus, the first two autocorrelation coefficients for a stationary AR(2) process are:
ρ(1)=ϕ11ϕ2ρ(2)=ϕ12+ϕ2(1ϕ2)1ϕ2=ϕ12+ϕ2ϕ221ϕ2 \begin{aligned} \rho(1) &= \frac{\phi_1}{1 - \phi_2} \\ \rho(2) &= \frac{\phi_1^2 + \phi_2(1 - \phi_2)}{1 - \phi_2} = \frac{\phi_1^2 + \phi_2 - \phi_2^2}{1 - \phi_2} \end{aligned}
For k2 k \ge 2 , the higher-order autocorrelations follow the general recursive relation: ρ(k)=ϕ1ρ(k1)+ϕ2ρ(k2) \rho(k) = \phi_1 \rho(k-1) + \phi_2 \rho(k-2)

Analytical Intuition.

Imagine a majestic celestial dance, where a planet's current position, Yt Y_t , is influenced by its positions in the immediate past: Yt1 Y_{t-1} and Yt2 Y_{t-2} . The Yule-Walker equations are the ancient cosmic laws governing this celestial ballet. They are not merely observations but the very DNA of the system, revealing how the planet's past movements (encoded by the autoregressive coefficients ϕ1 \phi_1 and ϕ2 \phi_2 ) dictate its current and future trajectory. We're decoding the universe's internal rhythm. ρ(1) \rho(1) quantifies how much today's position remembers yesterday's, a direct gravitational tug, while ρ(2) \rho(2) unveils the lingering influence from two periods ago, a more subtle, yet powerful, orbital resonance. Solving these equations is akin to calibrating an orrery, transforming observed astronomical patterns into precise constants. It allows us to predict the planet's winding course with mathematical certainty, uncovering the hidden, rhythmic pulse that drives its majestic motion.
CAUTION

Institutional Warning.

Students often confuse the Yule-Walker equations with the Durbin-Levinson algorithm. While related, the Yule-Walker equations directly relate AR coefficients to ACF for a fixed order, whereas Durbin-Levinson recursively computes AR parameters and prediction errors for increasing orders based on known autocorrelations.

Institutional Deep Dive.

01
The Yule-Walker equations serve as the foundational bridge connecting the theoretical parameters of an autoregressive (AR) model to its observable autocorrelation structure. For an AR(2) process, defined by Yt=ϕ1Yt1+ϕ2Yt2+ϵt Y_t = \phi_1 Y_{t-1} + \phi_2 Y_{t-2} + \epsilon_t , where ϵt \epsilon_t is white noise with E[ϵt]=0 E[\epsilon_t] = 0 and Var(ϵt)=σϵ2 Var(\epsilon_t) = \sigma_{\epsilon}^2 , and Yt Y_t is a stationary process with E[Yt]=0 E[Y_t] = 0 (which can always be assumed by working with deviations from the mean), the essence of the Yule-Walker equations lies in expressing the autocovariances (and thus autocorrelations) in terms of the model coefficients ϕ1 \phi_1 and ϕ2 \phi_2 and the noise variance σϵ2 \sigma_{\epsilon}^2 .
02
**Core Logic** By multiplying the AR(2) equation by Ytk Y_{t-k} and taking expectations, we obtain a system of linear equations. For a stationary process, Cov(Yt,Ytk)=γ(k) Cov(Y_t, Y_{t-k}) = \gamma(k) and Var(Yt)=γ(0) Var(Y_t) = \gamma(0) . The crucial steps involve utilizing the property that ϵt \epsilon_t is uncorrelated with past values of the process Ytk Y_{t-k} for k1 k \ge 1 , i.e., E[ϵtYtk]=0 E[\epsilon_t Y_{t-k}] = 0 . However, E[ϵtYt]=σϵ2 E[\epsilon_t Y_t] = \sigma_{\epsilon}^2 because Yt Y_t directly depends on ϵt \epsilon_t .
03
For k=1 k=1 , multiplying the AR(2) equation by Yt1 Y_{t-1} and taking expectations yields: E[YtYt1]=E[(ϕ1Yt1+ϕ2Yt2+ϵt)Yt1] E[Y_t Y_{t-1}] = E[(\phi_1 Y_{t-1} + \phi_2 Y_{t-2} + \epsilon_t) Y_{t-1}] γ(1)=ϕ1γ(0)+ϕ2γ(1)+E[ϵtYt1] \gamma(1) = \phi_1 \gamma(0) + \phi_2 \gamma(1) + E[\epsilon_t Y_{t-1}] Since E[ϵtYt1]=0 E[\epsilon_t Y_{t-1}] = 0 , this simplifies to γ(1)=ϕ1γ(0)+ϕ2γ(1) \gamma(1) = \phi_1 \gamma(0) + \phi_2 \gamma(1) .
04
For k=2 k=2 , multiplying the AR(2) equation by Yt2 Y_{t-2} and taking expectations yields: E[YtYt2]=E[(ϕ1Yt1+ϕ2Yt2+ϵt)Yt2] E[Y_t Y_{t-2}] = E[(\phi_1 Y_{t-1} + \phi_2 Y_{t-2} + \epsilon_t) Y_{t-2}] γ(2)=ϕ1γ(1)+ϕ2γ(0)+E[ϵtYt2] \gamma(2) = \phi_1 \gamma(1) + \phi_2 \gamma(0) + E[\epsilon_t Y_{t-2}] Since E[ϵtYt2]=0 E[\epsilon_t Y_{t-2}] = 0 , this simplifies to γ(2)=ϕ1γ(1)+ϕ2γ(0) \gamma(2) = \phi_1 \gamma(1) + \phi_2 \gamma(0) .
05
Dividing both equations by γ(0) \gamma(0) (the variance of the process), we transform the autocovariances γ(k) \gamma(k) into autocorrelations ρ(k)=γ(k)/γ(0) \rho(k) = \gamma(k) / \gamma(0) . Given that ρ(0)=γ(0)/γ(0)=1 \rho(0) = \gamma(0) / \gamma(0) = 1 , we arrive at the Yule-Walker equations for an AR(2) model in terms of autocorrelations: ρ(1)=ϕ1+ϕ2ρ(1) \rho(1) = \phi_1 + \phi_2 \rho(1) ρ(2)=ϕ1ρ(1)+ϕ2 \rho(2) = \phi_1 \rho(1) + \phi_2 This is a straightforward linear system in ρ(1) \rho(1) and ρ(2) \rho(2) that can be solved algebraically, yielding unique solutions provided the stationarity conditions for the AR(2) model are met (specifically, 1ϕ20 1 - \phi_2 \neq 0 which is implied by stationarity).
06
**Geometric Mechanics** From a geometric perspective, the Yule-Walker equations can be understood through the lens of orthogonal projections in a Hilbert space of random variables. Each Yt Y_t can be thought of as a vector. The AR(2) model essentially states that Yt Y_t is the best linear predictor of itself based on Yt1 Y_{t-1} and Yt2 Y_{t-2} , plus an orthogonal error term ϵt \epsilon_t . This orthogonality means ϵt \epsilon_t is uncorrelated with Yt1 Y_{t-1} and Yt2 Y_{t-2} . The act of multiplying the AR(2) equation by Ytk Y_{t-k} and taking expectations is analogous to computing an inner product in this Hilbert space. The vanishing of E[ϵtYtk] E[\epsilon_t Y_{t-k}] for k1 k \ge 1 is precisely the orthogonality condition: the innovations ϵt \epsilon_t are uncorrelated with all past observations. The Yule-Walker equations thus mathematically formalize this projection and orthogonality, expressing the autocorrelations as direct consequences of the model's intrinsic predictive structure. Solving them reveals the specific pattern of how the process's memory decays over time, akin to uncovering its unique spectral fingerprint.
07
**Institutional Pitfalls** A common pitfall for students is to forget the crucial role of stationarity. The derivation of the Yule-Walker equations critically relies on the assumption that Yt Y_t is weakly stationary, which implies constant mean, constant variance, and autocovariance depending only on the lag. Without stationarity, γ(k) \gamma(k) and ρ(k) \rho(k) are not well-defined or constant, and the equations do not hold in this simplified form. Another error is incorrectly assuming E[ϵtYtk]=0 E[\epsilon_t Y_{t-k}] = 0 for all k k , including k=0 k=0 . While ϵt \epsilon_t is uncorrelated with past Ys Y_s (for s<t s < t ), it is inherently correlated with Yt Y_t itself (as Yt Y_t directly depends on ϵt \epsilon_t ), leading to E[Ytϵt]=σϵ2 E[Y_t \epsilon_t] = \sigma_{\epsilon}^2 , not zero. Furthermore, students sometimes incorrectly apply the general recursive relation ρ(k)=ϕ1ρ(k1)+ϕ2ρ(k2) \rho(k) = \phi_1 \rho(k-1) + \phi_2 \rho(k-2) for k=1,2 k=1, 2 without first solving the system, which would lead to circular definitions. The first few equations must be solved as a system to establish the initial conditions for the recursive decay. Finally, careful algebraic manipulation is paramount, as small errors in solving for ρ(1) \rho(1) and ρ(2) \rho(2) can propagate and invalidate subsequent calculations of higher-order autocorrelations.

Academic Inquiries.

01

Why do we assume E[Yt]=0 E[Y_t] = 0 when deriving the Yule-Walker equations?

We assume E[Yt]=0 E[Y_t] = 0 for simplicity. If E[Yt]=μ0 E[Y_t] = \mu \neq 0 , we can work with the mean-subtracted series Zt=Ytμ Z_t = Y_t - \mu . The AR model for Yt Y_t becomes Ytμ=ϕ1(Yt1μ)+ϕ2(Yt2μ)+ϵt Y_t - \mu = \phi_1 (Y_{t-1} - \mu) + \phi_2 (Y_{t-2} - \mu) + \epsilon_t , which is equivalent to an AR model for Zt Z_t . The autocorrelations are unaffected by subtracting the mean, so the Yule-Walker equations apply directly to the Zt Z_t series and thus to the original Yt Y_t series' ACF.

02

What are the stationarity conditions for an AR(2) model?

An AR(2) process Yt=ϕ1Yt1+ϕ2Yt2+ϵt Y_t = \phi_1 Y_{t-1} + \phi_2 Y_{t-2} + \epsilon_t is stationary if and only if the roots of its characteristic equation 1ϕ1zϕ2z2=0 1 - \phi_1 z - \phi_2 z^2 = 0 lie outside the unit circle. Equivalently, the coefficients must satisfy three conditions: ϕ1+ϕ2<1 \phi_1 + \phi_2 < 1 , ϕ2ϕ1<1 \phi_2 - \phi_1 < 1 , and ϕ2<1 |\phi_2| < 1 .

03

How do these equations change for an AR(p) model?

For an AR(p) model, Yt=ϕ1Yt1++ϕpYtp+ϵt Y_t = \phi_1 Y_{t-1} + \dots + \phi_p Y_{t-p} + \epsilon_t , the Yule-Walker equations form a system of p p linear equations for the first p p autocorrelation coefficients: ρ(k)=i=1pϕiρ(ki) \rho(k) = \sum_{i=1}^p \phi_i \rho(k-i) for k=1,,p k=1, \dots, p . These can be compactly written in matrix form as ρp=Γpϕp \rho_p = \Gamma_p \phi_p , where ρp=[ρ(1),,ρ(p)]T \rho_p = [\rho(1), \dots, \rho(p)]^T and Γp \Gamma_p is a symmetric Toeplitz matrix with (i,j) (i,j) -th entry ρ(ij) \rho(|i-j|) .

04

Why is E[ϵtYtk]=0 E[\epsilon_t Y_{t-k}] = 0 for k1 k \ge 1 ?

This is a fundamental property of AR models, asserting that the white noise innovation ϵt \epsilon_t is uncorrelated with past values of the process. ϵt \epsilon_t represents the unpredictable part of Yt Y_t given its past values. Since Ytk Y_{t-k} for k1 k \ge 1 depends only on ϵtk,ϵtk1, \epsilon_{t-k}, \epsilon_{t-k-1}, \dots (and past Y Y s, which are themselves functions of past ϵ \epsilon s), it is independent of (and therefore uncorrelated with) the current innovation ϵt \epsilon_t . This uncorrelation is crucial for simplifying the expectation terms in the Yule-Walker derivation.

Standardized References.

  • Definitive Institutional SourceBrockwell, P. J., & Davis, R. A. (2016). Introduction to Time Series and Forecasting (3rd ed.). Springer.

Institutional Citation

Reference this proof in your academic research or publications.

NICEFA Visual Mathematics. (2026). Solving Yule-Walker Equations to Derive ACF Values for an AR(2) Model: Visual Proof & Intuition. Retrieved from https://www.nicefa.org/library/time-series-analysis/solving-yule-walker-equations-to-derive-acf-values-for-an-ar-2--model

Dominate the Logic.

"Abstract theory is just a movement we haven't seen yet."