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 ways are different from the two ways already demonstrated in the notes, but there is some overlap. 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 a Taylor series calculation of 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.8\) 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\).
Question 2.3. Explain which parts of your responses above made use of a source, meaning anything or anyone you consulted (including your class group, or other classmates, or online solutions to previous courses) to help you write or check your answers. All sources are permitted, but you are expected to explain clearly what is, and is not, your own original contribution, as discussed in the syllabus.
Reading. We have covered much of the material through to Section 3.3 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.