fishers_exact_test icon indicating copy to clipboard operation
fishers_exact_test copied to clipboard

two-tailed pvalue wrong results

Open i000 opened this issue 12 years ago • 1 comments

Python: fisher.pvalue(94, 48, 3577, 16988) Pvalue(left_tail=1, right_tail=2.069e-37, two_tail=1.101e-10)

R:

r = fisher.test(matrix(c(94, 48, 3577, 16988), nrow = 2)) r$p.value [1] 2.069356e-37

the reason is the very high epsilon:

cdef double epsilon = 1e-10 .... if p < cutoff + epsilon: two_tail += p

so if cutoff < epsilon the two_tail is not even close

i000 avatar Feb 20 '12 19:02 i000