Question

1. Consider multiple linear regression with model

Y=B₁ + B₁x₁ + ··· +Ppxp + e,

~ N(0,0²).

e~

Suppose that there are n observations, {(yi, Xio, Xil,

XE Rnx(p+¹) be the design matrix. The hat matrix is given by

H =X(XTX)-!XT.

(a) Show that if 1 = = (1,1,...,1)¹ € R” is a column vector of all ones, then H1 = 1.

Also, if x₁ = (x11, X21,...,x) is the second column vector of the design matrix X, then

Hx₁ = X₁.

Hint: Observe that 1 = Xu₁ where ₁

=

(1,0,0,...,0)¹ € R" is a unit vector in R".

Check that the design matrix X satisfies HX = X, and from this deduce that H1 = 1.

You can show that Hx₁ = x₁ in a similar way.

(b) The vector of observed responses y = (y₁, ..., y₁) can be expressed as

y = Xß + e

where ß = (Bo, B₁, ..., ) is the vector of true coefficients and e = (e₁, ..., e̟„)¹ is the

vector of random errors. Show that the vector of fitted values y = (₁, ...,ŷn) can be

expressed as

ŷ = XB + He.

Hint: Recall that y = Hy.

(c) Show that the vector of residuals ê= (₁, ...,ên) can be expressed as

ê= (I-H)e.

Hint: Recall that ê= y - y.

‚ Xip); i € 1 : n}, and let