Skip to main content
2 of 4
deleted 3 characters in body
bm1125
  • 187
  • 5

Confidence Interval for Expectation using covariance matrix

Say I have a regression model as follows:

$\ \hat{y}_i = \hat\beta_0 + \hat\beta_1x_1 + \hat\beta_2x_2, n = 79$

and I have the following covariance matrix

$\ \begin{bmatrix} intercept & 6.5949972 & -0.194885084 & -0.350537852 \\ x_1 & -0.1948851 & 0.006067346 & 0.006432345 \\ x_2 & -0.3505379 & 0.006432345 & 0.078783756 \end{bmatrix} $

and I want to compute confidence interval for a following vector of values $\ (1, x_1, x_2) = (1, 32, 3) $

so to compute the variance of the expectation estimator I tried

$\ var(\hat{Y_i}) = var(\hat\beta_0 + \hat\beta_1 x_1 + \hat\beta_2 x_2 ) = var(\hat\beta_0) + 32^2 var(\hat\beta_1) + 3^2 var(\hat\beta_2) + 2 cov(\hat\beta_0,\hat\beta_1) + 2cov(\hat\beta_0,\hat\beta_1) + 2cov(\hat\beta_1,\hat\beta_2)$

and then taking square root and multiplying by t critic but my answer is far off. I get $\ s_{\hat y} = \sqrt{12.20473} $ and it is far off.

bm1125
  • 187
  • 5