Skip to content

help with binom.power

4 messages · Bert Gunter, Sam Steingold, David Winsemius

#
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?
#
(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)
[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:
#
I don't think this is what I need.
I am looking for an inverse of binom.confint.

Sorry that my question was not clear.
#
On Aug 17, 2015, at 9:48 AM, Sam Steingold wrote:

            
This would be a better fit with the on-topic criteria for CV, since it appears the problem is at the very least a lack of understanding of the principles of power analysis rather than primarily a coding difficulty. You might mention that you hoped to use a function by the name of `binom.power` in some non-base package (which you should offer).