info prev up next book cdrom email home

Gaussian Bivariate Distribution

The Gaussian bivariate distribution is given by

\begin{displaymath}
P(x_1,x_2) = {1\over 2\pi\sigma_1\sigma_2\sqrt{1-\rho^2}}\, \mathop{\rm exp}\nolimits \left[{-{z\over 2(1-\rho^2)}}\right],
\end{displaymath} (1)

where
\begin{displaymath}
z\equiv {(x_1-\mu_1)^2\over{\sigma_1}^2} - {2\rho(x_1-\mu_1)...
...\mu_2)\over\sigma_1\sigma_2}+{(x_2-\mu_2)^2\over{\sigma_2}^2},
\end{displaymath} (2)

and
\begin{displaymath}
\rho \equiv \mathop{\rm cov}\nolimits (x_1,x_2) = {\left\lan...
...rangle{}\left\langle{x_2}\right\rangle{}\over\sigma_1\sigma_2}
\end{displaymath} (3)

is the Covariance. Let $X_1$ and $X_2$ be normally and independently distributed variates with Mean 0 and Variance 1. Then define
$\displaystyle Y_1$ $\textstyle \equiv$ $\displaystyle \mu_1+\sigma_{11}X_1+\sigma_{12}X_2$ (4)
$\displaystyle Y_2$ $\textstyle \equiv$ $\displaystyle \mu_2+\sigma_{21}X_1+\sigma_{22}X_2.$ (5)

These new variates are normally distributed with Mean $\mu_1$ and $\mu_2$, Variance
$\displaystyle {\sigma_1}^2$ $\textstyle \equiv$ $\displaystyle {\sigma_{11}}^2+{\sigma_{12}}^2$ (6)
$\displaystyle {\sigma_2}^2$ $\textstyle \equiv$ $\displaystyle {\sigma_{21}}^2+{\sigma_{22}}^2,$ (7)

and Covariance
\begin{displaymath}
V_{12}\equiv \sigma_{11}\sigma_{21}+\sigma_{12}\sigma_{22}.
\end{displaymath} (8)

The Covariance matrix is
\begin{displaymath}
V_{ij} = \left[{\matrix{{\sigma_1}^2 & \rho\sigma_1\sigma_2\cr \rho\sigma_1\sigma_2 & {\sigma_2}^2\cr}}\right],
\end{displaymath} (9)

where
\begin{displaymath}
\rho\equiv {{V_{12}}\over {\sigma_1}{\sigma_2}}
={\sigma_{11}\sigma_{21}+\sigma_{12}\sigma_{22}\over {\sigma_1}{\sigma_2}}.
\end{displaymath} (10)

The joint probability density function for $x_1$ and $x_2$ is
\begin{displaymath}
f(x_1,x_2)\,dx_1\,dx_2 = {1\over 2\pi} e^{-({x_1}^2+{x_2}^2)/2} \,dx_1\,dx_2.
\end{displaymath} (11)

However, from (4) and (5) we have
\begin{displaymath}
\left[{\matrix{y_1-\mu_1\cr y_2-\mu_2\cr}}\right] = \left[{\...
...\sigma_{22}\cr}}\right] \left[{\matrix{x_1\cr x_2\cr}}\right].
\end{displaymath} (12)

Now, if
\begin{displaymath}
\left\vert\matrix{\sigma_{11} & \sigma_{12}\cr \sigma_{21} & \sigma_{22}\cr}\right\vert \not=0,
\end{displaymath} (13)

then this can be inverted to give
$\displaystyle \left[\begin{array}{c}x_1\\  x_2\end{array}\right]$ $\textstyle =$ $\displaystyle \left[\begin{array}{cc}\sigma_{11} & \sigma_{12}\\  \sigma_{21} &...
...t]^{-1}
\left[\begin{array}{c}y_1-\mu_1\\  y_2-\mu_2\end{array}\right]\nonumber$  
  $\textstyle =$ $\displaystyle {1\over \sigma_{11}\sigma_{22}-\sigma_{12}\sigma_{21}}
\left[\beg...
...right]
\left[\begin{array}{c}y_1-\mu_1\\  y_2-\mu_2\end{array}\right].\nonumber$  
      (14)

Therefore,


