In the least square linear regression model, if the explanatory variables and the error term are independent, and the error term is normal, why does the t-statistic of $\hat{\beta}$ follow a t distribution? I understand that if x is nonrandom, then the t-statistic of $\hat{\beta}$ follow a t distribution.
In other words, $\hat{\beta}$ is Gaussian conditional on X. The unconditional distribution of $\hat{\beta}$ is non-Gaussian.
How can the test statistic still follow a t distribution?