[SciPy-user] accuracy of stats.gamma.pdf
Thu Jan 29 06:38:43 CST 2009
On Thu, Jan 29, 2009 at 4:48 AM, Nicolas Chopin
> Dear list,
> when I compute:
> I get:
> whereas the same command in R outputs:
>  1.735993e-09
> Is this a bug, and then should I report it somewhere?
> Or is it just that scipy's implementation of the gamma pdf is a bit
> less accurate than R's?
> I need to compute log-pdf's, so I need relative accuracy, not absolute
> but I can implement my own log-pdf routine, of course.
> Thank you in advance for your wise replies.
> Nicolas Chopin
According to Johnson, Kotz, Balakrishnan gamma.pdf(5.,2.,5.) is zero,
it is at the lower boundary.
But for using log-pdf you might still be better of writing the
log(pdf) directly because you can use directly the expression for log
instead of calculating first exp and then log.
I check it more later today.
More information about the SciPy-user