Homework 1,

Contents

Submit your solution as a pdf via Canvas. You may scan a handwritten solution. Later in the course, we will

be using Rmarkdown for projects, so you might like to use that also for this homework. In that case, the

source code for this assignment is available on github to help get you started. Rmarkdown combines R with

Latex, so extra work will be required initially if you are unfamiliar with either of these.

Question 1.1. Recall the basic properties of covariance, Cov(X, Y ) = E

(X − E[X])(Y − E[Y ])

, following

the convention that upper case letters are random variables and lower case letters are constants:

P1. Cov(Y, Y ) = Var(Y ),

P2. Cov(X, Y ) = Cov(Y, X),

P3. Cov(aX, bY ) = ab Cov(X, Y ),

P4. Cov ?PM

m=1 Ym,

PN

n=1 Yn

?

=

PM

m=1

PN

n=1 Cov(Ym, Yn).

Let Y1:N be a covariance stationary time series model with autocovariance function γh and constant mean

function, µn = µ. Consider the sample mean as an estimator of µ,

µˆ(y1:N ) = 1

N

X

N

n=1

yn.

Show how the basic properties of covariance can be used to derive the expression,

Var

µˆ(Y1:N )

?

=

1

N

γ0 +

2

N2

N

X−1

h=1

(N − h)γh.

Question 1.2. The sample autocorrelation is perhaps the second most common type of plot in time series

analysis, after simply plotting the data. We investigate how R represents chance variation in the plot of the

sample autocorrelation function produced by the acf function. We seek to check what R actually does when

it constructs the dashed horizontal lines in this plot. What approximation is being made? How should the

lines be interpreted statistically?

If you type acf in R, you get the source code for the acf function. You’ll see that the plotting is done by a

service function plot.acf. This service function is part of the package, and is not immediately accessible to

you. Nevertheless, you can check the source code as follows:

1. Notice, either from the help documentation ?acf or the last line of the source code acf that this

function resides in the package stats.

2. Now, you can access this namespace directly, to list the source code, by

stats:::plot.acf

3. Now we can see how the horizontal dashed lines are constructed. The critical line of code seems to be

clim0 <- if (with.ci) qnorm((1 + ci)/2)/sqrt(x$n.used)

This appears to correspond to a normal distribution approximation for the sample autocorrelation estimator,

with mean zero and standard deviation 1/

√

N.

A. This question investigates the use of 1/

√

N as an approximation to the standard deviation of the sample

autocorrelation estimator under the null hypothesis that the time series is a sequence of independent,

identically distributed (IID) mean zero random variables.

Instead of studying the full autocorrelation estimator, you are asked to analyze a simpler situation where we

take advantage of the knowledge that the mean is zero and consider

ρˆh(Y1:N ) =

1

N

PN−h

n=1 Yn Yn+h

1

N

PN

n=1 Y 2

n

where Y1, . . . , YN are IID random variables with zero mean and finite variance. Specifically, find the mean

and standard deviation for ρˆh(Y1:N ) when N becomes large.

The actual autocorrelation estimator subtracts a sample mean, and you can analyze that instead if you want

an additional challenge.

You will probably want to make an argument based on linearization. You can reason at whatever level of

math stat formalization you’re happy with. According to Mathematical Statistics and Data Analysis by John

Rice, a textbook used for the undergraduate upper level Math Stats course, STATS 426,

“When confronted with a nonlinear problem we cannot solve, we linearize. In probability and statistics, this

method is called propagation of errors or the δ method. Linearization is carried out through a Taylor

Series expansion.”

Rice then proceeds to describe the delta method in a way very similar to the Wikipedia article on this topic.

In summary, suppose X is a random variable with mean µX and small variance σ

2

X, and g(x) is a nonlinear

function with derivative g

0

(x) = dg/dx. To study the random variable Y = g(X) we can make a Taylor series

approximation,

Y ≈ g(µX) + (X − µX)g

0

(µX).

This approximates Y as a linear function of X, so we have

1. µY = E[Y ] ≈ g(µX).

2. σ

2

Y = Var(Y ) ≈ σ

2

X

?

g

0

(µX)

2

.

3. If X ∼ N

µX, σ2

X

, then Y approximately follows a N

g(µX), σ2

X

?

g

0

(µX)

2

distribution.

B. It is often asserted that the horizontal dashed lines on the sample ACF plot represent a confidence interval.

For example, in the documentation produced by ?plot.acf we read

ci: coverage probability for confidence interval. Plotting of the confidence interval is suppressed if ‘ci’ is zero or negative.

Use a definition of a confidence interval to explain how these lines do, or do not, construct a confidence

interval.

Question 1.3. Explain which parts of your responses above made use of a source, meaning anything or

anyone you consulted (including classmates or office hours) to help you write or check your answers. All

sources are permitted, but failure to attribute material from a source is unethical. See the syllabus for

additional information on grading.

2