[Top][All Lists]

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

RE: [Help-gsl] Truncated normal distribution using gsl_rng_gaussian

From: Abbas Alhakim
Subject: RE: [Help-gsl] Truncated normal distribution using gsl_rng_gaussian
Date: Tue, 23 Dec 2008 00:43:20 -0500

Chadia, the first method that comes to me is rejection. This means that you 
keep generating regular Gaussion variables, using the GSL generator, with the 
prescribed mean and std dev until the outcome is in the interval where you want 
it to be. That is, you accept permissible values and you toss the other values 
Is this what you have used before?
Abbas Alhakim

From: address@hidden on behalf of chadia kanaan
Sent: Mon 12/22/2008 1:45 PM
To: address@hidden
Subject: [Help-gsl] Truncated normal distribution using gsl_rng_gaussian


Could someone, please,  guide me how to generate truncated Gaussian probability 
distribution  numbers between [min,  max]  using the already existing 
gsl_gaussian generators . lets say between 0 and infinity for example.

In earlier gsl archive, this point was discussed and  refered to other method 
like rejection. I have used this method before, but gsl_gaussian generator is 
at least 10 times faster and reliable than generators based on 
rejection/acceptance method.
so I need a solution based on gsl_generator , maybe through simple 
transformation ..

Many thanks for your help,
C. K

Help-gsl mailing list

reply via email to

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