[Scipy-tickets] [SciPy] #1249: scipy.stats.binom_test error

SciPy Trac scipy-tickets@scipy....
Wed Jul 28 19:04:30 CDT 2010


#1249: scipy.stats.binom_test error
-------------------------+--------------------------------------------------
 Reporter:  tanghaibao   |       Owner:  somebody
     Type:  defect       |      Status:  new     
 Priority:  normal       |   Milestone:  0.9.0   
Component:  scipy.stats  |     Version:  0.7.0   
 Keywords:  binom_test   |  
-------------------------+--------------------------------------------------
 scipy.stats.binom_test is tested against R (10 coin flips, 0 head)

 R> binom.test(0, 10, .5, alternative="two.sided")
 p-value = 0.001953
 Python> scipy.stats.binom_test(0, 10, .5)
 0.001953125

 however, for more significant set up (2000 coin flips, 0 head)

 R> binom.test(0, 2000, .5, alternative="two.sided")
 p-value < 2.2e-16
 Python> scipy.stats.binom_test(0, 2000, .5)
 0.72698587356669353

 which is grossly wrong.

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


More information about the Scipy-tickets mailing list