I am trying to figure out the variance of the difference between two coefficients in a linear regression model. If I am given the design matrix (X^T X) and the value of sigma, how do I go about solving: var(beta.1.hat - beta.2.hat)? My thought process is finding the variance for each part using the formula var(beta.j.hat) = sigma^2((X^T X)^-1 subscript jj. Then var(beta.1.hat - beta.2.hat) should be equal to: var(beta.1.hat) + var(beta.2.hat) - 2 Cov(beta.1.hat,beta.2.hat)
Is my logic correct? Please give me some suggestions or assistance thanks!