The least squares estimator is a random variable, since it is a function of the random variable .
To obtain a sampling distribution for we write
where and so is a linear combination of normal random variables .
From this it follows that the sampling distribution is
We can use this distribution to calculate confidence intervals or conduct hypothesis tests for the regression coefficients.
The most frequent hypothesis test is to see whether or not a covariate has a ‘significant effect’ on the response variable. We can test this by testing
vs.
A one-sided alternative can be used if there is some prior belief about whether the relationship should be positive or negative.
In a similar way, a sampling distribution can be derived for linear combinations of the regression coefficients :