## File: The-Gaussian-Distribution.html

package info (click to toggle)
gsl-ref-html 2.3-1
• area: non-free
• in suites: bullseye, buster, sid
• size: 6,876 kB
• ctags: 4,574
• sloc: makefile: 35
 file content (146 lines) | stat: -rw-r--r-- 8,881 bytes parent folder | download
 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146  GNU Scientific Library – Reference Manual: The Gaussian Distribution

20.2 The Gaussian Distribution

Function: 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-Muller algorithm which requires two calls to 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_ziggurat (const gsl_rng * r, double sigma)
Function: double gsl_ran_gaussian_ratio_method (const gsl_rng * r, double sigma)

This function computes a Gaussian random variate using the alternative Marsaglia-Tsang ziggurat and Kinderman-Monahan-Leva ratio methods. The Ziggurat algorithm is the fastest available algorithm in most cases.

Function: double gsl_ran_ugaussian (const gsl_rng * r)
Function: double gsl_ran_ugaussian_pdf (double x)
Function: 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.

Function: double gsl_cdf_gaussian_P (double x, double sigma)
Function: double gsl_cdf_gaussian_Q (double x, double sigma)
Function: double gsl_cdf_gaussian_Pinv (double P, double sigma)
Function: double gsl_cdf_gaussian_Qinv (double Q, double sigma)

These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the Gaussian distribution with standard deviation sigma.

Function: double gsl_cdf_ugaussian_P (double x)
Function: double gsl_cdf_ugaussian_Q (double x)
Function: double gsl_cdf_ugaussian_Pinv (double P)
Function: double gsl_cdf_ugaussian_Qinv (double Q)

These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the unit Gaussian distribution.