I'm trying to determine $Cov(\hat{\beta}_0,\hat{\beta}_1|W^*)$ for $$ Z=\beta_0+\beta_1W+\xi $$ where $\xi|W \sim N(0, \sigma^2)$ where $\hat{\beta}_0=\bar{W}-\hat{\beta}_1\bar{Z}$ and $\hat{\beta_1}=\frac{\sum_{i=1}^n(W_i-\bar{W})(Z_i-\bar{Z})}{\sum_{i=1}^n(W_i-\bar{W})^2}$. I know this can be done in matrix form using $Var(\hat{\beta})=\sigma^2(W^TW)^{-1}$; however, I was hoping to do it just for covariance, but I end up getting stuck very early on. $$ \begin{align*} Cov(\hat{\beta}_0,\hat{\beta}_1|W^*) &=\mathbb{E}\left[\hat{\beta}_0\hat{\beta}_1|W^*\right]-\beta_0\beta_1 \\ &=\mathbb{E}\left[(\bar{W}-\hat{\beta}_1\bar{Z}) \left(\frac{\sum_{i=1}^n(W_i-\bar{W})(Z_i-\bar{Z})}{\sum_{i=1}^n(W_i-\bar{W})^2}\right)\Bigg|W^*\right]-\beta_0\beta_1 \\ &=\mathbb{E}\left[\bar{W}\left(\frac{\sum_{i=1}^n(W_i-\bar{W})(Z_i-\bar{Z})}{\sum_{i=1}^n(W_i-\bar{W})^2}\right)-\hat{\beta}_1\bar{Z}\left(\frac{\sum_{i=1}^n(W_i-\bar{W})(Z_i-\bar{Z})}{\sum_{i=1}^n(W_i-\bar{W})^2}\right)\Bigg|W^*\right]-\beta_0\beta_1 \\ &=\left(\mathbb{E}\left[\bar{W}\left(\frac{\sum_{i=1}^n(W_i-\bar{W})(Z_i-\bar{Z})}{\sum_{i=1}^n(W_i-\bar{W})^2}\right)\Bigg|W^*\right]-\mathbb{E}\left[\hat{\beta}_1\bar{Z}\left(\frac{\sum_{i=1}^n(W_i-\bar{W})(Z_i-\bar{Z})}{\sum_{i=1}^n(W_i-\bar{W})^2}\right)\Bigg|W^*\right]\right)-\beta_0\beta_1 \end{align*} $$ Is there a trick I am missing early on here?
1 Answer
It's simpler to go from matrix notation. Let $X=[1\ \ W]_{n\times 2}$, we know that $V=\operatorname{var}(\hat{\beta})=\sigma^2(X^TX)^{-1}$. This is a 2x2 matrix and we just need the covariance entry of it, i.e. $V_{12}=V_{21}$. $$V=\sigma^2\left(\begin{bmatrix}1^T\\ W^T\end{bmatrix}\begin{bmatrix}1 & W\end{bmatrix}\right)^{-1}=\sigma^2\left(\begin{bmatrix}n&n\bar{W}\\n\bar{W}& W^TW\end{bmatrix}\right)^{-1}=\frac{\sigma^2}{nW^TW-n^2\bar{W}^2}\begin{bmatrix}W^TW&-n\bar{W}\\-n\bar{W}&n\end{bmatrix}$$ which means $$\operatorname{cov}(\hat \beta_0, \hat \beta_1)=\sigma^2\frac{-\bar{W}}{W^TW-n\bar{W}^2}=\frac{-\sigma^2\bar W}{\sum(W_i-\bar W)^2}$$