Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The variables are x=SP500 market monthly log return and y = monthly return of Am

ID: 3351783 • Letter: T

Question

The variables are x=SP500 market monthly log return and y = monthly return of American Express for 48 months beginning in January 2010.
For input into R, the data vectors for monthly market return and monthly stock return are
x=c(-0.037675, 0.028115, 0.057133, 0.014651, -0.085532, -0.055388, 0.066516, -0.048612, 0.083928, 0.036193, -0.002293, 0.063257, 0.022393, 0.031457, -0.001048, 0.028097, -0.013593, -0.018426, -0.021708, -0.058467, -0.074467, 0.102307, -0.005071, 0.008497, 0.04266, 0.039787, 0.030852, -0.007526, -0.064699, 0.038793, 0.012519, 0.019571, 0.023947, -0.019988, 0.002843, 0.007043, 0.049198, 0.011, 0.035355, 0.017924, 0.02055, -0.015113, 0.048278, -0.031798, 0.029316, 0.04363, 0.027663, 0.02329)
and
y=c(-0.069106, 0.014097, 0.081678, 0.111456, -0.145839, 0.000267, 0.117249, -0.112987, 0.052807, -0.008864, 0.041605, -0.007102, 0.01488, 0.004349, 0.036686, 0.086333, 0.050099, 0.00546, -0.032588, -0.006479, -0.101895, 0.124084, -0.052417, -0.018101, 0.064759, 0.053416, 0.089713, 0.043379, -0.075531, 0.041759, -0.005326, 0.010095, -0.024979, -0.012179, -0.001281, 0.02781, 0.026364, 0.055335, 0.081897, 0.016943, 0.101428, -0.012572, -0.010393, -0.025476, 0.048978, 0.08293, 0.047777, 0.05579)

Suppose we want to get a prediction interval for each of the next 10 months (beginning January 2014; when the SP500 returns are values in the following R vector.
xnext=c(-0.036231, 0.042213, 0.006908, 0.006182, 0.020812, 0.018879, -0.015195, 0.036964, -0.015635, 0.022936)

a. The t critical value for the 95% prediction interval is ________

b. Using the fitted regression equation for January 2010 to December 2013, the lower endpoint of the 95% prediction interval for January 2014 (SP500 return -0.036231) is _______________

c.The upper endpoint of this 95% prediction interval is ______________

d. The lower endpoint of the 95% prediction interval for October 2014 (SP500 return 0.022936) is _____________

e. The upper endpoint of this 95% prediction interval is______________

f. Get the 10 prediction intervals for January to October 2014 from part (b) of which you were asked to enter two intervals. The actual values of the monthly stock returns for American Express are in the following vector
ynext=c(-0.062409, 0.071062, -0.013792, -0.026786, 0.045537, 0.03616, -0.072421, 0.0174, -0.022656, 0.030133)
How many of these observed values (not used in the regression equation) are contained in the corresponding prediction intervals. (The response here is an integer between 0 and 10; theoretically it is close to 9.)

Anyone can use Rstudio to help me solve the question?

Explanation / Answer

a)

df = n-2 = 46

qt(0.975 , 46)
[1] 2.012896

b) and c)

model = lm (y~x)
> predict (model, data.frame(x= -0.036231) , interval= 'prediction' )
          fit       lwr        upr
1 -0.03217165      -0.1164408      0.05209748

d)   and e)
> predict (model, data.frame(x= -0.022936) , interval= 'prediction' )
          fit       lwr      upr
1 -0.01789275    -0.1016006        0.06581511