1
$\begingroup$

What would be the formula to estimate the rate of failure of some test as a percentage chance of failure from the number of runs of the test until the first failure was seen?

For example, considering 0 to mean failure and 1 to mean success, the following are possible samples from which each should have an estimated failure rate:

0 (failed on first try, I would estimate failure rate to be 100%)

11110 (failed on fifth try, so answer is something less than around 20% failure rate)

1111111110 (failed on tenth try, so answer is something less than around 10% failure rate)

Working the other way around, imagine the answer was a 10% failure rate. On average, what test will the first failure be seen at? Perhaps it is $(9/10)^n$ < 5/10? What value of n do we reach a 50% chance of failure? Five tries is 59% chance of success, six tries 53%, and seven tries is 48%. Therefore, on average I think we will fail most likely on the seventh trial. So what would be formula to work backwards from 7 to get ~10%?

So what would the answer be?

(1 minus the nth root of .5) where n is the first trial to fail

$\endgroup$
2
$\begingroup$

If I understand correctly, what you have is a geometric distribution in your experiment. So what you're looking for might be the maximum likelihood parameter estimation (taken from http://en.wikipedia.org/wiki/Geometric_distribution):

$$ \hat p = (\frac{1}{n} \sum_{i=1}^{n} k_i)^{-1}$$

You get the $k_i$'s if you do your experiment n times, $k_i$ being the number of times until your test fails. So $\hat p$ is just one over the average number of trials until your test fails.

$\endgroup$
  • $\begingroup$ Sorry I'm a noob, so if the data is 1001, it would be p=(1/4 (1+0+0+1))^-1, thus p = 2? Am I correct? $\endgroup$ – john mossel May 19 '11 at 19:37
  • $\begingroup$ @john: No, 1001 isn't a valid sequence. You stop when you get 0. $\endgroup$ – Rudy the Reindeer May 19 '11 at 21:20
0
$\begingroup$

You could probably use the Nelson-Aelen estimator.

$\endgroup$
  • $\begingroup$ That seems close, however, I only have one input stream and that formula calls for two input streams. $\endgroup$ – WilliamKF Jan 15 '11 at 22:03
0
$\begingroup$

I found the answer is 1/n as explained in section 3.1 over here:

http://www.madandmoonly.com/doctormatt/mathematics/dice1.pdf

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.