xbeta
Bivariate normal distribution

Suppose the random variables X 1,X 2 are jointly distributed according to the bivariate normal distribution. This distribution can be characterized by five parameters:

  • μ 1: the mean of X 1,
  • μ 2: the mean of X 2,
  • σ 1: the standard deviation of X 1,
  • σ 2: the standard deviation of X 2,
  • ρ: the correlation of X 1 and X 2.

Their joint density is

f(x 1,x 2)=12πσ 1σ 21ρ 2exp{12(1ρ 2)[(x 1μ 1σ 1) 22ρx 1μ 1σ 1x 2μ 2σ 2+(x 2μ 2σ 2) 2]}.f(x_1,\,x_2) = \frac{1}{2\pi\sigma_1\sigma_2\sqrt{1-\rho^2}} \exp\left\lbrace -\frac{1}{2(1-\rho^2)}\left[ \left( \frac{x_1 - \mu_1}{\sigma_1}\right)^2 - 2 \rho \frac{x_1 - \mu_1}{\sigma_1} \frac{x_2 - \mu_2}{\sigma_2} + \left( \frac{x_2 - \mu_2}{\sigma_2}\right)^2 \right] \right\rbrace.

Sampling From the Bivariate Normal Distribution

The following algorithm can be used to sample from the bivariate normal distribution:

  1. Let z 1 and z 2 be independent draws from the standard normal distribution N(0,1).

  2. Then, x 1 and x 2 calculated as follows will have a joint bivariate normal distribution with parameters (μ 1,μ 2,σ 1,σ 2,ρ):

x 1 =μ 1+σ 1z 1 x 2 =μ 2+σ 2[z 1ρ+z 21ρ 2] \begin{aligned}x_1 &= \mu_1 + \sigma_1 z_1 \\ x_2 &= \mu_2 + \sigma_2 \left[z_1 \rho + z_2 \sqrt{1 - \rho^2} \right] \\ \end{aligned}

See Also