statistics in r regression 1

You have to use latex to open this file and you only need to do the question #4 which has 2 parts(a and b).

You dont need to write the answer by latex, you only need to give me the R code for every questions and the final answers.