Basic probability exercise, picking components from box I am trying to solve this problem on probability:
Suppose a buyer of electrical components buys them in a box of $10$ units. Before buying the box, he inspects $3$ of them at random and accepts to buy the box if none of the three inspected components is damaged. Find the proportion of boxes he will buy if $30$ % of the boxes has $4$ damaged components and the other $70$% just $1$ damaged component.
So, I want to find the probability of the event $A=\{\text{buyer accepts the box}\}$, and since a random box has exactly 4 damaged units or 1 damaged unit, then, if for $i=1,4$ I call $A_i=\{\text{probability of a box having i damaged components}\}$ I can partition the sample space and apply conditional probability:$$P(A)=P(A|A_1)P(A_1)+P(A|A_4)P(A_4)$$$$=P(A|A_1)\dfrac{7}{10}+P(A|A_4)\dfrac{3}{10}$$
I am not sure how to calculate $P(A|A_i)$ for $i=1,4$, is there a common probability distribution that I can associate to this problem? I would appreciate some help, thanks in advance.
 A: The total number of ways you can choose $3$ objects from $10$ is $\binom{10}{3}$.
The total number of ways you can select $3$ objects from $10-k$ is $\binom{10-k}{3}$.
The answer:

 $p[A|A_k] = { \binom{10-k}{3} \over \binom{10}{3}}$.

A: Okay, so what you have here is a Bayesian statistic. Basically, a sequence of random events dependent on previous events. There are two pieces to this problem:


*

*Probability of rejecting either box (on an individual basis)

*Probability of rejecting a random box


Since the problem is ambiguous, I have chosen to handle both order-dependent testing. For order-independent, see@copper.hat's answer.
Order-Dependent
Let's handle the probability of rejecting a single box first.
If we open a box with 4 bad ones and pull out three items at random, we need to compute the probability that all three pass in sequence.
$$P(pass_{4bad}) = {6 \over 10} *{5 \over 9}*{4 \over 8} = {120 \over 720} = {1 \over 6}$$
Now the probability of him rejecting the box is:
$$P(fail_{4bad})=1-P(pass_{4bad})={5\over 6}$$
For the box with only one failure, we repeat the process:
$$P(pass_{1bad})={9 \over 10}*{8 \over 9}*{7 \over 8}={504 \over 720} = {7\over 10}$$
So, the probability of rejection is:
$$P(fail_{1bad})=1-P(pass_{1bad})={3\over 10}$$
Now we can handle the second component of the calculation, which is the combination of the boxes. As you had written, the combined probability is the linear combination of the individual probabilities, weighted by the percentage of each type of box:
$$P(pass) = {7\over 10}P(pass_{1bad})+{3\over 10}P(pass_{4bad})={7\over 10}\cdot {7\over 10}+{3\over 10}\cdot{1 \over 6}$$
$$P(pass) = {49\over 100}+{3 \over 60} = {27\over 50} = \mathbf{54\%}$$
To get the probability of failure, we simply need to find the complement of this probability:
$$P(fail) = 1- P(pass) = {23\over 50}=\mathbf{46\%}$$
