MATH235

MATH235 Week 4 - Assessed problems (coursework)

Submission is due on Tuesday in Week 5.

CW4.1 

In this question, we use the data in Table 1 of Question Sheet 1 to investigate whether or not the annual price of tea can be used to predict the annual price of sugar.

  1. (a)

    Write down an appropriate linear model to relate the annual price of tea to the annual price of sugar. You should include an intercept term, and define all your variables.

    [marks: 2]

  2. (b)
    • (i)

      Fit the model described in part (a) and report the least squares estimates of your regression coefficients.

      [marks: 1]

    • (ii)

      By obtaining a vector of estimated residuals, give an estimate of the residual variance σ2.

      [marks: 2]

CW4.2 

The full FEV data set first discussed in Question Sheet 2 is available in the file fev. The data frame in this file has 654 records and six variables, including age (years), FEV (litres), height (inches), gender (1 for male, 0 for female), smoker (0 for no, 1 for yes) and log FEV.

Consider the following linear regression model,

𝔼[logYi]=β1+β2xi,1+β3xi,2

where Yi is FEV, xi,1 is a height and xi,2 is age.

  1. (a)

    Use the function lm to fit this model to the full FEV data set. What are your least squares estimates β^?

    [marks: 2]

    For this model and data set,

    (XX)-1=[0.28553-0.005800.00713-0.005800.00013-0.000190.00713-0.000190.00047]

    and the estimated residual variance is σ^2=0.0215.

  2. (b)

    Using these results, is there evidence of a linear relationship between log FEV and height? State clearly your hypotheses and conclusions.

    [marks: 3]

CW4.3 

Challenge
Generalised least squares is a technique which can be used to estimate the regression coefficients when the residuals in a linear regression model have unequal variances and/or are correlated with each other. In this case a matrix of weights W is defined where

Wij={Var(ϵi)i=j;Cov(ϵi,ϵj)ij.

The generalised least squares estimator for β is β^=(XW-1X)-1XW-1Y.

  1. (a)

    Show that

    • (i)

      The generalised least squares estimator β^ is unbiased.

      [marks: 1]

    • (ii)

      The variance of β^ is

      (XW-1X)-1.

    [marks: 2]

  2. (b)

    Show that in the case of uncorrelated residuals with equal variances the generalised least squares estimator reduces to β^=(XX)-1XY.

    [marks: 2]