Suppose there are n lightbulbs, k of them have defects. A technician is allowed to check m lightbulbs and it turns out that exactly l defected ones among those checked.
- Given n,k,m,l, what is the probability mass function (PMF) for l? What is the expected value?
- Given n,m,l, what is the probability mass function (PMF) for k? What is the expected value?
Answer:
- Probability is (number of particular outcomes)/(number of all possible outcomes).
- k≥n: In this case 0≤l≤m. The total number of ways for choosing m bulbs from the n bulbs is Cnm. Number of ways that there are l defected bulbs among m chosen bulbs equals CklCn−Km−l. Therefore the conditional probability for L=l given K=k is P(L=l|K=k)=CklCn−km−lCnm. Interestingly, rearranging the terms, we have (what does it mean?) P(L=l|K=k)=CmlCn−mk−lCnk The expected value equals the sum of (outcome × probability). Therefore E[L|K=k]=m∑k=0lCklCn−km−lCnm.
- k≤n: In this case 0≤l≤k. Again P(L=l|K=k)=CklCn−km−lCnm. The expected value is E[L|K=k]=k∑k=0lCklCn−km−lCnm.
- Indeed there is something missing in the question: How is k distributed? Lets assume that it is K~Bin(N,p), that is, each bulb has a probability p to be defected and that P(K=k)=Cnkpk(1−p)n−k. Therefore P(K=k|L=l)=P(Y=K,L=l)P(L=l)=P(K=k)P(L=l|K=l)∑nk=lP(K=k)P(L=l|K=k) and E[K|L=1]=kP(K=k)P(L=l|K=l)∑nk=lP(K=k)P(L=l|K=k).
The second question:
Suppose there are n lightbulbs, k of them have defects. A technician is allowed to check m lightbulbs. What is the probability that he can find out all the defected?
Answer: The technician can find all the defected bulbs if either all the defected bulbs or all the normal bulbs are among those checked. Therefore the answer is P(he finds all)={Cn−km−kCnmn−k>m>kCn−km−k+Ckm−(n−k)Cnmm≥n−k,kCkm−(n−k)Cnmk>m>n−k