Professional Documents
Culture Documents
The University of British Columbia Irving K. Barber School of Arts and Sciences
The University of British Columbia Irving K. Barber School of Arts and Sciences
1
Exercises for Submission
In each question below, write out (or type) the required lines of R code, if needed, together
with the answer to the question. Total mark 30 points. 2 points for each question.
1. Suppose a simple regression model has been fit to data relating next month’s change in
unemployment rate (in percent), E in to this month’s change in GDP (in percent), G:
E = .005 − .011G. Use this model to predict next month’s unemployment rate, assuming
this month’s rate is 4.582%, supposing the GDP
(a) increased by 1% this month.
(b) decreased by 1% this month.
(c) stayed the same this month.
2. Consider the data in p2.16 in the MPV package. This data relates measurements of air
pressure taken in a tank with various volumes of a liquid.
(a) Construct a scatterplot which relates pressure to volume.
(b) Fit a simple regression model to the data which can be used to predict pressure from
volume. In particular, write down the slope and intercept estimates for the best fit
line.
(c) Overlay the scatterplot with the best-fit line obtained in the previous part.
(d) Find all of the fitted values.
(e) Find all of the residuals.
(f) Predict the pressure when the liquid volume is 2100. Also, calculate a 95% prediction
interval for this. Are you extrapolating?
(g) Predict the pressure when the liquid volume is 1100. Also, calculate a 95% prediction
interval for this. Are you extrapolating?
3. Refer to the previous question. Perform the following assignment:
(a) Is p2.16.summary a list?
(b) Find the names of the objects in p2.16.summary.
(c) List the contents of p2.16.summary$coefficients.