Covariance

X,YX,Y 之间的 Covariance 定义为

Cov(X,Y)=σXY=E[(XμX)(YμY)]Cov(X,Y)=\sigma_{XY}=\mathbb{E}[(X-\mu_X)(Y-\mu_Y)]

Correlation

X,YX,Y 之间的 Correlation 定义为

Corr(X,Y)=ρXY=σXYσXσYCorr(X,Y)=\rho_{XY}=\frac{\sigma_{XY}}{\sigma_X\sigma_Y}

Independence and Covariance/Correlation

If X,YX,Y are independent, then Cov(X,Y)=Corr(X,Y)=0Cov(X,Y)=Corr(X,Y)=0.

But the converse is not true. Consider the following setup:

  • P(X=1)=1/4\mathbb{P}(X=-1)=1/4
  • P(X=0)=1/2\mathbb{P}(X=0)=1/2
  • P(X=1)=1/4\mathbb{P}(X=1)=1/4
  • Y=X2Y=X^2

Cov(X,Y)=0Cov(X,Y)=0, but the are not independent.