STAT 5511 (Spring 2018) Homework 2
Assigned: Fri, Feb 9
Due: Mon, Feb 19
Instructions: All plots produced in R should have appropriate labels on the axes as well as titles. Any plot
should have explanation of what is being plotted given clearly in the accompanying text.
1. (Prediction using the cross-correlation function) Assume that Yt = AXt ‘ +Wt. The series Xt leads
Yt if ‘> 0 and is said to lag Yt if ‘< 0. Assume that E(Xt) = E(Yt) = 0, that Xt is stationary and
that Wt is white noise uncorrelated with the whole series Xt.
(a) Compute the cross covariance function between Yt and Xs, for any s and t. (Your answer will
depend on x, the autocovariance function of Xt.)
(b) Compute the cross correlation function between Yt and Xs, for any s and t. (Your answer will
depend on x, the autocovariance function of Xt.)
(c) Is Yt stationary?
2. Question 2.3, Shumway and Sto er.
3. Question 2.10, Shumway and Sto er.
4. Consider the setup of the previous question (Question 2.10, Shumway and Sto er), and let us focus
on just the oil series. One model we might consider for the (untransformed) oil series is the random
walk with drift model, Xt = 1 +Xt 1 +Wt where Wt WN(0; 2). If we let X0 = 0 be a constant
\intercept" term, then we have checked that we can write Xt = 0 + 1t +Pts=1Ws. The mean of
Xt is thus 0 + 1t. We might be interested in estimating this (linear) regression function.
(a) Use lm() to regress the (untransformed) oil series on time. Print the summary() of the results
and plot the data with the regression line. Comment brie y on the statistical signi cance of the
coe cients.
(b) Compute by hand the F-statistic for testing H0 : 1 = 0 against HA : 1 6= 0 (i.e., for testing
whether there is a drift) and the corresponding p-value by comparing to the appropriate F-
distribution (see ?FDist). Check your result matches the F-statistic reported by summary().
(c) Compute also the regression with the quadratic time term, corresponding to the model E(Xt) =
0 + 1t + 2t2 (this does not correspond to the random walk with drift model, so is a slight
digression). Compute the F-statistic and p-value for testing H0 : 2 = 0. Notice that this
should match the result of the p-value for the quadratic term reported by summary(). (For each
coe cient, summary() reports results of testing that coe cient to be 0 in a model where all the
other coe cients are present. In fact, it turns out, the square root of your F-statistic should be
the t-statistic that is reported.)
(d) Now we return to the random walk with drift model and the results of 4b. We want to assess
whether the p-values that we computed actually mean anything. We will run a simulation study
to do this.
Simulate a random walk with no drift Xt; for t = 1;:::;545. (You may want to use the cumsum
function.) Assume Wt iid N(0;1) (you may also take 0 = 0 although the value of 0 will not
matter here). Run the regression we ran previously in 4a of Xt on time, E(Xt) = 0+ 1t. Get the
p-value for testing H0 : 1 = 0. (Note: you can get p-values from summary()$coefficients.)
Do this procedure M = 1000 times. Report the proportion of p-values that are smaller than
:05. Provide a brief comment explaining what this means for the p-value reported in 4b.