[Scipy-tickets] [SciPy] #1803: improve discrete rv ppf isf

SciPy Trac scipy-tickets@scipy....
Tue Jan 1 09:43:55 CST 2013


#1803: improve discrete rv ppf isf
-------------------------+--------------------------------------------------
 Reporter:  josefpktd    |       Owner:  rgommers   
     Type:  defect       |      Status:  new        
 Priority:  normal       |   Milestone:  Unscheduled
Component:  scipy.stats  |     Version:  0.11.0     
 Keywords:               |  
-------------------------+--------------------------------------------------
 ppf and isf of discrete rv don't work well in some cases that are not
 extreme cases. See also ticket:1802. For hypergeom.sf some special code is
 in the distribution specific method to make it more accurate.

 Given ticket:1802, I suspect there are also some bugs and not just
 limitations of the current algorithm

 ``_drv2_ppfsingle`` uses invcdf_a and _b which are not updated in
 _argcheck, AFAICS

 {{{
     b = self.invcdf_b
     a = self.invcdf_a
 }}}

 This might give the wrong limits for the bisection.

 Other problems:

  - isf uses ppf, which is less efficient for right tail
  - if .a, .b are both finite, then calculating the full distribution
    as in hypergeom.sf might be more efficient
  - .a, .b might not be set correctly in all cases, see ticket:1802

 One extra possibility: If the pmf is defined for real numbers not just
 integers, than using a scipy.optimize rootfinding could possibly be
 faster.

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


More information about the Scipy-tickets mailing list