You are on page 1of 8

EC 311 - Homework III

March 26, 2014

SECTION 1: Analysis of the Relationship between oil


prices and the stock market using EXCEL
There is a strong presumption in the nancial press that oil prices drive the stock
market.

In this homework, we use the tools in class to conduct a simple analysis of

the relationship between oil prices and the stock market. You will be responsible for
collecting the dataset for this exercise.

Your dataset should consist of monthly data

on the NASDAQ, and the West Texas Intermediate (WTI) crude oil prices in Cushing
from February, 2001 to February, 2014. You will be required to use EXCEL and R
for this homework. All the data you need is available on the Federal Reserve Bank of
Saint Louis' Federal Reserve Economic Data (FRED) website (I showed in class how to
get to this website). Please do the following exercises in EXCEL. Present your nal
answers in a Microsoft Word or LATEX document processor.

1. Collect and construct a time series plot of the data on the NASDAQ. Put this
graph on your Word/LATEX document

2. Collect and construct a time series plot of the data on the WTI crude oil prices.
Put this graph on your Word/LATEX document

3. In general, what can you say about these two graphs? Is there a trend? Why?

4. Now construct a scattergram, with oil prices on the vertical axis, and the NASDAQ on the horizontal axis. What can you say about the relationship?

5. In class, we saw some important characteristics of probability distributions, and


their sample counterparts given below.

n
1X

Xt
X=
n t=1

s2x =

Let

(1)

n
1 X
2
(Xt X)
n 1 t=1

(2)

sxy =

n
1 X

(X X)(Y
Y )
n 1 t=1

(3)

xy =

sxy
sx sy

(4)

Wt represent the WTI crude oil prices in month t, and St denote the NASDAQ

in month

t.

Use equations (1) - (2) to nd the sample means, variances, and

standard deviations of

Wt

and

St . You will receive no points if you use built in

EXCEL functions such as = average() to nd the sample mean, or = var() to


nd the variance of each series. I need to see your EXCEL sheet and how you
calculated these statistics using the above formulas. After calculating these,

put your nal answer in your WORD/LATEX document.


St

and

and

Wt .

6. Using equations (3) and (4), nd the covariance and correlation between

Wt .

Using these statistics, comment on the relationship between

St

Again, you will receive no points if you use built in EXCEL functions such as
= cov() to nd the covariance, or = corr() to nd the correlation between the

two variables. I need to see your EXCEL sheet and how you calculated these
2

statistics using the above formulas. After calculating these, put your nal

answer in your WORD/LATEX document.


7. As we mentioned in class on Monday March 3, 2014, one can examine the relationship between two or more variables using regression analysis. The following
equations were introduced:

Yt = 1 + 2 Xt + ut

(5)

Yt = b1 + b2 Xt + et

(6)

Equation (5) is called the stochastic population regression function (PRF) and
equation (6) is called the stochastic sample regression function.
stochastic error term, and
for

ut

is called the

et is called the residual term. b1 is an unbiased estimator

1 , and b2 is an unbiased estimator for 2 . What do the words STOCHASTIC

and UNBIASEDNESS mean?

8. In order to say something about the overall relationship between stock prices
and oil prices, we can use our sample from February, 2000 to February, 2014 to
estimate the following SRF:

St = b1 + b2 Wt + et

(7)

Using the method of Ordinary least squares (OLS), we showed in class that the
estimators

b1

and

b2

are given by:

b1 = S b2 W

(8)

n
X

)(St S)

