Function rgsl::randist::bivariate_gaussian::gaussian_tail
[−]
[src]
pub fn gaussian_tail(r: &Rng, sigma_x: f64, sigma_y: f64, rho: f64, x: &mut f64, y: &mut f64)
This function generates a pair of correlated Gaussian variates, with mean zero, correlation coefficient rho and standard deviations sigma_x and sigma_y in the x and y directions. The probability distribution for bivariate Gaussian random variates is,
p(x,y) dx dy = {1 \over 2 \pi \sigma_x \sigma_y \sqrt{1-\rho2}} \exp (-(x2/\sigma_x2 + y2/\sigma_y2 - 2 \rho x y/(\sigma_x\sigma_y))/2(1-\rho2)) dx dy
for x,y in the range -\infty to +\infty. The correlation coefficient rho should lie between 1 and -1.