Solutions for this homework can be hand-written or typed. Later in the course, we will be using Rmarkdown for projects, so you might like to use that also for homeworks. In that case, the source code for this assignment is available on github and might help get you started.


Question 2.1. We investigate two ways to calculate the autocovariance function for an ARMA model. The instructions below help you work through the case of a causal AR(1) model, \[X_n = \phi X_{n-1} + \epsilon_n.\] where \(\{\epsilon_n\}\) is white noise with variance \(\sigma^2\), and \(-1<\phi<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 \[\gamma_h = {\mathrm{Cov}}(X_n,X_{n+h})= {\mathrm{Cov}}(X_n, \phi X_{n+h-1} + \epsilon_{n+h}), \mbox{ for $h>0$}.\] Writing the right hand side in terms of \(\gamma_{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 \[\gamma_h = A\lambda^h.\] Substituting this general solution into the recurrence relation, together with an initial condition derived from explicitly computing \(\gamma_0\), provides an approach to finding two equations that can be solved for the two unknowns, \(A\) and \(\lambda\).

B. Via the MA(\(\infty\)) representation. Construct a Taylor series expansion of \(g(x)=(1-\phi x)^{-1}\) of the form \[g(x) = g_0 + g_1 x + g_2 x^2 + g_3 x^3 + \dots\] 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(\(\infty\)) representation of an AR(1) model. Then, apply the general formula for the autocovariance function of an MA(\(\infty\)) process.

C. Check your work for the specific case of an AR(1) model with \(\phi_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, \(\gamma_{mn}={\mathrm{Cov}}(X_m,X_n)\), for the random walk model specified by \[ X_{n} = X_{n-1}+\epsilon_n,\] where \(\{\epsilon_n\}\) is white noise with variance \(\sigma^2\), and we use the initial value \(X_0=0\).


Reading. We have covered much of the material through to Section 3.4 of Shumway and Stoffer (Time Series Analysis and its Applications, 3rd 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.