Solved – Statistically significant difference in linear regression model predictions of the mean values

confidence intervalhypothesis testinglinear modelpredictionstatistical significance

In my academic report I have a task to check whether or not mean values (for given two predictor values) predicted by the simple linear regression model are "statictically significantly different".

I want to make a predictions for these two values and check whether or not the confidence intervals for them have a common part. If not, I assume they are (the predicted means) statistically different.

Am I right? Are there other statistical tools I may apply here?

Best Answer

In my academic report I have a task to check whether or not mean values (for given two predictor values) predicted by the simple linear regression model are "statictically significantly different".

Is this a simple regression (one predictor)? If so, there's nothing to do -- if the slope is significantly different from zero, so are two distinct means. The t-statistic for the difference is just the t-statistic for the slope (apart, perhaps, from a sign change). Looking as absolute values:

$$\left|\frac{\hat{y}_1-\hat{y}_2}{\sqrt{\text{Var}(\hat{y}_1-\hat{y}_2)}}\right|=\left|\frac{(x_1-x_2)\hat{\beta}}{\sqrt{\text{Var}[(x_1-x_2)\hat{\beta}}]}\right|$$

$$=\left|\frac{(x_1-x_2)\hat{\beta}}{(x_1-x_2)\sqrt{\text{Var}(\hat{\beta})}}\right|$$

$$=\left|\frac{\hat{\beta}}{\sqrt{\text{Var}(\hat{\beta})}}\right|$$

If you have a multiple regression it's somewhat more complicated, but a similar calculation could be used to build a test for a change in mean.

I want to make a predictions for these two values and check whether or not the confidence intervals for them have a common part.

That's a different thing. For example, it ignores the correlation between the predictions.

If not, I assume they are (the predicted means) statistically different.
Am I right? Are there other statistical tools I may apply here?

Are you really interested in statistical significance or whether there's a practical difference?