fishers_exact_test
fishers_exact_test copied to clipboard
two-tailed pvalue wrong results
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