A warehouse contains 15 parts from a national vendor and 25 parts from a foreign one. Two parts are selected randomly, without reposition, from the total of 40 parts. Let A be the event of the first selected piece being from the national vendor and B the event the second piece is from the foreign one.
a) Find $P(B)$
b) Find $P(A\cup B)$
c) Find $P(A|B)$
I solved a) correctly and got 5/8. I calculated P(A) as $$ \frac{15}{40}* \frac{14}{39}+ \frac{15}{40}* \frac{25}{39} = $$
I calculated $P(A \cap B)$ as $\frac{15}{40}*\frac{25}{39} = \frac{25}{104}$
I tried to calculate P(AUB) as
$$P(AUB) = P(A)+P(B) -P(A\cap B) = \frac{25}{104} + \frac{5}{8} - \frac{3}{8} = \frac{51}{104}$$
WHich isn't any of the given options. The right answer is 79/104.
Couldn't solve c). Help?
The probability that the first piece is selected from the national vendor, that is to say, $\Pr[A]$, is just $15/40$. There is no additional calculation needed because the second selection is irrelevant.
The probability that the second selection comes from the foreign vendor, $\Pr[B]$, is more complicated since you now need to take into account the first selection. Note that there are two possible ways that the second selection comes from the foreign vendor. If we say $N$ represents the event that a given draw comes from the national vendor, and $F$ represents the event that a given draw comes from the foreign vendor, we can have $$(N,F), \\ (F,F),$$ where each ordered pair represents the selection in sequence--so for instance, $(N,F)$ represents the first selection being national, and the second being foreign.
Now that we have enumerated the possible desired outcomes, we compute their probabilities. $$\Pr[(N, F)] = \frac{15}{40} \cdot \frac{25}{39},$$ because there are $15$ ways to choose from the $40$ parts for the first selection. Once this occurs, there are $39$ parts remaining, $25$ of which are foreign, so the probability of the second selection being foreign is $25/39$. As these choices are conditionally independent, the joint probability is the product of the individual selection probabilities. Similarly, $$\Pr[(F,F)] = \frac{25}{40} \cdot \frac{24}{39}.$$ Therefore, $$\Pr[B] = \Pr[(N,F)] + \Pr[(F,F)] = \frac{15(25) + 25(24)}{40(39)}.$$
The other parts of the question are handled similarly. The event $A \cup B$ represents the outcome where either the first vendor selection is national, or the second is foreign, or both. That is to say, the desired outcomes are $$(N, N), (N, F), (F, F).$$ Indeed, the only outcome that is not desired is $(F, N)$. So you can either reuse the answer in the previous part and add on the probability of the outcome $(N, N)$, or you can calculate the complementary probability $$\Pr[A \cup B] = 1 - \Pr[(F, N)].$$
For the final part, the calculation can be done by noting $$\Pr[A \mid B] = \frac{\Pr[A \cap B]}{\Pr[B]}.$$ Since $A \cap B$ represents the single outcome $(N, F)$, and you already calculated $\Pr[B]$, I leave this as an exercise.