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 lecturer
used to say.

The binom.test() confidence interval gives you the value of a random variable
say "U" (for "upper") such that

    Pr(U < p) = p0

where U is a function of the observed binomial random variable, say U = h(X).

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.

    cheers,

    Rolf Turner

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to