I want to find the value of $cov(X, \bar{X})$.
If I input this in the formula, I will get:
$\sum (X - \bar{X})(\bar{X} - \bar{X})/N = 0 \:\:\:\:\:\:(\because \bar{\bar{X}} = \bar{X})$
Edit: Here $X$ is a set of random variables. I.e. The values $X_i$ themselves can vary randomly based on some underlying distribution. I am not trying to calculate this for one fixed set of X values.
But this is obviously incorrect. So what am I missing?
Cov(x,y) = E(xy)−E(x)E(y)= E(x−E(x))(y−E(y)))
Cov(x,x̅) = E[(X–µX)(x̅–µx̅] = E[xx̅]-E(x)E(x̅)
Use x−E(x)=ϵ and x̅= Hx, so x̅−E(x̅)=Hx−E(Hx)=H(x−E(x))=Hϵ. Then Cov(x,x̅) = E[(x−E(x))(x̅−E(x̅))^T] = E(ϵϵTH) = (σ^2)H The i,i diagonal element of the LHS is Cov(x_i,x̅_i), while the i,i diagonal element of the RHS is (σ^2)h_i,i