# Transformation between random variables [closed]

If given realization of X and Y, which are i.i.d. Gaussian random variables.

We need to generate random variables C and D which are jointly Gaussian with zero mean and covariance matrix like $\begin{bmatrix} 2 & -1 \\ -1 & 2 \end{bmatrix}$

using X and Y. How to provide a transformation that can be used to obtain C and D from X and Y?

## closed as off-topic by Did, Claude Leibovici, Davide Giraudo, астон вілла олоф мэллбэрг, NamasteJan 6 '17 at 14:20

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Did, Claude Leibovici, Davide Giraudo, астон вілла олоф мэллбэрг, Namaste
If this question can be reworded to fit the rules in the help center, please edit the question.

from the covariance matrix $\sigma^2_C=2, \sigma^2_D=2, \sigma_{CD}=\sigma_{DC}=-1$. Hence, $\rho_{CD}=\frac{-1}{2}$. The desired transform is \begin{align} C&=\sigma_CX\\ D&=\sigma_D(\rho_{CD}X+\sqrt{1-\rho^2_{CD}}Y) \end{align}
It is assumed that $X$ and $Y$ are zero-mean. Otherwise, the same transformation should be used with $\tilde{X}=X-\mu_X$ and $\tilde{Y}=Y-\mu_Y$.
If $x$ is a vector of i.i.d. Gaussian random variables, and $u=Ax+b$, then $u$ is Gaussian with mean $b$ and covariance matrix $AA^T$.
One way to decompose a given covariance matrix into such a product is the Cholesky decomposition, which msm used for his parametrization $$\begin{bmatrix} 2 & -1 \\ -1 & 2 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ -\frac12 & 1 \end{bmatrix} \begin{bmatrix} 2 & 0 \\ 0 & \frac32 \end{bmatrix} \begin{bmatrix} 1 & -\frac12 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} \sqrt{2} & 0 \\ -\frac{\sqrt{2}}2 & \frac{\sqrt{6}}2 \end{bmatrix} \begin{bmatrix} \sqrt{2} & -\frac{\sqrt{2}}2 \\ 0 & \frac{\sqrt{6}}2 \end{bmatrix}$$