how to solve this probability exercise -selecting perfect parts from 2 boxes?

51 Views Asked by At

there are two boxes of parts, there are 50 parts in box A and 10 are perfect, 30 parts in box B and 18 are perfect. A box is selected randomly and two parts are taken out from it at a time without replacement.

1- find the probability that the first part is perfect. 2- suppose that the first part is found to be perfect. Find the probability that the second part is still perfect

I have resolved the first question and I got 0.4, but I still trying to resolve the second one, I would appreciate it If I get help or at least some hints

2

There are 2 best solutions below

3
On

The probability to get the second part perfect given the first is perfect can be calculated using conditional probability definition

$$\frac{\mathbb{P}[\text{both parts perfect}]}{\mathbb{P}[\text{first part perfect}]}=\frac{\frac{\binom{10}{2}}{\binom{50}{2}}+\frac{\binom{18}{2}}{\binom{30}{2}}}{\frac{10}{50}+\frac{18}{30}}\approx48.56\%$$

1
On

I have an alternative way of thinking about this. The first part you have got correct, well done, so I will provide only discussion for the second. This solution requires Bayes' theorem and The law of total probability

Once we are told that we found a perfect first piece we gain some information. What exactly have we gained? We are more likely to be in box B. Why? As it more fruitfully produces good parts. Let us ask ourself another question. Given that we have found a perfect piece, how likely are we to have initially selected box B?
Let A and B denote the events we selected box A or B respectively and let P denote the event we found a perfect piece.

$P(B|P)$ (the probability we selected box B given we found a perfect piece) = $P(P|B) \cdot \frac{P(B)}{P(P)} $ This is from Bayes Theorem. We know that $P(B) =\frac{1}{2} $ as the boxes are selected uniformly randomly. We also have $P(P) = \frac{2}{5}$ from your initial answer. Now onto $P(P|B)$. This is the probability we selected a perfect piece given we had box $B$ and is clearly $\frac{18}{30} = \frac{3}{5}$

Putting this all together yields: $P(B|P) = \frac{3}{5} \cdot \frac{1}{2} \cdot \frac{5}{2} = \frac{3}{4}$ Hence if we find a perfect piece in a box we are 75% sure we selected box $B$ and thus 25% sure we selected box $ A$. You could also for extra safety do the same calculation for $P(A|P) = P(P|A) \cdot \frac{P(A)}{P(P)} = \frac{1}{5} \cdot \frac{1}{2} \cdot \frac{5}{2} = \frac{1}{4} $

From the law of total probability, the probability we drawn another perfect piece is:
$P$(Another perfect piece | We are in box B ) $\cdot P($We are in box B) + $P$(Another perfect piece | We are in box A ) $\cdot P($We are in box A) = $\frac{17}{29} \cdot \frac{3}{4} + \frac{9}{50} \cdot \frac{1}{4} = \frac{2811}{5800} \approx 0.485$

Hope this helped.