Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Semester 1 Assessment, 2022

MAST30025 Linear Statistical Models Assignment 2

Question 1 (5 marks)

Consider a general full rank linear model y  = X8 + e with p  >  2 parameters.   Derive an expression for a joint 100(1 - α)% confidence region for parameters βi  and βj, where i and j are arbitrary.

 

Question 2 (11 marks) (11 marks does not include the bonus part (f).)

An experiment is conducted to estimate the annual demand for cars, based on their cost, the current unemployment rate,  and the current interest rate.   A survey is conducted and the following measurements obtained:

Cars sold ( ×103)    Cost ($k)    Unemployment rate (%)    Interest rate (%)  

5.5                     7.2                           8.7                                 5.5

5.9                    10.0                          9.4                                4.4

6.5                     9.0                          10.0                                4.0

5.9                     5.5                           9.0                                 7.0

8.0                     9.0                          12.0                                5.0

9.0                     9.8                          11.0                                6.2

10.0                   14.5                         12.0                                5.8

10.8                    8.0                          13.7                                3.9

For this question, you may not use the lm function in R.

(a) Fit a linear model to the data, and estimate the parameters and error variance. (b)  Calculate 95% confidence intervals for the model parameters.

(c) In a year with 8% unemployment rate and 3.5% interest rate, we price a car at $12, 000 and observe that 7,000 cars are sold. Is this an atypical year (according to your model)?

(d) Using your answer from question  1,  find and draw a joint 95% confidence region for the parameters corresponding to unemployment rate and interest rate.  Superimpose a rectangle corresponding to the confidence intervals found in (b).

(e) Do you expect the confidence region to be larger or smaller than the rectangle?  Justify

your answer.

(f)  (Bonus) What is the probability that the true parameters for unemployment rate and

interest rate (jointly) lie in the rectangle you drew in (d)?

 

Question 3 (7 marks)

Consider a full rank linear model y = X8 + e. Derive a formula for a 100(1 - α)% prediction interval for the sum of the responses of two independent future observations y1  and y2 , with predictors x1  and x2  respectively.


Question 4 (12 marks)

For this question we use the data set bike.csv (available on the LMS). This data set records counts of public bikes rented in an hour with the corresponding weather information.   The variables are:

count = the number of bikes rented in an hour

temp = temperature (in Celsius)

hum = relative humidity

wind = windspeed (in m/s)

visi = visibility (in metres)

dew = dew point temperature (in Celsius)

solar = solar radiation (in MJ/m2 )

(a) Fit a linear model using all of the variables.

(b)  Test for model relevance, using a corrected sum of squares.

(c) Use forward selection with F tests to select variables for your model.

(d)  Starting from a null model, use stepwise selection with AIC to select variables for your model. Use this as your final model; comment briefly on the variables included.

(e) Using the full model, test whether the temperature and dew point temperature have the

same effect on the number of bikes rented.

(f)  Comment on the suitability of your final model, using diagnostic plots.


Question 5 (5 marks)

Suppose that we have a response variable y which is known to have a quadratic relationship with a predictor variable x.  Explain all of the differences between fitting a linear model of y against x and x2 , versus a linear model of ,y against x. Which would you use for each of the two datasets shown below?

 

 

  

           

                              

     

●●

   ●●

 

 

12

x

 

0       5      10     15     20     25     30     35

 

   

      ●●● 

  

  

   

 

12

x