Exercise 6 of Assignment 4 (due 2/4/08)


Generate a realization $Y_1$, $Y_2$, ..., $Y_{64}$ of the zero mean AR(2) process of Equation (45) using the procedure outlined in `Recipe for Simulating Autoregressive Processes' following the statement of this exercise. Compute the periodogram for the $Y_t$'s at three adjacent Fourier frequencies, namely, $f_6 = 6/64$, $f_7 = 7/64$ and $f_8 = 8/64$ (we are assuming $\Delta t = 1$), and call these values $\hat S^{(p)}_1 (f_6)$, $\hat S^{(p)}_1 (f_7)$ and $\hat S^{(p)}_1 (f_8)$. Repeat the above a `large' number $N_r$ of times (using a different realization of the Gaussian white noise process each time) to obtain the sequences $\{ \hat S^{(p)}_j (f_6): j = 1, \dots, N_r \}$, $\{ \hat S^{(p)}_j (f_7): j = 1, \dots, N_r \}$ and $\{ \hat S^{(p)}_j (f_8): j = 1, \dots, N_r \}$ (here `large' means between 100 and 10000 depending on your computer's tolerance for repetitive tasks). Compute the sample mean and sample variance for the three sequences, and compute the sample correlation coefficient between

1.
$\{ \hat S^{(p)}_j (f_6) \}$ and $\{ \hat S^{(p)}_j (f_7)
\}$,
2.
$\{ \hat S^{(p)}_j (f_6) \}$ and $\{ \hat S^{(p)}_j (f_8)
\}$ and
3.
$\{ \hat S^{(p)}_j (f_7)
\}$ and $\{ \hat S^{(p)}_j (f_8)
\}$
(cf. the equation for $\hat \rho$ displayed in the middle of page 5 of the text). Compare these sample values with the corresponding large sample values suggested by Equation (168b), the equation in the middle of page 199, Equation (222b) and Equation (222c).


Recipe for Simulating Autoregressive Processes

Let

\begin{displaymath}
Y_t = \sum_{j=1}^p \phi_{j,p} Y_{t-j} + \epsilon_t
\end{displaymath}

describe a stationary AR($p$) process, where $\{ \epsilon_t \}$ is a white noise process with zero mean and variance $\sigma_p^2$, and $\{ \phi_{j,p} : j = 1, \ldots, p \}$ is a sequence of AR coefficients. Given $\widetilde \epsilon_1$, $\widetilde \epsilon_2$, ..., $\widetilde \epsilon_N$ which are taken to be uncorrelated Gaussian deviates with zero mean and unit variance (obtained on a computer from a Gaussian random number generator), we desire to generate a realization of $Y_1$, $Y_2$, ..., $Y_N$. To do so, we carry out the following steps.
  1. We first calculate the $p-1$ sequences $\{ \phi_{j,p-1} : j = 1, \ldots, p-1 \}$, $\{ \phi_{j,p-2} : j = 1, \ldots, p-2 \}$, ..., $\{ \phi_{j,2} : j = 1, 2 \}$ and $\{ \phi_{1,1} \}$ by computing the following for $k = p$, $p-1$, ..., 2:

    \begin{displaymath}
\phi_{j,k-1}
= {\phi_{j,k} + \phi_{k,k} \phi_{k-j,k} \over 1 - \phi_{k,k}^2},
\qquad 1 \le j \le k-1.
\end{displaymath}

  2. Second, we calculate

    \begin{displaymath}
\sigma_{k-1}^2
=
{\sigma_{k}^2 \over 1 - \phi_{k,k}^2},
\qquad
k = p, p-1, \dots, 1.
\end{displaymath}

  3. Third, we generate $Y_1$, $Y_2$, ..., $Y_{p}$ via

    \begin{eqnarray*}
Y_1 &=& \sigma_{0} \widetilde \epsilon_1\\
Y_2 &=& \phi_{1,1}...
...ts + \phi_{p-1,p-1} Y_{1} +\sigma_{p-1} \widetilde \epsilon_{p}.
\end{eqnarray*}



  4. Finally, the remaining $N-p$ values are generated using

    \begin{displaymath}
Y_t = \sum_{j=1}^p \phi_{j,p} Y_{t-j} + \sigma_{p} \widetilde \epsilon_t,
\qquad
t = p+1, \ldots, N.
\end{displaymath}

Let us consider two concrete examples, namely, the AR(2) and AR(4) processes given by Equations (45) and (46a) of Percival and Walden (1993). The AR(2) process has coefficients $\phi_{1,2} = {3\over 4}$ and $\phi_{2,2} = {-{1\over 2}}$ and has $\sigma_2^2 = 1$. Application of step 1 yields

\begin{displaymath}
\phi_{1,1}
= {\phi_{1,2} + \phi_{2,2} \phi_{1,2} \over 1 - \...
...dot{3\over 4} \over 1 - {1\over 4}}
= {\textstyle {1\over 2}},
\end{displaymath}

while step 2 yields

\begin{displaymath}
\sigma_{1}^2
=
{\sigma_{2}^2 \over 1 - \phi_{2,2}^2}
= {1 \o...
...
{{4\over 3} \over 1 - {1\over 4}} = {\textstyle {16\over 9}}.
\end{displaymath}

We thus would generate the AR(2) process using

\begin{eqnarray*}
Y_1 &=& {\textstyle {4\over 3}} \widetilde \epsilon_1\\
Y_2 &...
...{N-1} - {\textstyle {1\over 2}} Y_{N-2} + \widetilde \epsilon_N.
\end{eqnarray*}



For the AR(4) process, we have $\phi_{1,4} = 2.7607$, $\phi_{2,4} = -3.8106$, $\phi_{3,4} = 2.6535$ and $\phi_{4,4} = -0.9238$, with $\sigma^2_4 = 1$. Application of step 1 yields

\begin{eqnarray*}
\phi_{1,3}
&=& {\phi_{1,4} + \phi_{4,4} \phi_{3,4} \over 1 - \...
...2,2} \phi_{1,2} \over 1 - \phi_{2,2}^2}
\doteq 0.71647720701657,
\end{eqnarray*}



while step 2 yields

\begin{eqnarray*}
\sigma_{3}^2
&=&
{\sigma_{4}^2 \over 1 - \phi_{4,4}^2}
\doteq ...
...
&=&
{\sigma_{1}^2 \over 1 - \phi_{1,1}^2}
\doteq 761.717290031.
\end{eqnarray*}




Return to home page for Stat/EE 520.