(i) Assume that the n-dimensional observation vector Y may be written as
Y=Xβ+ϵ
where X is a given n×p matrix of rankp,β is an unknown vector, and
ϵ∼Nn(0,σ2I)
Let Q(β)=(Y−Xβ)T(Y−Xβ). Find β, the least-squares estimator of β, and show that
Q(β)=YT(I−H)Y
where H is a matrix that you should define.
(ii) Show that ∑iHii=p. Show further for the special case of
Yi=β1+β2xi+β3zi+ϵi,1⩽i⩽n
where Σxi=0,Σzi=0, that
H=n111T+axxT+b(xzT+zxT)+czzT;
here, 1 is a vector of which every element is one, and a,b,c, are constants that you should derive.
Hence show that, if Y=Xβ is the vector of fitted values, then
σ21var(Yi)=n1+axi2+2bxizi+czi2,1⩽i⩽n.