[R] binom.test

Ethan Johnsons
Fri, 20 Oct 2006 21:18:02 -0000

A quick question, please.

46 e coli lab samples are tested,  6 of them returned positive.

So, the best point estimate for p is  6/46 = 0.1304348.

For a 95% CI for p,  I thought binom.test would give me the correct
result, but it seems it is not the right function to use.   What is
the R function for this?

> binom.test(x=6, n=46, p=4/16, conf.level = 0.95)

        Exact binomial test

data:  6 and 46
number of successes = 6, number of trials = 46, p-value = 0.0621
alternative hypothesis: true probability of success is not equal to 0.25
95 percent confidence interval:
 0.04940735 0.26256502
sample estimates:
probability of success
             0.1304348

thx much,

ej