# How to calculate standard error of the difference between two random variables which are dependent?

I know that standard error between two independent variable can be calculated as below. SE(1,2) = SQR(SE1^2 + SE2^2) where SE1 is standard error for variable 1, SE2 is standard error for variable 2.

It is because covariance between two independent variable is zero. So, formula above does not include covariance.

But how to calculate if these variables are dependent to one another.

Should it be like SE(1,2) = SQR(SE1^2 + SE2^2 - COV(1,2))

Take a look below regression output. How I can calculate standard error difference for S1 and S2, if I know that they are dependent to each other.

## 1 Answer

SE(1,2) = SQR(SE1^2 + SE2^2 - 2*COV(1,2)). Need to minus 2 times of the covariance, instead of one covariance.

The outputs from most software do not included Cov(1,2) and you need to check the manual to get the covariance.

• thanks to clarification. As far as I understand there is no way to compute covariance with only data of coefficients and standard errors. – esqeudero Nov 25 '18 at 17:00
• You are right that covariance cannot derived from the output you displayed. But the statistical software has the covariance and does not give to you because we do not need it generally. So you can check your software manual to find a way (options, commands...) to force the software give you the covariance. – user158565 Nov 25 '18 at 17:14