Go to the first, previous, next, last section, table of contents.

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,

for @math{x} in the range @math{-\infty} to @math{+\infty}. Use the transformation @math{z = \mu + x} on the numbers returned by gsl_ran_gaussian to obtain a Gaussian distribution with mean @math{\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 @math{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)
Random: double gsl_ran_ugaussian_pdf (double x)
Random: double gsl_ran_ugaussian_ratio_method (const gsl_rng * r, const double sigma)
These functions compute results for the unit Gaussian distribution. They are equivalent to the functions above with a standard deviation of one, sigma = 1.


Go to the first, previous, next, last section, table of contents.