\begin{displaymath}
{x_1}^2+{x_2}^2 = {[\sigma_{22}(y_1-\mu_1)-\sigma_{12}(y_2-\...
..._2)]^2\over(\sigma_{11}\sigma_{22}-\sigma_{12}\sigma_{21})^2}.
\end{displaymath} (15)

Expanding the Numerator gives
${\sigma_{22}}^2(y_1-\mu_1)^2-2\sigma_{12}\sigma_{22}(y_1-\mu_1)(y_2-\mu_2)$
$ +{\sigma_{12}}^2(y_2-\mu_2)^2+{\sigma_{21}}^2(y_1-\mu_1)^2$
$ -2\sigma_{11}\sigma_{21}(y_1-\mu_1)(y_2-\mu_2)+{\sigma_{11}}^2(y_2-\mu_2)^2,$

(16)
so

$({x_1}^2+{x_2}^2)(\sigma_{11}\sigma_{22}-\sigma_{12}\sigma_{21})^2$
$= (y_1-\mu_1)^2({\sigma_{21}}^2+{\sigma_{22}}^2) -2(y_1-\mu_1)(y_2-\mu_2)(\sigma_{11}\sigma_{21}+\sigma_{12}\sigma_{22})$
$\quad + (y_2-\mu_2)^2({\sigma_{11}}^2+{\sigma_{12}}^2)$
$= {\sigma_2}^2(y_1-\mu_1)^2-2(y_1-\mu_1)(y_2-\mu_2)(\rho\sigma_1\sigma_2)+{\sigma_1}^2(y_2-\mu_2)^2$
$= {\sigma_1}^2{\sigma_2}^2\left[{{(y_1-\mu_1)^2\over {\sigma_1}^2} -{2\rho(y_1-...
...1)(y_2-\mu_2)\over \sigma_1\sigma_2}+{(y_2-\mu_2)^2\over {\sigma_2}^2}}\right].$ (17)
But


\begin{displaymath}
{1\over 1-\rho^2} = {1\over 1-{{V_{12}}^2\over {\sigma_1}^2{...
...a_{22}}^2)-(\sigma_{11}\sigma_{21}+\sigma_{12}\sigma_{22})^2}.
\end{displaymath} (18)

The Denominator is
${\sigma_{11}}^2{\sigma_{21}}^2+{\sigma_{11}}^2{\sigma_{22}}^2+{\sigma_{12}}^2{\sigma_{21}}^2+{\sigma_{12}}^2{\sigma_{22}}^2-{\sigma_{11}}^2{\sigma_{21}}^2 $
$-2\sigma_{11}\sigma_{12}\sigma_{21}\sigma_{22}-{\sigma_{12}}^2{\sigma_{22}}^2 = (\sigma_{11}\sigma_{22}-\sigma_{12}\sigma_{21})^2,\quad$ (19)
so
\begin{displaymath}
{1\over 1-\rho^2} = {{\sigma_1}^2{\sigma_2}^2\over (\sigma_{11}\sigma_{22}-\sigma_{12}\sigma_{21})^2}
\end{displaymath} (20)

and


\begin{displaymath}
{x_1}^2+{x_2}^2={1\over 1-\rho^2}\left[{{(y_1-\mu_1)^2\over ...
...r \sigma_1\sigma_2}+{(y_2-\mu_2)^2\over {\sigma_2}^2}}\right].
\end{displaymath} (21)

Solving for $x_1$ and $x_2$ and defining
\begin{displaymath}
\rho'\equiv {\sigma_1\sigma_2\sqrt{1-\rho^2}\over \sigma_{11}\sigma_{22}-\sigma_{12}\sigma_{21}}
\end{displaymath} (22)

