# Term in transformation to build a general bivariate normal.

When using $$Z_{1}, Z_{2} \sim \mathcal{N}(0,1)$$ to build a general bivariate normal with arbitrary parameters $$\mu_{X}, \mu_{Y}, \sigma_{X}, \sigma_{Y}, \rho$$, where does the term $$\left[\rho Z_{1}+\sqrt{1-\rho^{2}} Z_{2}\right]$$ in the transformation below come form ?

$$\begin{array}{l} X=\sigma_{X} Z_{1}+\mu_{X} \\ Y=\sigma_{Y}\left[\rho Z_{1}+\sqrt{1-\rho^{2}} Z_{2}\right]+\mu_{Y} \end{array}$$

Is this related to the variance-covariance matrix $$\sum$$ ?

Any clues appreciated, just getting started with bivariate normal theory.

• You may find the answer to this question useful: math.stackexchange.com/questions/3719507/…. I hope this helps. Commented Jul 6, 2020 at 22:20
• $\rho$ is the correlation between X,Y.
– JKM
Commented Jul 6, 2020 at 22:44
• yes i just realized haha. Okay I think it's from the variance covariance matrix. Here's some lecture notes if yours arent very good. online.stat.psu.edu/stat505/lesson/4/4.2 Commented Jul 6, 2020 at 22:49
• Found the answer below, thanks for the comments! Whta's great is that the Cholesky transform holds for building multivariate normals of any size
– JKM
Commented Jul 6, 2020 at 23:25

Let $$Z_{1}, Z_{2} \sim \mathcal{N}(0,1)$$ then \begin{aligned}\left(\begin{array}{c}X \\ Y\end{array}\right) &=\boldsymbol{\mu}+\operatorname{Chol}(\boldsymbol{\Sigma}) \mathbf{Z} \\ &=\left(\begin{array}{c}\mu_{X} \\ \mu_{Y}\end{array}\right)+\left(\begin{array}{cc}\sigma_{X} & 0 \\ \rho \sigma_{Y} & \sigma_{Y}\left(1-\rho^{2}\right)^{1 / 2}\end{array}\right)\left(\begin{array}{c}Z_{1} \\ Z_{2}\end{array}\right) \\ &=\left(\begin{array}{c}\mu_{X} \\ \mu_{Y}\end{array}\right)+\left(\begin{array}{c}\sigma_{X} Z_{1} \\ \rho \sigma_{Y} Z_{1}+\sigma_{Y}\left(1-\rho^{2}\right)^{1 / 2} Z_{2}\end{array}\right) \\ X &=\mu_{X}+\sigma_{X} Z_{1} \\ Y &=\mu_{Y}+\sigma_{Y}\left[\rho Z_{1}+\left(1-\rho^{2}\right)^{1 / 2} Z_{2}\right] \end{aligned}

where $$\operatorname{Chol}(\mathbf{\mathbf{\sum}})$$ is the Cholesky decomposition.

We define the Cholesky Decomposition for a symmetric, positive definite matrix $$\mathbf{X}$$ as $$\mathbf{L}=\operatorname{Chol}(\mathbf{X})$$ where $$L$$ is a lower triangular matrix such that $$L L^{T}=X$$

To find the lower triangular matrix $$L$$, we solve for $$a,b,c$$ in the following system:

$$\left(\begin{array}{cc}a & 0 \\ b & c\end{array}\right)\left(\begin{array}{cc}a & b \\ 0 & c\end{array}\right)=\left(\begin{array}{cc}a^{2} & a b \\ a b & b^{2}+c^{2}\end{array}\right)=\left(\begin{array}{cc}\sigma_{X}^{2} & \rho \sigma_{X} \sigma_{Y} \\ \rho \sigma_{X} \sigma_{Y} & \sigma_{Y}^{2}\end{array}\right)$$

The right-hand matrix is the variance-covariance matrix.

See these lecture slides:

https://www2.stat.duke.edu/courses/Spring12/sta104.1/Lectures/Lec22.pdf