Assignment 2 - HLTH 605b - Fall 2020 (100 Marks)
Assignment 2 - HLTH 605b - Fall 2020 (100 Marks)
Write up your own answers to the following questions. Also, where asked to use R, you must do so. Include
your R code as part of your answer, similar to how the code and subsequent results are presented in the
module notes. Submit your answers to the Assignment 2 dropbox in .pdf, .doc, or .docx format.
1
b. (18 marks)
(4 points) Using R, fit a simple linear regression of Gas (Y ) on Temp (X).
(3 points) Write out the fitted simple linear regression model, and (5 points) then interpret it.
(6 points) And specifically what would happen to the estimate of the slope of your fitted regression line
if the data for temperature (T emp) was reported in Fahrenheit units instead of units of Celcius?
c. (10 marks)
(5 points) Using R, re-create the plot from (3.a), but now overlay the fitted regression line. Again,
add a centered title to the plot.
(5 points) In words, explain how the line fits the data points, and also mention how the fit for the ‘After’
data compares with that from the regression line fit on the ‘Before’ data seen in FIGURE 2b.2 in the
Module 2b notes.
d. (22 marks)
(13 marks) Using R, obtain (i) a 95% confidence interval for the model’s predicted value of Gas when
Temp has a value of 6.0 degrees Celsius, and (ii) a 99% confidence interval for the model’s slope.
(9 marks) Briefly interpret each of these two interval estimates.