Monday, May 10, 2010

Singular Value Decomposition (SVD), Covariance and Correlation Coefficients

SVD

The MATLAB code for SVD is define as:

[u,s,v]=svd(x)

if x is m by n then
u is mxm
s is mxn
v is nxn

x = u*s*v'
u*u' = I 
v*v' = I

Therefore, u and v are orthogonal matrix
ref: svd

Covariance
Matlab function:  cov()
Example: The distribution of a random vector X of bivariate normal distribution is
\[X \sim N(\mu ,\Sigma )\]
where $\rho$ is the correlation between x and y, and the mean and covariance matrix are
\[\mu= \left( {\begin{array}{*{20}{c}}{{\mu _x}}\\{{\mu _y}}\\\end{array}} \right),\;\;\;\;\;\;\Sigma=\left( {\begin{array}{*{20}{c}}{\sigma _x^2} & {\rho {\sigma _x}{\sigma_y}}\\{\rho {\sigma _x}{\sigma _y}} & {\sigma _y^2}\\\end{array}} \right)\]
ref: Covariance Matrix


Correlation Coefficients are derived from covariances

\[r_{xy}=\frac{Cov(x,y)}{{\sigma_x}{\sigma_y}}\]


Matlab function: corrcoef()


ref: Correlation Coefficients
(This post is unfinished, I'll come back later)

No comments:

Post a Comment