STAT 479: Time Series Analysis I Assignment 1


Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due


STAT 479 - Assignment 1 - due date is on course outline 

NOTES: 

1. See the comments on ‘Technical Writing’, on the course web site, before submitting your work. 

2. Don’t be afraid to see me, or the TA, for help on the assignments. 

3. As an incentive for getting started with R right away, there will be a 2% bonus on the course mark given to those who complete part (b) of question 9 (this can be done independently of everything else) and get it to me by the deadline in the course outline. To get the bonus you need only write an R program that does what is required, and e-mail it to [email protected] as an attachment with the name ‘yourname.R’. If I can run it in R and get the required output — the matrix with columns ‘lag’, ‘acf’ and ‘p-value’ and the acf plot — then the points are yours. 

1. 1.4 in the text. 

2. 1.5 in the text. 

3. 1.6 in the text. 

4. 1.7 in the text. 

5. 1.9 in the text. (Recall that cos( − ) = sin  sin  + cos  cos , and review the facts about covariances from Lecture 2.) The series constructed in this problem will form the basis of the frequency domain methods considered later in this course. 

6. 1.12 in the text. 

7. Let {} be a stationary normal process with mean  and autocovariance function  (). Thus for each ,  is a Normal random variable (r.v.) with mean  and variance  (0), and also cov[ +] =  (). Define the nonlinear time series  =  . 

(a) Express the mean function  [] in terms of  and  (0). (Hint: Recall that the moment generating function (m.g.f.) of a random variable  is defined to be  () =  £ ¤ , assuming that this function of  exists for  near 0. Look it up, if you don’t remember it, in the case that  is normally distributed.) 

(b) Determine the autocovariance function of {}. (Here you will need the distribution of the sum  + + of jointly normally distributed — but not independent — r.v.s. What is it?) 

8. This question is designed to reinforce a feeling for correlation as a measure of the strength of a linear relationship. Consider a straight line regression model, which in the notation of this course can be written  = 0 + 1 +   = 1  . Here {} and {} are numerical values of observations on random variables {} and {}, and {} is white noise. The least squares estimates of (0 1) are the minimizers of the sum of squares function  (0 1) = X =1 { − (0 + 1)}2  

(a) Using the notation   = P( − ¯) ( − ¯), show that the minimizers are ˆ0 = ¯ − ˆ1¯ and ˆ1 =     

(b) Show that, in the notation of this course, the slope estimate can be expressed as ˆ1 = ˆ  (0)s ˆ (0) ˆ (0)

(c) Now consider the same problem, but before any observations are made. We plan to predict  by 0 + 1, and want to do so in such a way as to minimize the mean squared error  (0 1) =  £ { − (0 + 1)}2¤  Show that the minimizers are 0 =  [ ] − 1 [] and 1 =   (0)s  (0)  (0) 

Thus the least squares estimates can be viewed as numerical solutions to this ‘minimum mse’ problem, obtained by replacing the (unknown) variances and covariances by sample estimates. And the slope is a multiple of the correlation, which we thus see measures the strength of the linear relationship. (In fact if  and  were each divided by their standard deviations before we did anything else, the end result would be 1 =   (0), i.e. the correlations would be the slope.) 

9. Let {} be a Normal white noise process (with variance 2  = 1), and consider the series  = −1. 

(a) Determine the mean and autocorrelation function of . Is the series weakly stationary? Why or why not? With reference to your answers in part (b), comment on the relationship between these points and the horizontal confidence bands which are also on the acf plot. Do these numerical results give you reason to believe, or doubt, the answer you just gave? Explain. 

(b) To obtain numerical evidence for (or against) your answer in (a), carry out the following on R. First simulate  = 1000 values {} =1, as follows: The command w = ts(rnorm(1001,0,1)) gives you {}1001 =1 , then lagw = lag(w, -1) gives {+1}. Enter the command mat = cbind(w,lagw)followed by (for example) mat[1:5,] to see the effect of all of this. Now x = w*lagw gives you {} =1. Note that one point is lost in the lagging process. Plot the autocorrelation function at lags  = 0 1  20. Then compute all 21 p-values associated with the tests of the null hypotheses that  ()=0. For this you can use the commands a = acf(x,20) # Compute and plot the acf teststat = abs(sqrt(1000)*a$acf) # two-sided alternative p.value = 2*(1-pnorm(teststat)) # Compute p-values: the command pnorm(x) computes  ( ≤ ), when  ∼ (0 1)). Present your findings as a matrix with columns ‘lag’, ‘acf’ and ‘p-value’; also place an ‘×’ on the acf, at height 1 or 0, depending on whether or not the p-value was significant ( 05, say): mat = cbind(0:20, round(a$acf,3), round(p.value,3)) colnames(mat) = c("lag", "acf", "p.value") mat points(0:20, (p.value  .05), pch="x") Your acf plot should now look something like the following: 0 5 10 15 20 0.0 0.2 0.4 0.6 0.8 1.0 Lag ACF Series x x x x x x xxxxxxxxxxxxxxxx Sample acf. Points (‘×’) indicate whether or not the p-value is  05. 10. 2.6 in the text.

发表评论

电子邮件地址不会被公开。 必填项已用*标注