Simplify variance expression, taking into account covariances:$\operatorname{var}(Y_i-\bar Y-\hat {\beta}_1(x_i-\bar x))$

135 Views Asked by At

Find $\operatorname{var}(Y_i-\bar Y-\hat {\beta}_1(x_i-\bar x))$ where $\hat {\beta}_1=S_{xy}/S_{xx}$ is the least square estimator and $Y_i$ a random variable.

I know that I can't simply split the variances because I need to account for covariance. In fact:

$$\operatorname{cov} (Y_i,\bar Y)= \frac 1 n \sigma^2$$

$$\operatorname{cov} (Y_i,\hat {\beta}_1 (x_i-\bar x))= \frac{(x_i-\bar x)^2}{S_{xx}} \sigma^2$$

$$\operatorname{cov} (\hat {\beta}_1(x_i-\bar x),\hat {\beta}_1(x_i-\bar x))= \frac{(x_i-\bar x)^2}{S_{xx}} \sigma^2$$

Edit: I know I can rewrite this as $\operatorname{cov} ((Y_i-\bar Y-\hat {\beta}_1 (x_i-\bar x),(Y_i-\bar Y-\hat {\beta}_1 (x_i-\bar x))$ and work from there, but is this the only way?