[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Help-gsl] Using gsl_ran_gaussian
From: |
Earl Takasaki |
Subject: |
RE: [Help-gsl] Using gsl_ran_gaussian |
Date: |
Sat, 25 Sep 2004 15:02:20 -0700 |
The range of a Gaussian RV is ALWAYS negative infinity to positive infinity,
regardless of parameters. If it is not, it is not Gaussian. However, as your
variance decreases, the probability of getting a number a fixed distance
from the mean decreases. You can change the output of the standard normal to
a Gaussian with specified mean and variance by simply multiplying by the new
standard deviation (sqrt of variance) then adding in the new mean.
Of course you can always write code to reject any numbers generated outside
your limiting range.
-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf
Of harish vutukuru
Sent: Saturday, September 25, 2004 2:33 PM
To: address@hidden
Subject: [Help-gsl] Using gsl_ran_gaussian
Hello,
I wold need to generate few the (real)numbers lying in a range[a,b] with
mean 'mu' and varinace 'va' based on gaussian distributuion. I know that
gsl_rand_guassian provides numbers from -infinity to +infinity for a
particular mean and variance.
It would be vey useful to me if someone can tell me how to generate them
when the range is not -infinity to +infinity
Thanks
Harish
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Help-gsl mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-gsl