(Wt W

b2 =

i=1
n
X

(9)

)2
(Wt W

i=1
Using equations (8) and (9) please provide estimates for

b1

and

b2 . Again, I want

to see you use these formulas in EXCEL. You will receive no points if you use
the regression toolpak in excel. I need to see your EXCEL sheet and how you
calculated these statistics using the above formulas. After calculating these,

put your nal answer in your WORD/LATEX document.


9. As we did in class, interpret the coecients on

b1

and

b2 .

10. We showed in class that the variances of these estimators were given by:

n
X

Wt2

i=1

V ar(b1 ) =
n

n
X

(10)

)2
(Wt W

i=1

1
V ar(b2 ) = X
2
n
)2
(Wt W

(11)

i=1
Where

is the population error variances. We said that because the population


n e2
2
is usually unknown, we use the estimator of , denoted
2 = i=1 i . ni=1 e2i is

n2

called the residual sum of squares. What does that mean? Please calculate

2.

11. Using the formulas (10) and (11), calculates the variances and corresponding
standard errors of the estimators

b1

and

b2 . b2 . Again, I want to see you use these

formulas in EXCEL. You will receive no points if you use the regression toolpak
in excel. I need to see your EXCEL sheet and how you calculated these statistics
using the above formulas. After calculating these, put your nal answer

in your WORD/LATEX document.


4

12. Submit (by email) your excel spreadsheet (with data and formulas) involving all
your calculations no later than Wednesday March 26 at 3:45 PM. Send the emails
to douy@clarkson.edu.

SECTION 2: The Cobb-Douglas Production Function


Using R
Suppose the theoretically correct production function for the United States is of the
Cobb-Douglas type, as follows:

ln Yt = 1 + 2 ln Kt + 3 ln Lt + ut
where

ln

is the natural logarithm,

Yt

is real GDP in the U.S.,

formation for the U.S. (a proxy for physical capital), and

Lt

(12)

Kt

is gross xed capital

is total average hours of

work per week for production workers in the manufacturing sector in the U.S. All the
data you will need are on the FRED website of the Federal Reserve Bank of St. Louis.

You are required to use R for this section of the homework.

1. Collect quarterly data on


on FRED) , and

Lt

Yt (series GDPC1 on FRED), Kt (series USAGFCFQDSMEI

(series LNU02032199 on FRED) from 1956 to 2013.

2. Using R, do time series plots of each of the series.

Put these plots in your

WORD/LATEX Document.

3. Using R, estimate the coecients on


interpret each of them.

1 , 2 ,

and

in equation

(12)

above, and

After estimating these, put your nal answer in

your WORD/LATEX document.

4. Also calculate the variances, standard errors, and t-statistics for

1 , 2 ,

and

3 .

After estimating these, put your nal answer in your WORD/LATEX


document.
5. What are the 95% condence intervals for

1 , 2 ,

and

3 ?

Put your nal

answer in your WORD/LATEX document.


6. Based on the t-statistics from (4) and the condence intervals from (5), are the
estimated coecients on

1 , 2 , and 3

statistically signicant? Why or why not?

Put your nal answer in your WORD/LATEX document.


7. Copy and paste your R code in your WORD/LATEX document.

8. Submit your word/LATEX document in class on Wednesday 03/26/2014. You


will receive absolutely no points if I nd out that your data, and/or R code are
wrong, yet you have the correct answers in your Word/LATEX document.

SECTION 3: Other Excercises


1. Given the following information on 10 pairs of observations on

Xi = 40, Xi Yi = 100, Xi2 = 110, Yi2 = 90.

and

Y : Yi = 30,

Asuming all the assumptions of

the CLRM:

(a) Find

b1

and

b2

(b) The standard error of these estimators.


(c)

r2

(d) Establish a 95% condence interval for

and

2 .

(e) Based on the condence intervals in (d), do you accept or reject the hypothesis that

2 = 0?
6

2. In examining the relationship between the unemployment rate and the growth
rate of real GDP, Atems (2013) obtains the following results:

Yt =

0.85

se = (

0.03Ut

(0.0025)

(3.067)
where

Yt

is growth rate of output, and

Ut is

r2 = 0.9135

(13)

)
the unemployment rate.

(a) Interpret the estimates of the slope and intercept


(b) Are the estimates of the slope and intercept statistically signicant? How
do you know?
(c) Is the estimate of the slope realistic for the U.S. economy? Explain why or
why not.
(d) What does the

r2

value of 0.9135 indicate?

3. Are rent rates inuenced by the student population in a college town? To examine
this, Ansah, Jones,Tungara, and Whaley (2012) collrct data on the following
variables:

rent

in the U.S;

pop

- the average monthly rent paid on rental units in a college town


- total city population;

avginc

- average city income;

pctstu

- the

student population as a percentage of total population. The authors estimate the


model:

log(rent) = 1 + 2 log(pop) + 3 log(avginc) + 4 pctstu + u

(14)

(a) State the null hypothesis that size of the student body relative to the population has no ceteris paribus eect on monthly rents. State the alternative
hypothesis that there is an eect.

(b) What signs do you expect for

and

2 ?

(c) Using data for 1990 for 64 college towns, suppose Ansah, Jones,Tungara,
and Whaley (2012) estimate the following:

d
log(rent)
= 0.043 + 0.066log(pop) + 0.507log(avginc) + 0.0056pctstu

se

(0.844)

(0.039)

(0.081)

(0.0017)

What is wrong with the statement: A 10% increase in population is associated with a 6.6% increase in rent?

You might also like