Homework 2 Autocovariance function




Rate this product

Homework 2
Submit your solution as a pdf via Canvas. You may scan a handwritten solution. Later in the course, we will
be using Rmarkdown for projects, so you might like to use that also for this homework. In that case, the
source code for this assignment is available on github to help get you started. Rmarkdown combines R with
Latex, so extra work will be required initially if you are unfamiliar with either of these.
Question 2.1. We investigate two ways to calculate the autocovariance function for AR and MA models.
These methods extend to ARMA models. The instructions below help you work through the case of a causal
AR(1) model,
Xn = φXn−1 + ?n.
where {?n} is white noise with variance σ
, and −1 < φ < 1. Assume the process is stationary, i.e., it is
initialized with a random draw from its stationary distribution. Show your working for both the approaches A
and B explained below. If you want an additional challenge, you can work through the AR(2) or ARMA(1,1)
case instead.
A. Using the stochastic difference equation to obtain a difference equation for the autocovariance function
(ACF). Start by writing the ACF as
γh = Cov(Xn, Xn+h) = Cov(Xn, φXn+h−1 + ?n+h), for h 0.
Writing the right hand side in terms of γh−1 leads to an equation which is formally a first order linear
homogeneous recurrence relation with constant coefficients. To solve such an equation, we look for solutions
of the form
γh = Aλh
Substituting this general solution into the recurrence relation, together with an initial condition derived
from explicitly computing γ0, provides an approach to finding two equations that can be solved for the two
unknowns, A and λ.
B. Via the MA(∞) representation. Construct a Taylor series expansion of g(x) = (1 − φx)
−1 of the form
g(x) = g0 + g1x + g2x
2 + g3x
3 + . . .
Do this either by hand or using your favorite math software (if you use software, please say what software you
used and what you entered to get the output). Use this Taylor series to write down the MA(∞) representation
of an AR(1) model. Then, apply the general formula for the autocovariance function of an MA(∞) process.
C. Check your work for the specific case of an AR(1) model with φ1 = 0.6 by comparing your formula with
the result of the R function ARMAacf.
Question 2.2 Compute the autocovariance function (ACF) of the random walk model. Specifically, find the
ACF, γmn = Cov(Xm, Xn), for the random walk model specified by
Xn = Xn−1 + ?n,
where {?n} is white noise with variance σ
, and we use the initial value X0 = 0.
Question 2.3. Explain which parts of your responses above made use of a source, meaning anything or
anyone you consulted (including classmates or office hours) to help you write or check your answers. All
sources are permitted, but failure to attribute material from a source is unethical. See the syllabus for
additional information on grading.
Reading. We have covered much of the material through to Section 3.4 of Shumway and Stoffer (Time Series
Analysis and its Applications, 4th edition). The course notes are intended to be self-contained, and additional
reading is therefore optional. Reading this textbook will help to broaden your understanding of these topics.