[Scipy-tickets] [SciPy] #1107: is poisson.pmf OK?

SciPy Trac scipy-tickets@scipy....
Mon Feb 1 07:07:16 CST 2010


#1107: is poisson.pmf OK?
--------------------+-------------------------------------------------------
 Reporter:  mkh     |       Owner:  somebody
     Type:  defect  |      Status:  new     
 Priority:  normal  |   Milestone:  0.8.0   
Component:  Other   |     Version:  0.7.0   
 Keywords:          |  
--------------------+-------------------------------------------------------
 from scipy.stats import *
 x = [0, 1, 2, 4, 5, 6, 7, 8, 9, 10];
 #P = poisson.pmf(x,3.0,loc=0)
 P = poisson.pmf(x,3.0)
 print P
 ##[ 0.04978707  0.14936121  0.22404181  0.16803136  0.10081881  0.05040941
 ##  0.02160403  0.00810151  0.0027005   0.00081015]


 ## from matlab ..
 ## >> x = linspace(0,10,11)
 # x = 0     1     2     3     4     5     6     7     8     9    10
 # >> p = poisspdf(x,3.0)
 #    p =
 #      Columns 1 through 7
 #            0.0498    0.1494    0.2240    0.2240    0.1680    0.1008
 0.0504
 #      Columns 8 through 11
 #          0.0216    0.0081    0.0027    0.0008

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1107>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list