[Scipy-tickets] [SciPy] #1401: Negative p from fisher_exact

SciPy Trac scipy-tickets@scipy....
Wed Mar 2 21:12:30 CST 2011


#1401: Negative p from fisher_exact
--------------------------+-------------------------------------------------
 Reporter:  fubar         |       Owner:  somebody
     Type:  defect        |      Status:  new     
 Priority:  normal        |   Milestone:          
Component:  scipy.stats   |     Version:  0.9.0   
 Keywords:  fisher_exact  |  
--------------------------+-------------------------------------------------

Comment(by rgommers):

 Looks like this is due to the very imprecise implementation of the
 hypergeom distribution, see #1218. This line produced negative
 {{{pupper}}}:
 {{{
 2303   pupper = hypergeom.sf(c[0,0] - 1, n1 + n2, n1, n)
 }}}

 Thanks for the R results, those make a good unit test.

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


More information about the Scipy-tickets mailing list