[R] binom.test inside ctest

gb gb at stat.umu.se
Tue Sep 12 08:39:55 CEST 2000


Mai,

it seems as if binom.test only adds half the probability of
of the border point 65 to the p-value. If you try

> (1-pbinom(64, 100, p = 0.5)) + pbinom(34, 100, p=0.5)
[1] 0.002653786

you get the same result as binom.test.


Göran

On Tue, 12 Sep 2000, Mai Zhou wrote:

> I got 
> 
> binom.test(65, 100, p=0.5)
> 
> 
> p-value = 0.002654
> 
> I thought in this case (when p=0.5 so a symmetric distribution)
> we should get 
> 
> p-value = 2*( 1-pbinom(64, 100, p=0.5) ) = 0.003517642
> 
> Can somebody explain why the difference?
> 
> Thanks.
> 
> Mai Zhou
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 

-- 
 Göran Broström                      tel: +46 90 786 5223
 Department of Statistics            fax: +46 90 786 6614
 Umeå University
 SE-90187 Umeå, Sweden             e-mail: gb at stat.umu.se

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list