[R] help with binom.power

Bert Gunter bgunter.4567 at gmail.com
Mon Aug 17 19:27:58 CEST 2015


(offline, since this is about statistics, not R)

1. The phrasing of your question ("reject hypothesis with 95%
confidence" instead of "at 5% level") indicates some statistical
confusion, so you may wish to consult a local statistician or SO for
clarification.

2. Note that using qbinom(in the stats package that is usually
automatically available)

> qbinom(.025,1000,.001,lower=FALSE)
[1] 3


i.e. a one sided test with size .025 rejects P <= .1% if the number of
successes out of 1000 is 4 or more -- i.e. if the observed rate in a
sample of 1000 is .4% or more (using the particular binomial
approximation referenced in ?qbinom, which is probably slightly
different than that used in the function/package you asked about).

If that is not enough to clarify, post on SO or consult locally. Do
not reply to me. (and, of course, feel free to completely disregard
this).

Cheers,
Bert
Bert Gunter

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
   -- Clifford Stoll


On Mon, Aug 17, 2015 at 9:48 AM, Sam Steingold <sds at gnu.org> wrote:
> Hi,
> I am confused by the binom.power - I cannot figure out how to use it.
> E.g., I have "normal success rate" 0.1% (i.e., p=0.001).
> How many successes do I need to observe per n=c(100,1000,10000,100000)
> trials to reject the normalcy hypothesis with confidence 95%?
> I think binom.power should be able to compute that but I cannot figure
> out the meaning of its many parameters (as well as its return value).
> Thanks.
>
> PS. Would you prefer to answer this on SO or CV?
>
> --
> Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1348
> http://www.childpsy.net/ http://palestinefacts.org http://camera.org
> http://truepeace.org http://americancensorship.org http://memri.org
> One can find Holy Grail or Higgs boson, but not the second sock.
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list