Solved – Create uncorrelated random multivariate normals

correlationrrandom-generation

Creating correlated random variables is an easy task in R, especially the normal distribution. But what I need is to generate variables (for example 5 standard normals) with very low correlations (e.g., below 0.05). I tried mvtnorm package several times with no success.

I'm just curious, we use methods (like Cholesky decomposition) to transform uncorrelated variables into correlated. Can we do it the other way around?

Edit: I want a method that makes multiple "correlated" normal variables "extremely low correlated" without trial & error with a reasonable sample size (say 50) implemented in R.

Best Answer

Suppose $X$ is multivariate normal.

Then by definition we can write $X = \mu + CZ$ for a (deterministic) vector $\mu$, matrix $C$ and random vector $Z$ of independent standard normal (i.e. $N(0,1)$) variables.

(So $\Sigma = CC^T$ is the covariance matrix).

Thus if $C$ is invertible then $$ C^{-1}(X-\mu) = Z $$ is a vector of independent (and hence uncorrelated) standard normals.

Note, if you are given pos. def. $\Sigma$ upfront, then to calculate $C = (\Sigma^{1/2})^{-1}$ you would probably want to first calculate the square root (e.g. using Cholesky) and then invert that.

Related Question