[Scipy-tickets] [SciPy] #1568: One-sided fisher_exact test returns p-value < 1 for 0 successful attempts

SciPy Trac scipy-tickets@scipy....
Thu Nov 24 03:35:34 CST 2011


#1568: One-sided fisher_exact test returns p-value < 1 for 0 successful attempts
-------------------------+--------------------------------------------------
 Reporter:  biocs        |       Owner:  somebody   
     Type:  defect       |      Status:  new        
 Priority:  normal       |   Milestone:  Unscheduled
Component:  scipy.stats  |     Version:  devel      
 Keywords:               |  
-------------------------+--------------------------------------------------
 A contingency table with 0 in the top-left give a p-value less than one
 for the alternative "greater":

 {{{
 >>> import scipy
 >>> import scipy.stats
 >>> scipy.stats.fisher_exact(((0,1),(2,3)), alternative="greater")
 (0.0, 0.33333333333333309)
 }}}

 Expected behavior (R):

 {{{
 > fisher.test(matrix(c(0,1,2,3),nrow=2),alternative="greater")

         Fisher's Exact Test for Count Data

 data:  matrix(c(0, 1, 2, 3), nrow = 2)
 p-value = 1
 alternative hypothesis: true odds ratio is greater than 1
 95 percent confidence interval:
    0 Inf
 sample estimates:
 odds ratio
          0

 }}}

 I tested this with version 0.10.0 installed via MacPorts. The fix should
 probably follow the lines of #1489.

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


More information about the Scipy-tickets mailing list