A psychologist speculates that spending a lot of time on the internet has a negative effect on children's sleep. Consider the following data on hours of deep sleep (Y) and hours spent on the internet (X) where xi and yi are the observations on internet time and deep sleep time of the ith (i = 1, 2, ..., 9) child respectively:
Child i: 1, 2, 3, 4, 5, 6, 7, 8, 9
Internet time xi (in h): 0.3, 2.2, 0.5, 0.7, 1.0, 1.8, 3.0, 0.2, 2.3
Sleep time yi (in h): 5.8, 4.4, 6.5, 5.8, 5.6, 5.0, 4.8, 6.0, 6.1
(a) Estimate the linear regression model for the given data and interpret the coefficients.
(b) Calculate R^2 to judge the goodness of fit of the model.
(c) Reproduce the results of a) and b) in R and plot the regression line.
(d) Now assume that we only distinguish between spending more than 1 hour on the internet (X = 1) and spending less than (or equal to) one hour on the internet (X = 0). Estimate the linear model again and compare the results. How can beta-hat now be interpreted? Describe how beta-hat changes if those who spend more than one hour on the internet are coded as 0 and the others as 1.