On Tue, May 6, 2008 at 10:00 PM, Awhan Patnaik <[EMAIL PROTECTED]> wrote:

> GSL allows random number generation between the unit interval [0,1].
> However
> if one has to generate numbers between ANY two real numbers a and b then
> one
> way is the following:
> num = a + rand*(b-a) where rand is a random number in the unit interval.
> Is
> this the only way available ? I mean are the statistical properties
> preserved in such cases.
>

It is totally preserved.
If X ~ Uniform(0,1), then Y = a + (b-a)X ~ Uniform(a,b)
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to