The longer way is to find all unique failure combinations and their probabilities and sum them up because any of those combinations will satisfy "at least one failure" criteria. Pass probability = 1-0.1 = 0.9. Since fail order is not important, we can use combinations:
- Failure combinations: abc, a (b and c pass), b (a and c pass), c (a and b pass), ab (c pass), ac (b pass), bc (a pass)
- Probabilities: 0.1^3, 0.1*0.9^2, 0.1*0.9^2, 0.1*0.9^2, 0.1^2*0.9, 0.1^2*0.9, 0.1^2*0.9
- At least one failing: abc OR a OR b OR c OR ab OR ac OR bc. In probability, OR is summation, AND is multiplication.
- Sum: 0.1^3 + 3*0.1*0.9^2 + 3*0.1^2*0.9 = 0.271
- Check with short solution: 1-(1-p)^n = 1-(1-0.1)^3 = 0.271
We can generalize it as follows. C(n,k) means number of k combinations in a set of n elements:
- P(At least 1 fail) = C(3,1)*p*(1-p)^2 + C(3,2)*p^2*(1-p) + C(3,3)*p^3
- k=1..n, sum(C(n,k)*p^k*(1-p)^(n-k))
- Binomial Theorem: k=0..n, sum(C(n,k) * x^k * y^(n-k)) = (x+y)^n
- If we use x = p and y = 1-p, we get k=0..n, sum(C(n,k) * p^k * (1-p)^(n-k)) = (p+1-p)^n = 1. The reason that this summation is one is that it represents all possible combinations and sum of probability of all combinations (including no failure case) is 1.
- In our case k starts from 1, because. we don’t consider the empty set, i.e. no failure case. Probability of k=0 (no failure) case: C(n,0) * p^0 * (1-p)^(n-0) = (1-p)^n.
- Subtract k=0 case: k=1..n, sum(C(n,k) * p^k * (1-p)^(n-k)) - (1-p)^n = 1-(1-p)^n, which is equal to the short solution at the beginning of this post.
No comments:
Post a Comment