Last modified: January 27, 2025

This article is written in: 🇺🇸

Yule-Walker Equations

The Yule-Walker equations are a set of linear equations that relate the autocorrelations of an autoregressive (AR) process to its parameters. These equations are crucial for estimating the parameters of AR models and for understanding the autocorrelation structure of the process.

Definition

The Yule-Walker equations provide a way to estimate the parameters of an AR(p) process by relating them to the autocorrelations of the process. The key idea is to derive a system of equations that link the parameters ϕ1,ϕ2,,ϕp with the autocorrelation function (ACF) at different lags k.

For an AR(p) process, the Yule-Walker equations are:

ρ(k)=ϕ1ρ(k1)+ϕ2ρ(k2)++ϕpρ(kp)for k=1,2,,p

Where:

These equations can be used to estimate the parameters ϕ1,ϕ2,,ϕp of the AR process from the sample autocorrelations.

Deriving the Yule-Walker Equations

Assumptions

  1. The stationarity assumption for an AR process means that the mean and variance of the process remain constant over time, and the autocovariance function depends only on the lag, not on the time.
  2. In the AR process, the white noise error term Zt has zero mean and constant variance σZ2, meaning Zt is uncorrelated with past values of the process.

Derivation Steps

  1. Multiply the AR(p) model by Xtk for a given lag k:

Xt=ϕ1Xt1+ϕ2Xt2++ϕpXtp+Zt

Multiply both sides by Xtk for k=1,2,,p.

  1. Take the expectation of both sides: Use the definition of the autocovariance function γ(k)=E[XtXtk], and replace the expectations accordingly. Since the white noise Zt is uncorrelated with Xtk, the expected value of ZtXtk is zero for all k1.

  2. Use covariance definitions: Express the expectations as autocovariances γ(k) and normalize by γ(0), which is the variance of the process, to convert them into autocorrelations ρ(k).

  3. Formulate the Yule-Walker equations: You will end up with a system of linear equations that relate the autocorrelations at different lags ρ(1),ρ(2),,ρ(p) to the AR model parameters ϕ1,ϕ2,,ϕp.

Example: Yule-Walker Equations for an AR(2) Process

Consider the AR(2) process:

Xt=3Xt1+2Xt2+Zt

Where Zt is white noise with variance σZ2.

Deriving the Yule-Walker Equations

I. Multiply by Xt1 and take the expectation:

E[XtXt1]=3E[Xt12]+2E[Xt2Xt1]

Using γ(1)=E[XtXt1] and γ(0)=E[Xt12], we get:

γ(1)=3γ(0)+2γ(1)

II. Multiply by Xt2 and take the expectation:

E[XtXt2]=3E[Xt1Xt2]+2E[Xt22]

Using γ(2)=E[XtXt2], we get:

γ(2)=3γ(1)+2γ(0)

III. Express the autocovariances as autocorrelations: Normalize by the variance γ(0), to convert autocovariances into autocorrelations ρ(k):

ρ(1)=31+2=33=1,ρ(2)=31+2γ(0)

Solving the Difference Equations for AR(2)

To solve the Yule-Walker equations for the AR(2) process, we assume a solution of the form ρ(k)=λk. Substituting into the equation:

λ2=3λ+2

The characteristic equation is:

λ23λ2=0

Solving the quadratic equation:

λ=3±9+82=3±172

Thus, the roots are:

λ1=3+172,λ2=3172

The general solution for the autocorrelation function ρ(k) is:

ρ(k)=c1λ1k+c2λ2k

Finding Coefficients c_1 and c_2

Use ρ(0)=1

At k=0, we know ρ(0)=1. This gives the equation:

c1+c2=1

Use ρ(1)

At k=1, we use the relationship ρ(1)=3ρ(0)+2ρ(1) to find:

ρ(1)=31+2ρ(1)

Solving this, we get:

ρ(1)=32

Substituting into the general solution:

c1λ1+c2λ2=32

Solving the system of equations:

c1+c2=1c1λ1+c2λ2=32

This gives the values for c1 and c2, which can then be substituted back into the general solution for ρ(k).

Matrix Form of Yule-Walker Equations for AR(p)

For an AR(p) process, the Yule-Walker equations can be written in matrix form. Define:

Vector of autocorrelations:

r=[ρ(1) ρ(2)  ρ(p)]

Vector of AR coefficients:

ϕ=[ϕ1 ϕ2  ϕp]

The autocorrelation matrix R is a Toeplitz matrix:

R=[1ρ(1)ρ(2)ρ(p1)ρ(1)1ρ(1)ρ(p2)ρ(2)ρ(1)1ρ(p3)ρ(p1)ρ(p2)ρ(p3)1]

The Yule-Walker equations are then written as:

Rϕ=r

To solve for the AR coefficients ϕ:

ϕ=R1r

Table of Contents

    Yule-Walker Equations
    1. Definition
    2. Deriving the Yule-Walker Equations
      1. Assumptions
      2. Derivation Steps
    3. Example: Yule-Walker Equations for an AR(2) Process
      1. Deriving the Yule-Walker Equations
    4. Solving the Difference Equations for AR(2)
    5. Finding Coefficients c_1 and c_2
      1. Use ρ(0)=1
      2. Use ρ(1)
    6. Matrix Form of Yule-Walker Equations for AR(p)