# Probability that exactly two defectives are observed [closed]

A quality control plan calls for randomly selecting 4 items from the daily production (assumed large) of a certain machine and observing the number of defectives. However, the proportion $p$ of defectives produced by the machine varies from day to day and is assumed to have the uniform distribution on the interval $(0.1,0.5)$. For a randomly chosen day, find the (unconditional) probability that exactly two defectives are observed in the sample.

-

## closed as off-topic by ᴡᴏʀᴅs, martini, Mathmo123, user1729, Jeel ShahJul 30 '14 at 10:22

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – ᴡᴏʀᴅs, martini, Mathmo123, user1729, Jeel Shah
If this question can be reworded to fit the rules in the help center, please edit the question.

@joriki I don't know how to start. Any suggestions would be great. – woaini Nov 5 '12 at 9:46
@joriki I made a bit more progress, but I'm not sure where the distribution for p fits in. Let A = two items are defective. $P(A)=_4C_2p^2(1-p)^2=6p^2(1-p)^2$ – woaini Nov 5 '12 at 10:15

You correctly calculated the probability that exactly two items are defective given the proportion $p$. Since $p$ has uniform distribution on $(0.1,0.5)$, you need to average this over that interval:
$$P(A)=\frac{\int P(A\mid p)\,\mathrm dp}{\int\mathrm dp}=\frac{\int6p^2(1-p)^2\,\mathrm dp}{\int \mathrm dp}=\frac{\left[\frac63p^3-\frac{12}4p^4+\frac65p^5\right]_{p=0.1}^{p=0.5}}{0.4}=0.24572\;.$$