In this assignment you will be working with a very small data set. You need to build a regression from the ground up. I want you to focus on your understanding of the regression error term. Specifically, can you have an error term without first having a regression line?

Read pages 9-25 in the Lewis-Beck book Applied Regression for help.



Raw Data

X Y
2 1
4 5
6 6
8 7
10 11



Our regression model is: \(y = b_0 + b_1 x + e\)

The variance/covariance of our data is:

var(x): 10
var(y): 13
cov(x,y): 11

Answer the following:

  1. Calculate \(b_1\) using the knowledge the slope can be calculated as cov(x,y) / var(x).

ANSWER:



  1. Interpret the coefficient \(b_1\) in plain English.

ANSWER:



  1. Calculate \(b_0\). Recall that the regression line always passes through the mean of X and Y:

\(\bar{y} = b_0 + b_1 \bar{x}\)

ANSWER:



  1. What is the predicted value of Y when X has a value of 14?

ANSWER:



  1. Calculate the sum of the squared errors (see page Lewis-Beck, p14).

ANSWER:



Calculating the Residual

Replace each a in the table with the correct value.

X Y \(\hat{Y}\) e \(e^2\)
2 1 a a a
4 5 a a a
6 6 a a a
8 7 a a a
10 11 a a a



  1. Calculate the regression sum of squares (Lewis-Beck p21). You can check your results against the ANOVA table below.

ANSWER:



  1. Calculate the \(R^2\) using the sum of squares in the table.

ANSWER:



Analysis of Variance (ANOVA) Table:

Analysis of Variance Table
  Df Sum Sq Mean Sq F value Pr(>F)
x 1 48.4 48.4 40.33 0.007898
Residuals 3 3.6 1.2 NA NA



Submission Instructions

After you have completed your lab, knit your RMD file. Login to Canvas at http://canvas.asu.edu and navigate to the assignments tab in the course repository. Upload your RMD and your HTML files to the appropriate lab submission link.

You can create a new RMarkdown file, or download the lab template: RMD Template

Remember to: