Covariance of a random variable and its mean

114 Views Asked by At

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?

2

There are 2 best solutions below

0
On

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

8
On

$cov(X,\bar{X})=E(X\bar{X})-E(X)E(\bar{X})$ However $\bar{X}$ is a constant, so $E(X\bar{X})=\bar{X}E(X)=\bar{X}^2$, leading to the final result $cov(X,\bar{X})=0$.

This shouldn't be too surprising, since $cov(X,C)=0$ for any constant $C$.