# How to include off-diagonal elements in covariance matrix in uncertainty of variable

I am performing a linear regression (y = a + bx) and calculate the correlation matrix:

$$\begin{bmatrix} 1 & -0.84 \\ -0.84 & 1 \\ \end{bmatrix}$$

and covariance matrix:

$$\begin{bmatrix} 0.003 & -0.0054 \\ -0.0054 & 0.01 \\ \end{bmatrix}$$

The diagonal elements of the covariance matrix are the variances of my variables and I get the standard deviation or uncertainty by applying the square root:

$$a = 0.99 \pm \sqrt{0.003} = 0.99 \pm 0.0547$$

$$b = 1.94 \pm 0.1$$

However, the variables are highly anti-correlated and the off-diagonal elements are not 0, which means I have to include them in the uncertainty of a and b. I have tried to search the internet and didn't find an answer. In principle, a and b have also different units, so I really don't know how to include these numbers in the uncertainties.

• By "uncertainty of $a$ and $b$, do you mean the standard estimation error? In that case, here you have some formulas (denoting standard errors for $a$ and $b$ as $SE(\hat{\beta_0})$ and $SE(\hat{\beta_1})$ stats.stackexchange.com/questions/289457/… – David May 29 at 11:47
• Or see this page for this single-predictor case and the the links from it for the more general multiple regression case. – EdM May 29 at 12:22

## 1 Answer

which means I have to include them in the uncertainty of a and b

No. The variance of the estimates of the intercept and slope don't involve their covariances at all.

You would use the covariances when dealing with some linear combination of the parameter estimates.