[SciPy-user] looking for a negative binomial distribution
Chris Fonnesbeck
listservs at mac.com
Sat Aug 23 05:25:05 EDT 2008
Chris Fonnesbeck <listservs <at> mac.com> writes:
> Robert Kern <robert.kern <at> gmail.com> writes:
> > 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.
>
The fix appears to work, though the samples appear to be biased high relative to
thosegenerated using another method, based on a couple tests. I'll make sure
I'm not making an error first, before complaining again. The first parameter does
accept non-integer arguments now, however.
Thanks,
cf
More information about the SciPy-User
mailing list