[ python-Bugs-1745178 ] pdtri gives wrong results

SourceForge.net noreply at sourceforge.net
Fri Jun 29 09:14:26 CEST 2007


Bugs item #1745178, was opened at 2007-06-29 10:14
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1745178&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nikke Knatterton (funke_)
Assigned to: Nobody/Anonymous (nobody)
Summary: pdtri gives wrong results

Initial Comment:
pdtri function, aka inverse of Poisson cumulative distribution gives wrong results when I use it.
For example when expected count is 20:

>>> pdtri(20,0.001)
38.041881353850023

when in Matlab:

>> poissinv(0.999, 20)
ans = 35

I checked the value from http://stattrek.com/Tables/Poisson.aspx
where cumulative probability for 35 is 0.999196 and for 
38 it is 0.999891...clearly the latter is wrong.

Or don't I use the function correctly?

(For some reason the probability 0.999 is given as 0.001 in python)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1745178&group_id=5470


More information about the Python-bugs-list mailing list