[SciPy-user] looking for a negative binomial distribution

Chris Fonnesbeck listservs@mac....
Sat Aug 23 03:41:26 CDT 2008

Robert Kern <robert.kern <at> gmail.com> writes:

> On Fri, Aug 22, 2008 at 21:58, Chris Fonnesbeck <listservs <at> mac.com> wrote:
> > I notice in the scipy dev wiki that the negative binomial random number
> > generator is broken. In particular, it appears to round the first parameter,
> > which is incorrect -- any real number is valid, not just integers.
> Fixed in numpy SVN. This will be part of the upcoming 1.2.0 release
> and probably 1.1.2 if we do one.

Thanks Robert,

I would have poked around the source code myself, but I'm on a deadline. I will
update and test the code now though.

The easiest way to generate NB random variables is to sample from a gamma, 
then use that value as the mean for a sample from a poisson.


More information about the SciPy-user mailing list