[R] Small p from binomial probability function.
rolf.turner at vodafone.co.nz
Fri Oct 11 03:36:35 CEST 2013
I've figured it out. It ***is*** "obvious" why Evert's procedure works.
Once you hold your head at the correct angle, as my first year calculus
used to say.
The binom.test() confidence interval gives you the value of a random
say "U" (for "upper") such that
Pr(U < p) = p0
where U is a function of the observed binomial random variable, say U =
The observed value of U is h(x), where x is the observed value of X.
Now we want p such that Pr(X <= x) = p0 where X ~ Binom(N,p).
But when X ~ Binom(N,p),
Pr(U <= p) = p0, i.e
Pr(h(X) <= p) = p0, so if we take p = h(x) we have
Pr(h(X) <= h(x)) = p0, whence
Pr(X <= x) = p0 as desired.
Still twists my head, but.
More information about the R-help