Lab3.pdf - Lab3 Kaibo Gong Thursday February 4 2015...

This preview shows page 1 - 3 out of 6 pages.

Lab3 Kaibo Gong Thursday, February 4, 2015 Homework format You need to use rmarkdown to format your homework. The format allowed .pdf, .doc(.docx), and .html. Make sure your submission is organized and readable for grader. Directly submit the code (.Rmd or .R file) will receive 0. Simple Linear Regression Assumptions E ( Y | X = x ) = β 0 + β 1 x V ar ( Y | X = x ) = σ 2 Here E ( Y | X = x ) = β 0 + β 1 x is the true mean function. OLS Estimation By OLS (Ordinary Least Square), we can obtain the estimated mean function: ˆ E ( Y | X = x ) = ˆ β 0 + ˆ β 1 x where ˆ β 0 and ˆ β 1 are the estimators of β 0 and β 1 . Estimation of σ 2 The estimate of σ 2 is ˆ σ 2 = RSS n - 2 We have n - 2 as our denominator because we used 2 degrees of freedom in estimating β 0 and β 1 . Standard Error and t-Test Refer Section 2.5 and 2.6. 1
SE for fitted value and SE for prediction The difference between these two standard errors is: For prediction, we need to take the random error term into consideration (page.32), which means the SE for prediction should always be larger than the SE for fitted value given the same x-value.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture