关键词 > 4861B/9861B

Statistical Sciences 4861B/9861B Assignment #1 2022

发布时间:2022-03-05

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Statistical Sciences 4861B/9861B, 2022

Assignment #1

1. Use R to plot the following datasets.  Describe them by stationarity, trend, and seasonality.  Plot also sample autocorrelation function and comment any patterns. You will use R functions source, plot or plot.ts, acf and others.  The datasets are on our course web. Download those datasets to your computers and use source to load them (for example source(”gold.dat”) or simply copy and paste from web). Notice that R is case sensitive: gold and Gold are different.

(a) R object nile — Average annual riverflow, nile at ASWAN, 1870-1945.        (b) R object gold from gold.dat — gold close price, 97 successive trading days.

(c) R object huron —Lake Huron, mean level, July, 1860-1985.

(d) R object elecus from elecus.dat — Total electricity consumption, u.s., 1920-70, kilowatt-hours (millions)

(e) R object water.london — London, Ontario, Total residential water consump-

tion, 01/83 - 04/94.

2. Let Yt  = U sin(2πt)+V cos(2πt), where U and V are independent random variables, each with mean 0 and variance 1.

(a) Is Yt  strictly stationary?

(b) Is Yt  covariance stationary?

3. Let {Yt} be the moving average process of order 2 (MA(2)) given by Yt  = et − θ1et − 1 − θ2et −2 ,

where {et} is WN(0,  1) and θi,i = 1, 2, are constants (parameters).

(a) Verify that {Yt} is weakly stationary.

(b) Compute the autocovariance and autocorrelation function.

(c) Compute the variance of the sample mean (Y1 +Y2 +Y3 +Y4)/4 when θ1  = 0.5 and θ2  = 2.

(d) Repeat (c) when θ1  = 0.5 and θ2  = −2 and compare your answer with the result obtained in (c).

4.  [Exercise 2.5] Suppose Yt  = 5+2t+Xt, where {Xt} is a zero-mean stationary series with autocovariance function γk .

(a) Find the mean function for {Yt}.

(b) Find the autocovariance function for {Yt}.

(c) Is {Yt} stationary? Why or why not?

5. Analysis of the dataset gt1880-2020. It recorded mean monthly global temperature (0.01 Celsius), from 01/1880 to 12/2020.

Source: http://data.giss.nasa.gov/gistemp/tabledata/GLB.Ts.txt

(a) Load gt1880-2020 into R and convert it into a time series objection with time stamp:  start=c(1880,1), end=c(2020,12), and freq=12.   (Hint:  look for the help page of ts() function using ?ts)

(b) Plot gt1880-2020 and describe your findings (check question 1).

(c) Plot the acf and describe your finds. Any connection to (b)?

(d) Apply ∇ (R function diff) to gt1880-2020 to get a new time series. Plot it and its acf respectively. Report your findings.

(e) Use

anntp=apply(matrix(gt1880-2020,ncol=12,byrow=TRUE),1,mean)                  to generate a new time series anntp which is mean annual global temperature. Use

anntp=ts(anntp,start=1880,end=2020,freq=1)

to make it as a time series object. Redo (b), (c), and (d) with the object anntp.