[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] better generator for gaussian random numbers
From: |
John D Lamb |
Subject: |
Re: [Help-gsl] better generator for gaussian random numbers |
Date: |
Fri, 15 Jul 2005 20:19:01 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050414 |
Brian Gough wrote:
> John D Lamb writes:
> > Can you tell me whether anything's happened with the Gamma generator,
> > also due to Marsaglia-Tsang? It would be good to implement that too.
> >
> > I'm happy to test and or write any of this.
>
> If you could put up a page like Jochen's with some analysis and
> testing that would be great.
>
Here it is. Sorry the web page is a little hurriedly constructed.
http://www.uyea.btinternet.co.uk/gamma/gamma.html
The gamma generator of Marsaglia and Tsang also substantially
outperforms GSL and has the virtue of running about the same speed for
all a >= 1. (a < 1 is very unusual).
It might also be worthwhile to add one other distribution to GSL.
gsl_ran_erlang( int a )
This is just a gamma distribution with integer coefficients. I assume
that gsl_ran_chisq uses gsl_ran_gamma and so could also be made to run
much faster. In any case, I suspect that an erlang generator would be
used much more than a chi-squared generator because of its applications
to queueing models.
--
JDL