title: “Problem 1.18” author: “Garland Durham” date: “February 26, 2017” output: html_document —

1.18

w = rnorm(1000)
t = seq(1,1000)
s = 2*cos(pi*(t+12)/7)
y = s + w
y = ts(y)
plot(y)
lines(s,col=2)

acf( y, lag.max=20)
points(seq(0,20),c(1,rep(0,20)), col=2, pch='o')

Since the time series is not stationary, sample acf is not expected to converge to true acf.