Several sets of (x, y) points, with the correlation coefficient of x and y for each set. Note that the correlation reflects the noisiness and direction of a linear relationship (top row), but not the slope of that relationship (middle), nor many aspects of nonlinear relationships (bottom). N.B.: the figure in the center has a slope of 0 but in that case the correlation coefficient is undefined because the variance of Y is zero.
![\rho_{X,Y}=\mathrm{corr}(X,Y)={\mathrm{cov}(X,Y) \over \sigma_X \sigma_Y} ={E[(X-\mu_X)(Y-\mu_Y)] \over \sigma_X\sigma_Y},](http://upload.wikimedia.org/math/0/7/6/076d3820a46afe55ee680f3c85e34c76.png)
wiki上的一張圖,很好的解釋了相關與獨立。。在相關系數為0的情況下,X Y分布很顯然不獨立。。
相關性系數是用來表征X Y之間線性關系緊密程度的量。當相關性系數為0 的時候,我們認為X Y不相關。
X Y獨立 則X Y不相關,X Y不相關,則X Y不一定獨立!
當時當X Y都滿足高斯分布的時候,相關與獨立可以互推。
上一次上課。。老師當堂提問二維高斯分布。。都忘了。。
![f(x,y) =
\frac{1}{2 \pi \sigma_x \sigma_y \sqrt{1-\rho^2}}
\exp\left(
-\frac{1}{2(1-\rho^2)}\left[
\frac{(x-\mu_x)^2}{\sigma_x^2} +
\frac{(y-\mu_y)^2}{\sigma_y^2} -
\frac{2\rho(x-\mu_x)(y-\mu_y)}{\sigma_x \sigma_y}
\right]
\right),](http://upload.wikimedia.org/math/b/1/0/b10ecc56f758b2f94a953e7e1bd2f1c2.png)
第一次發現wiki上的數學公式竟然有Latex源碼。。Niubility!