gives
$\displaystyle x_1$ $\textstyle =$ $\displaystyle {\sigma_{22}(y_1-\mu_1)-\sigma_{12}(y_2-\mu_2)\over\rho'}$ (23)
$\displaystyle x_2$ $\textstyle =$ $\displaystyle {-\sigma_{21}(y_1-\mu_1)+\sigma_{11}(y_2-\mu_2)\over\rho'}.$ (24)

The Jacobian is
$\displaystyle J\left({x_1,x_2\over y_1,y_2}\right)$ $\textstyle =$ $\displaystyle \left\vert\begin{array}{cc}{\partial x_1\over\partial y_1} & {\pa...
...o'}\\  -{\sigma_{21}\over\rho'} & {\sigma_{11}\over\rho'}\end{array}\right\vert$  
  $\textstyle =$ $\displaystyle {1\over\rho'^2} (\sigma_{11}\sigma_{22}-\sigma_{12}\sigma_{21})$  
  $\textstyle =$ $\displaystyle {1\over\rho'} = {1\over\sigma_1\sigma_2\sqrt{1-\rho^2}}.$ (25)

Therefore,
\begin{displaymath}
dx_1\,dx_2 = {dy_1\,dy_2\over \sigma_1\sigma_2\sqrt{1-\rho^2}}
\end{displaymath} (26)

and


\begin{displaymath}
{1\over 2\pi} e^{-({x_1}^2+{x_2}^2)/2}\,dx_1\,dx_2 = {1\over 2\pi\sigma_1\sigma_2\sqrt{1-\rho^2}} e^{-v/2}\,dy_1\,dy_2,
\end{displaymath} (27)

where


\begin{displaymath}
v\equiv {1\over 1-\rho^2}\left[{{(y_1-\mu_1)^2\over{\sigma_1...
...er\sigma_1\sigma_2}+{(y_2-\mu_2)^2\over {\sigma_2}^2}}\right].
\end{displaymath} (28)

Now, if
\begin{displaymath}
\left\vert\matrix{\sigma_{11} & \sigma_{12}\cr \sigma_{21} & \sigma_{22}\cr}\right\vert =0,
\end{displaymath} (29)

then
\begin{displaymath}
\sigma_{11}\sigma_{12}=\sigma_{12}\sigma_{21}
\end{displaymath} (30)


$\displaystyle y_1$ $\textstyle =$ $\displaystyle \mu_1+\sigma_{11}x_1+\sigma_{12}x_2$ (31)
$\displaystyle y_2$ $\textstyle =$ $\displaystyle \mu_2+{\sigma_{12}\sigma_{21}\over \sigma_{11}} x_2 = \mu_2+{\sigma_{11}\sigma_{21}x_1
+\sigma_{12}\sigma_{21}x_2\over \sigma_{11}}$  
  $\textstyle =$ $\displaystyle \mu_2+{\sigma_{21}\over \sigma_{11}} (\sigma_{11}x_1+\sigma_{12}x_2),$ (32)

so
$\displaystyle y_1$ $\textstyle =$ $\displaystyle \mu_1+x_3$ (33)
$\displaystyle y_2$ $\textstyle =$ $\displaystyle \mu_2+{\sigma_{21}\over \sigma_{11}} x_3,$ (34)

where
\begin{displaymath}
x_3=y_1-\mu_1 ={\sigma_{11}\over \sigma_{21}} (y_2-\mu_2).
\end{displaymath} (35)


The Characteristic Function is given by


$\displaystyle \phi(t_1,t_2)$ $\textstyle \equiv$ $\displaystyle \int_{-\infty}^\infty\int_{-\infty}^\infty e^{i(t_1x_1+t_2x_2)} P(x_1,x_2)\,dx_1\,dx_2$  
  $\textstyle =$ $\displaystyle N \int_{-\infty}^\infty \int_{-\infty}^\infty e^{i(t_1x_1+t_2x_2)} \mathop{\rm exp}\nolimits \left[{-{z\over 2(1-\rho^2)}}\right]\,dx_1\,dx_2,$ (36)

where
\begin{displaymath}
z\equiv \left[{{(x_1-\mu_1)^2\over{\sigma_1}^2}} {-{2\rho(x_...
...ver\sigma_1\sigma_2}+{(x_2-\mu_2)^2\over {\sigma_2}^2}}\right]
\end{displaymath} (37)

and
\begin{displaymath}
N\equiv{1\over 2\pi\sigma_1\sigma_2\sqrt{1-\rho^2}}.
\end{displaymath} (38)

Now let
$\displaystyle u$ $\textstyle \equiv$ $\displaystyle x_1-\mu_1$ (39)
$\displaystyle w$ $\textstyle \equiv$ $\displaystyle x_2-\mu_2.$ (40)

Then


\begin{displaymath}
\phi(t_1,t_2) = N'\int_{-\infty}^\infty \left({e^{it_2w} \ma...
...^2}}\right]}\right)\int_{-\infty}^\infty e^v e^{t_1u}\,du\,dw,
\end{displaymath} (41)

where
$\displaystyle v$ $\textstyle \equiv$ $\displaystyle -{1\over 2(1-\rho^2)} {1\over {\sigma_1}^2} \left[{{u}^2-{2\rho\sigma_1w\over \sigma_2} u}\right]$  
$\displaystyle N'$ $\textstyle \equiv$ $\displaystyle {e^{i(t_1\mu_1+t_2\mu_2)}\over 2\pi\sigma_1\sigma_2\sqrt{1-\rho^2}}.$ (42)

Complete the Square in the inner integral

$\int_{-\infty}^\infty \mathop{\rm exp}\nolimits \left\{{-{1\over 2(1-\rho^2)}{1...
...1}^2}\left[{{u}^2-{2\rho\sigma_1w\over\sigma_2} u}\right]}\right\} e^{t_1u}\,du$
$=\int_{-\infty}^\infty \mathop{\rm exp}\nolimits \left\{{-{1\over 2{\sigma_1}^2...
...ho^2)}\left({\rho_1\sigma_1w\over\sigma_2}\right)^2}\right\}e^{it_1u}\,du.\quad$ (43)
Rearranging to bring the exponential depending on $w$ outside the inner integral, letting

