# confidence interval and success rate [duplicate]

1.000 people attempted a task and 30 succeeded. Given this information, we can say that the success rate was 3%.

But what if I want to estimate from this sample a confidence interval for the success rate in the population? For example, given that previous data, the success rate is between let's say 1% and 5% in 95% of cases.

How can I calculate that interval with a 95% certainty? is there any tool online?

Thank you, Luca

If you have a binomial with $n=1000$ and $p=0.03$ the outcome of one sampling of this distribution is $k$. You're looking for the interval from $k-\Delta$ to $k+\Delta$ which contains 95% of the probability of this distribution. Defining $F(x) = P(X \leq x)$ then you need to solve the following equation for $\Delta$:
$$F(k+\Delta) - F(k-\Delta) = 0.95$$
Given that the expression for $F$ is awkward, I'm imagining this that to be done numerically.
• The problem isn't awkwardness: it's that you don't even know $F$! – whuber Mar 27 '18 at 20:23
• On the contrary, the entire point to a CI is that you do not know the underlying distribution. If you know $F$ then you know $p$ and there's nothing to estimate. – whuber Mar 27 '18 at 21:34