# What is Var[b] in multiple regression?

What is $Var\left[b\right]$ in multiple regression?
Assume a linear regression model $y=X\beta +ϵ$ with $ϵ\sim N\left(0,{\sigma }^{2}I\right)$ and $\stackrel{^}{y}=Xb$ where $b=\left({X}^{\prime }X{\right)}^{-1}{X}^{\prime }y$. Besides $H=X\left({X}^{\prime }X{\right)}^{-1}{X}^{\prime }$ is the linear projection from the response space to the span of $X$, i.e., $\stackrel{^}{y}=Hy$
Now I want to calculate $Var\left[b\right]$ but what I get is an $k×k$ matrix, not an $n×n$ one. Here's my calculation:

What am I doing wrong?
Besides, are $E\left[b\right]=\beta$, $E\left[\stackrel{^}{y}\right]=HX\beta$, $Var\left[\stackrel{^}{y}\right]={\sigma }^{2}H$, $E\left[y-\stackrel{^}{y}\right]=\left(I-H\right)X\beta$, $Var\left[y-\stackrel{^}{y}\right]=\left(I-H\right){\sigma }^{2}$ correct (this is just on a side note, my main question is the one above)?
You can still ask an expert for help

• Live experts 24/7
• Questions are typically answered in as fast as 30 minutes
• Personalized clear answers

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

The covariance matrix for $b$ (the estimator for $\beta$) should be $k×k$. If the $X$ matrix is $n×k$ then $\beta$ has to be $k×1$; otherwise the product $X\beta$ wouldn't be $n×1$
So if $\beta$ is a constant vector of $k$ parameters, then its estimator $b$ is a random vector with $k$ elements. Therefore the covariance matrix for $b$ consists of covariances for all possible combinations of two members selected from the random vector, hence it must be a $k×k$ matrix.
To answer your side notes, all your calculations are correct but some can be simplified further. Check that $HX=X$, so that $E\left[\stackrel{^}{y}\right]=X\beta$, and $E\left[y-\stackrel{^}{y}\right]=0$