\begin{displaymath}
v\equiv u-\rho{\sigma_1w\over\sigma_2},
\end{displaymath} (44)

and writing
\begin{displaymath}
e^{it_1u}=\cos(t_1u)+i\sin(t_1u)
\end{displaymath} (45)

gives

$\phi(t_1,t_2)=N' \int_{-\infty}^\infty e^{it_2w}\mathop{\rm exp}\nolimits \left[{-{1\over 2{\sigma_2}^2(1-\rho^2)} w^2}\right]$
$\quad \times \mathop{\rm exp}\nolimits \left[{{\rho^2\over 2{\sigma_2}^2(1-\rho...
...ty\mathop{\rm exp}\nolimits \left[{-{1\over 2{\sigma_2}^2(1-\rho^2)}v^2}\right]$
$\quad \times \left\{{\cos\left[{t_1\left({v+{\rho\sigma_1w\over \sigma_2}}\righ...
...ft[{t_1\left({v+{\rho\sigma_1w\over \sigma_2}}\right)}\right]}\right\}\,dv\,dw.$ (46)
Expanding the term in braces gives

$\left[{\cos(t_1v)\cos\left({\rho\sigma_1wt_1\over\sigma_2}\right)-\sin(t_1v)\sin\left({\rho\sigma_1w\over\sigma_2t_1}\right)}\right]$
$ +i\left[{\sin(t_1v)\cos\left({\rho\sigma_1w\over \sigma_2t_1}\right)+\cos(t_1v)\sin\left({\rho\sigma_1wt_1\over \sigma_2}\right)}\right]$
$ =\left[{\cos\left({\rho\sigma_1wt_1\over \sigma_2}\right)+i\sin\left({\rho\sigma_1wt_1\over \sigma_2}\right)}\right]$
$ [\cos(t_1v)+i\sin(t_1v)]= \mathop{\rm exp}\nolimits \left({{i\rho\sigma_1w\over \sigma_2} t_1}\right)[\cos(t_1v) + i\sin(t_1v)].$ (47)
But $e^{-ax^2}\sin(bx)$ is Odd, so the integral over the sine term vanishes, and we are left with

$\phi(t_1,t_2) = N' \int_{-\infty}^\infty e^{it_2w}\mathop{\rm exp}\nolimits \le...
...ht]\mathop{\rm exp}\nolimits \left[{i\rho\sigma_1wt_1\over \sigma_2}\right]\,dw$
$ \times \int_{-\infty}^\infty \mathop{\rm exp}\nolimits \left[{-{v^2\over 2{\sigma_1}^2(1-\rho^2)}}\right]\cos(t_1v)\,dv$
$= N'\int_{-\infty}^\infty \mathop{\rm exp}\nolimits \left[{iw\left({t_2+t_1\lef...
...)}\right]\mathop{\rm exp}\nolimits \left[{-{w^2\over 2{\sigma_2}^2}}\right]\,dw$
$\times \int_{-\infty}^\infty \mathop{\rm exp}\nolimits \left[{-{v^2\over 2{\sigma_1}^2(1-\rho^2)}}\right]\cos(t_1v)\,dv.\quad$ (48)
Now evaluate the Gaussian Integral

$\displaystyle \int_{-\infty}^\infty e^{ikx}e^{-ax^2}\,dx$ $\textstyle =$ $\displaystyle \int_{-\infty}^\infty e^{-ax^2}\cos(kx)\,dx$  
  $\textstyle =$ $\displaystyle \sqrt{\pi\over a}e^{-k^2/4a}$ (49)

to obtain the explicit form of the Characteristic Function,

$\phi(t_1,t_2) = {e^{i(t_1\mu_1+t_2\mu_2)}\over 2\pi\sigma_1\sigma_2\sqrt{1-\rho...
...ft({t_2+\rho{\sigma_1\over\sigma_2}t_1}\right)^2 2{\sigma_2}^2}\right]}\right\}$
$\quad\times\left\{{\sigma_1\sqrt{2\pi(1-\rho^2)}}{\mathop{\rm exp}\nolimits \left[{-{\textstyle{1\over 4}}{t_1}^2 2{\sigma_1}^2(1-\rho^2)}\right]}\right\}$
$\quad = e^{i(t_1\mu_1+t_2\mu_2)}\mathop{\rm exp}\nolimits \{-{\textstyle{1\over...
...1\sigma_2t_1t_2+\rho^2{\sigma_1}^2{t_1}^2+(1-\rho^2){\sigma_1}^2{t_1}^2]\}\quad$
$\quad = \mathop{\rm exp}\nolimits [i(t_1\mu_1+t_2\mu_2) - {\textstyle{1\over 2}}({\sigma_1}^2{t_1}^2+2\rho\sigma_1\sigma_2t_1t_2+{\sigma_1}^2{t_1}^2)].\quad$ (50)


Let $z_1$ and $z_2$ be two independent Gaussian variables with Means $\mu_i = 0$ and ${\sigma_i}^2 = 1$ for $i=1$, 2. Then the variables $a_1$ and $a_2$ defined below are Gaussian bivariates with unit Variance and Cross-Correlation Coefficient $\rho$:

\begin{displaymath}
a_1 = \sqrt{1+\rho\over 2} \,z_1 + \sqrt{1-\rho\over 2} \,z_2
\end{displaymath} (51)


\begin{displaymath}
a_2 = \sqrt{1+\rho\over 2} \,z_1 - \sqrt{1-\rho\over 2} \,z_2.
\end{displaymath} (52)

The conditional distribution is
\begin{displaymath}
P(x_2\vert x_1) = {1\over \sigma_2\sqrt{2\pi(1-\rho^2)}}\mat...
...limits \left[{- { (x^2-\mu'^2)^2\over 2{\sigma_2'}^2}}\right],
\end{displaymath} (53)

where
$\displaystyle {\mu'}_2$ $\textstyle \equiv$ $\displaystyle \mu_2 + \rho{\sigma_2\over\sigma_1} (x_1-\mu_1)$ (54)
$\displaystyle {\sigma'}_2$ $\textstyle \equiv$ $\displaystyle \sigma_2\sqrt{1-\rho_2}\,.$ (55)

The marginal probability density is
$\displaystyle P(x_2)$ $\textstyle =$ $\displaystyle \int_{-\infty}^\infty P(x_1,x_2)\,dx_1$  
  $\textstyle =$ $\displaystyle {1\over\sigma_2\sqrt 2\pi}\mathop{\rm exp}\nolimits \left[{-{(x_2-\mu_2)^2\over 2{\sigma_2}^2}}\right].$ (56)

See also Box-Muller Transformation, Gaussian Distribution, McMohan's Theorem, Normal Distribution


References

Abramowitz, M. and Stegun, C. A. (Eds.). Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, pp. 936-937, 1972.

Spiegel, M. R. Theory and Problems of Probability and Statistics. New York: McGraw-Hill, p. 118, 1992.



info prev up next book cdrom email home

© 1996-9 Eric W. Weisstein
1999-05-25