I'm fixing a software defect that occurs 1 in n test runs. If I want to know that the probability of it being fixed is >= p for some 0 <= p < 1, how many times, m, do I need to run the test successfully (without the defect occurring)?
Remember to vote up questions/answers you find interesting or helpful (requires 15 reputation points)
|
1
|
||||||||||
|
closed as off topic by Gerald Edgar, Harald Hanche-Olsen, Steve Huntsman, Noah Snyder, Douglas Zare May 7 2010 at 19:19 |
|
0
|
According to my statistics final which I took yesterday, the answer should be |
|||||||||||||||
|
You can accept an answer to one of your own questions by clicking the check mark next to it. This awards 15 reputation points to the person who answered and 2 reputation points to you.
|
1
|
If your problem was a little bit more difficult (roland-bacher already provided an easy, precise and correct solution) and your $n$ is big, you can also approximate the binomial distribution by a Poisson distribution. Repeating the test $m$ times gives then the parameter $\lambda = \frac{m}{n}$ and your goal is that $m$ is big enough that $e^{-\lambda}\ge 1-p$. So $m \ge -n\ln(1-p)$. The approximation by the Poisson distribution is pretty good, for $n = 500$ and $p = 0.99$ it yields $m > 2302.585$ instead of the correct $m > 2300.28$ given by roland-bacher's formula. |
|||
|
|
|
2
|
I guess $m>\log(1-p)/\log(1-1/n)$ works since the probability of a faulty system running $m$ times without defect is $(1-1/n)^m$ and this should be smaller than $1-p$. This seems to be a homework type question (and moreover an easy one) rather than a MO-question. |
|||
|

