In: Statistics and Probability
Please answer everything in R programming language. Show the code to me as well. Thank You
1. Problem
Open dataset stat500. Package: faraway. Use R
(a) Calculate the correlation matrix. 10.
(b) Plot total vs hw, to see how
strong the relationship.
(c) Build a simple linear regression: total regressed against
midterm. Print model output.
(d) Calculate directly the coefficients as in (3)
(e) Calculate the Residual standard error s, as in (4).
(f) Calculate the standard error of beta_1, as in (5).
Calculate the 95%- CI for beta_1.
(g) Calculate the ANOVA F-stat ,as in (6)
(h) Perform Residual Analysis.(7)
(i) If residuals are ok, make 1 prediction together with prediction
CI intervals.