[Scipy-tickets] [SciPy] #1487: scipy.stats.binom wrong pdf() method

SciPy Trac scipy-tickets@scipy....
Thu Jul 28 14:01:43 CDT 2011


#1487: scipy.stats.binom wrong pdf() method
-------------------------+--------------------------------------------------
 Reporter:  tritemio     |       Owner:  somebody
     Type:  defect       |      Status:  new     
 Priority:  normal       |   Milestone:  0.9.1   
Component:  scipy.stats  |     Version:  0.9.0   
 Keywords:  binom        |  
-------------------------+--------------------------------------------------
 The '''binom''' object in scipy.stats returns an object representing a
 binomial distribution.

 The object has a .pdf() methods that when called fails with a cryptic
 error message. Since the distribution is discrete the .pmf() method should
 be used instead to obtain the probabilities. Nonetheless the presence of
 the pdf method may be source of confusion among new users. See for example
 this thread:

 http://mail.scipy.org/pipermail/scipy-user/2011-July/030042.html

 '''Proposed solution:''' the pdf method should either not be defined at
 all for a discrete random variable or, if defined, it should give a
 sensible error message indicating that pmf method is appropriate in this
 case.

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


More information about the Scipy-tickets mailing list