## Covariance matrix

The covariance matrix $\Sigma$ of $n$ random variables $X_1,\cdots, X_n$ is an $n\times n$ matrix that $\Sigma_{i, j}=Cov(X_j, X_j)$. The correlation matrix is the covariance matrix of standardized random variables $X_1/\sigma(X_1), \cdots, X_n /\sigma(X_n)$.

For any random variable $Y=\sum_{i=1}^{n} a_i X_i$, we have $Var(Y)=a^T \Sigma a$, where $a=(a_1, \cdots, a_n)^T$.

So the covariance matrix is positive-semidefinite, since the variance is non-negative.

Given correlation matrix, we can generate the random variables $X_1, \cdots, X_n$ using Cholesky decomposition $\Sigma=LL^*$. Generate a vector of uncorrelated samples $u$, then we have $X=Lu$.

Another way is to use eigenvalue method. $\Sigma=A\Lambda A^*$.

Advertisements

## About cgao

Cambridge, MA
This entry was posted in Study Notes and tagged , . Bookmark the permalink.