A lot of 100 items contains k defective items. n items are chosen at random and tested. what is the probability that x are found defective?
Define x, n and p as above.
Use hypergeometric distribution where:
a=number of defective items selected
A=total number of defective items
b=number of non-defective items selected
B=total number of non-defective items
Then
P(a,b)=C(A,a)C(B,b)/C(A+B,a+b)
where
C(n,r) = n!/(n!(n-r)!) = combination of r items selected from n,
A+B=total number of items
a+b=number of items selected
Then
A=k
B=100-k
a=x
b=n-x n ≥ x
Substitute in hypergeometric distribution, we have
P(x)=C(A,a)C(B,b)/C(A+B,a+b)
=C(k,x)C(100-k,n-x)/(C(100,n)
recall:
C(n,r) = n!/(n!(n-r)!) = combination of r items selected from n,