Exercise 5 of Assignment 4 (due 2/2/09) 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 Au- toregressive Processes? on the next page. 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 ?t = 1), and call these values ? S (p) 1 (f 6 ), ? S (p) 1 (f 7 ) and ? S (p) 1 (f 8 ). Repeat the above a ?large? number N r of times (us- ing a di?erent realization of the Gaussian white noise process each time) to obtain the sequences { ? S (p) j (f 6 ) : j = 1,...,N r }, { ? S (p) j (f 7 ) : j = 1,...,N r } and { ? S (p) j (f 8 ) : j = 1,...,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 coe?cient between 1. { ? S (p) j (f 6 )} and { ? S (p) j (f 7 )}, 2. { ? S (p) j (f 6 )} and { ? S (p) j (f 8 )} and 3. { ? S (p) j (f 7 )} and { ? S (p) j (f 8 )} (cf. the equation for ?? 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 Y t = p X j=1 ? j,p Y t?j + ? t describe a stationary AR(p) process, where {? t } is a white noise process with zero mean and variance ? 2 p , and {? j,p : j = 1,...,p} is a sequence of AR coe?cients. Givene? 1 , e? 2 , ..., e? 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 {? j,p?1 : j = 1,...,p ? 1}, {? j,p?2 : j = 1,...,p?2}, ..., {? j,2 : j = 1,2} and {? 1,1 } by computing the following for k = p, p?1, ..., 2: ? j,k?1 = ? j,k + ? k,k ? k?j,k 1?? 2 k,k , 1 ? j ? k ?1. 2. Second, we calculate ? 2 k?1 = ? 2 k 1?? 2 k,k , k = p,p?1,...,1. 3. Third, we generate Y 1 , Y 2 , ..., Y p via Y 1 = ? 0 e? 1 Y 2 = ? 1,1 Y 1 + ? 1 e? 2 Y 3 = ? 1,2 Y 2 + ? 2,2 Y 1 + ? 2 e? 3 . . . Y p = ? 1,p?1 Y p?1 + ? 2,p?1 Y p?2 + ··· + ? p?1,p?1 Y 1 + ? p?1 e? p . 4. Finally, the remaining N ?p values are generated using Y t = p X j=1 ? j,p Y t?j + ? p e? t , t = p + 1,...,N. 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 coe?cients ? 1,2 = 3 4 and ? 2,2 = ? 1 2 and has ? 2 2 = 1. Application of step 1 yields ? 1,1 = ? 1,2 + ? 2,2 ? 1,2 1?? 2 2,2 = 3 4 ? 1 2 · 3 4 1? 1 4 = 1 2 , while step 2 yields ? 2 1 = ? 2 2 1?? 2 2,2 = 1 1? 1 4 = 4 3 and ? 2 0 = ? 2 1 1?? 2 1,1 = 4 3 1? 1 4 = 16 9 . We thus would generate the AR(2) process using Y 1 = 4 3 e? 1 Y 2 = 1 2 Y 1 + 2 ? 3 e? 2 Y 3 = 3 4 Y 2 ? 1 2 Y 1 +e? 3 . . . Y N = 3 4 Y N?1 ? 1 2 Y N?2 +e? N . For the AR(4) process, we have ? 1,4 = 2.7607, ? 2,4 = ?3.8106, ? 3,4 = 2.6535 and ? 4,4 = ?0.9238, with ? 2 4 = 1. Application of step 1 yields ? 1,3 = ? 1,4 + ? 4,4 ? 3,4 1?? 2 4,4 . = 2.1105749802379 ? 2,3 = ? 2,4 + ? 4,4 ? 2,4 1?? 2 4,4 . = ?1.98076723152095 ? 3,3 = ? 3,4 + ? 4,4 ? 1,4 1?? 2 4,4 . = 0.70375083325625 ? 1,2 = ? 1,3 + ? 3,3 ? 2,3 1?? 2 3,3 . = 1.41977220651098 ? 2,2 = ? 2,3 + ? 3,3 ? 1,3 1?? 2 3,3 . = ?0.98160135815478 ? 1,1 = ? 1,2 + ? 2,2 ? 1,2 1?? 2 2,2 . = 0.71647720701657, while step 2 yields ? 2 3 = ? 2 4 1?? 2 4,4 . = 6.8215820667702 ? 2 2 = ? 2 3 1?? 2 3,3 . = 13.515181723107 ? 2 1 = ? 2 2 1?? 2 2,2 . = 370.69765006 ? 2 0 = ? 2 1 1?? 2 1,1 . = 761.717290031. ied ied hw-4-exer-5-09