(i) Suppose that X is a multivariate normal vector with mean μ∈Rd and covariance matrix σ2I, where μ and σ2 are both unknown, and I denotes the d×d identity matrix. Suppose that Θ0⊂Θ1 are linear subspaces of Rd of dimensions d0 and d1, where d0<d1<d. Let Pi denote orthogonal projection onto Θi(i=0,1). Carefully derive the joint distribution of (∣X−P1X∣2,∣P1X−P0X∣2) under the hypothesis H0:μ∈Θ0. How could you use this to make a test of H0 against H1:μ∈Θ1 ?
(ii) Suppose that I students take J exams, and that the mark Xij of student i in exam j is modelled as
Xij=m+αi+βj+εij
where ∑iαi=0=∑jβj, the εij are independent N(0,σ2), and the parameters m,α,β and σ are unknown. Construct a test of H0:βj=0 for all j against H1:∑jβj=0.