# Constructing correlated random variables

How do I construct two correlated random variables with correlation $\rho$ given two i.i.d normal r.v.? Do I just multiply the correlation matrix by a vector generated with two i.i.d normal variables?

-
No, you do not use the correlation matrix but the cholesky-factor. This generalizes then immediately to arbitrarily many variables. –  Gottfried Helms May 30 '12 at 7:56
Sorry but I fail to see the reason which prevents you from accepting this answer. –  Did Jul 28 '12 at 12:12

If $X$ and $Y$ are independent random variables with the same variance, then

$$Z = \rho X + \sqrt{1-\rho^2} Y$$

is a random variable such that ${\rm Corr}(X,Z)=\rho$.

Additionally, if $X$ and $Y$ are standard normal, then $Z$ is also standard normal.

-