Suppose that I am testing a piece of software. This software will pass the test correctly with probability $p\in[0,1]$. Now say that I will not ship the software until it passes all $n$ tests because I want to be confidence with probability $1-\alpha$ that $p>P$.
How many tests should I perform to make sure that this is true?
Using a numerical example, I want to be $95\%$ sure that $p>.99$, how many tests do I need to pass to be in this interval? It would also be nice if I could find some function that was dependent on $\alpha, P$, $n > f(\alpha, P)$.
Now normally I would know how to do this by assuming the Bernoulli trials approximated a normal distribution, however apparently this is not a good approximation if $p$ is close to one? Looking at Wikipedia there appears to be a lot of different methods of doing this, and I don't know which to pick or how to even implement it. Any help would be appreciated
One approach is the rule of three
which suggests, in your example of wanting $95\%$ confidence that $p \gt 0.99$, would require passing at least $300$ independent tests without a single failure
and more generally would suggest to have $1-\alpha$ confidence that $p \gt P$, with $\alpha$ close to $0$ and $P$ close to $1$, you want the test to pass $n \gt -\frac{\log_e \alpha}{1-P}$ independent tests without a single failure