Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2014/ib/paper-4/19h/solution

For the normal linear model, differentiating the ordinary least squares objective gives . Full column rank makes invertible, so
The distribution follows because is a linear transformation of a multivariate normal distribution. Its expectation is , and direct multiplication gives the displayed covariance matrix.
Let , the orthogonal projection onto the design's column space. The residual sum of squares is . Since , symmetry and idempotence give . Thus
is an unbiased estimator.
For the two independent regressions choose . The first rows of the design matrix are and the last rows are . The centering conditions and distinct predictors give
It follows that
The two estimated slopes are independent normal random variables, as they depend on independent error blocks. Therefore
For these data use the pooled residual sum of squares
Its scaled value is and is independent of the slope estimates by the permitted normal-model result. Hence the standardized difference has a Student t-distribution with degrees of freedom, giving the exact 95 percent confidence interval
Here is the 0.975 quantile of that distribution. This is a confidence interval for the difference of independent regression slopes. As required by the original framework, this specialization needs . Distinct predictors alone allow , but then the fit is saturated, and there are no residual degrees of freedom to estimate the unknown variance or form this interval.

New to topics? Read the docs here!