Hello all,
I am trying to understand the different results I am getting from the
following 3 commands:

chisq.test(c(62,50), p = c(0.512,1-0.512), correct = F) # p-value = 0.3788
binom.test(x=62,n=112, p= 0.512) # p-value = 0.3961
2*(1-pbinom(62,112, .512)) # p-value = 0.329

Well, the binom.test was supposed to be "exact" and give the same results
as the pbinom, while the chisq.test relies on the normal asymptotics.  So I
would imagine the binom.test should be equal to one of the other two lines,
but it is not.

The same happens for larger numbers as well:

chisq.test(c(1395,1278), p = c(0.512,1-0.512), correct = F)
# chisq.test(c(1395,1278), p = c(0.512,1-0.512), simulate.p.value= T)
binom.test(x=1395,n=2673, p= 0.512)
2*(1-pbinom(1395,2673, .512))


I'd be happy to know what I might be missing.

Thanks,
Tal


----------------Contact
Details:-------------------------------------------------------
Contact me: Tal.Galili@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
----------------------------------------------------------------------------------------------

	[[alternative HTML version deleted]]

