The Gaussian Distribution

Random: double gsl_ran_gaussian (const gsl_rng * r, double sigma)
This function returns a Gaussian random variate, with mean zero and standard deviation sigma. The probability distribution for Gaussian random variates is,

p(x) dx = {1 \over \sqrt{2 \pi \sigma^2}} \exp (-x^2 / 2\sigma^2) dx

for x in the range -\infty to +\infty. Use the transformation z = \mu + x on the numbers returned by gsl_ran_gaussian to obtain a Gaussian distribution with mean \mu. This function uses the Box-Mueller algorithm which requires two calls the random number generator r.

Function: double gsl_ran_gaussian_pdf (double x, double sigma)
This function computes the probability density p(x) at x for a Gaussian distribution with standard deviation sigma, using the formula given above.

Function: double gsl_ran_gaussian_ratio_method (const gsl_rng * r, const double sigma)
This function computes a gaussian random variate using the Kinderman-Monahan ratio method.

Random: double gsl_ran_ugaussian (const gsl_rng * r)
Function: double gsl_ran_ugaussian_pdf (double x)
Random: double gsl_ran_ugaussian_ratio_method (const gsl_rng * r)
These functions compute results for the unit Gaussian distribution. They are equivalent to the functions above with a standard deviation of one, sigma = 1.