Finding the distribution of a statistic involving the slope of a linear regression model

30 Views Asked by At

I have been working on linear regression models of the form $Y = Xb + \epsilon$ where $\epsilon_i \sim N(0,\sigma^2)$ (iid). In particular, I am trying to find a distribution for the following statistic. $\dfrac{b_i - \hat{b_i}}{\hat{\sigma}\sqrt{(X^TX)^{-1}_{ii}}}$. I have already found out that $\dfrac{b_i - \hat{b_i}}{\sigma\sqrt{(X^TX)^{-1}_{ii}}} \sim N(0,1)$, but how can you obtain the number of degrees of freedom when plugging in the estimator for $\sigma$?