help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Best random number generator algorithms to use with `gsl_ran_gaussian`


From: Vicent Giner Bosch
Subject: Best random number generator algorithms to use with `gsl_ran_gaussian`
Date: Fri, 10 Dec 2021 22:16:53 +0100

I am using GSL's `gsl_ran_gaussian` (actually, the version with unit
variance `gsl_ran_ugaussian`) to generate pseudorandom values of a
normal random variable.

According to the documentation, one of the arguments of the function
`gsl_ran_gaussian` is a pseudorandom number generator `r` (an instance
of the `gsl_rng` struct) that will be intialised before calling
`gsl_ran_gaussian` for the first time.

I was planning to use MT19937 (`gsl_rng_mt19937`) or one of the
RANLUX-like ones (`ranlxs0`, for instance) as the algorithm to be used
by `r`, but I am not sure. There are plenty of possible algorithms to
choose from (see
https://www.gnu.org/software/gsl/doc/html/rng.html#random-number-generator-algorithms).

I am not looking for how fast the algorithm may be. I am rather much
more interested in generating pseudorandom values from a Gaussian
distribution with the best quality from a mathematical standpoint,
meaning that they seem as 'random' as possible.

So, according to your experience, which is a good pseudorandom number
algorithm to be used when sampling from a Gaussian distribution.

NOTE: In case it matters, those Gaussian observations will not be
combined in any way after being generated ---I mean, I am neither
thinking about adding or subtracting them nor creating n-tuples of
them, etc.

I look forward to your answers,


--
vicent

@vginer_upv
vigibos.webs.upv.es



reply via email to

[Prev in Thread] Current Thread [Next in Thread]