Generating normal random variables with mean and variance

47 Views Asked by At

I wish to generate normals $X$, $Y$, and $Z$ with the correlation matrix $R$ but with means $0$, $1$, and $2$, as well as variances $4$, $16$, and $25$, respectively. How would you do this?

1

There are 1 best solutions below

0
On BEST ANSWER

The methodology for such a process is as follows:

1) Generate i.i.d standard normals (X,Y,Z). You can think of this as a vector $z$ 2) Do a Cholesky Decomposition on your specified correlation matrix $R$. 3) Multiple your vector $z$ by your newly decomposed vector. This will generate 3 correlated standard normals. 4) These correlated standard normals can then be scaled without an effect on the correlation.

$U = \sigma_1X + \mu_1$, $V= \sigma_2Y + \mu_2$, $W = \sigma_3Z + \mu_3$

The values of $\sigma$ and $\mu$ are those specified in your question.