There are 5 white balls and 4 black balls in a box. Three random balls are taken out. What's the probability that out of the 3 balls the number of black balls is odd provided that the last taken ball was black?
I understand that this is an extremely straight forward problem, but I not able to match the answer with the solution. So, I needed a second pair of eyes to check if I am correct.
Here is what I did.
Set A (# 1 or 3 black balls) = {('W', 'B', 'W') ('W', 'W', 'B') ('B', 'B', 'B') ('B', 'W', 'W')}
Set B (last black ball) = {('W', 'B', 'B') ('W', 'W', 'B') ('B', 'B', 'B') ('B', 'W', 'B')}
Hence the probability that out of the 3 balls the number of black balls is odd provided that the last taken ball was black will be
$P(A | B) = \frac{\#(A \cap B)}{\#(B)}$
$A \cap B = {('W', 'W', 'B'), ('B', 'B', 'B')}$
$\Rightarrow P(A|B) = \frac{2}{4} = 0.5$
Thanks for helping.
Your sets do not consider the probability of them occurring which can be different for different sets.
Say the event of third ball being black is $B$ and event of odd number of black balls is $A$.
Outcomes where third ball is black - $\small\{2B, B\}, \{2W, B\}, \{1B 1 W, B\}$
Outcomes where we have odd number of black balls and the last ball is black - $\small \{2B, B\}, \{2W, B\}$
So, $\small P(B) = \displaystyle \frac{4 \cdot 3 \cdot 2}{9 \cdot 8 \cdot 7} + \frac{5 \cdot 4 \cdot 4}{9 \cdot 8 \cdot 7} + 2 \cdot\frac{5 \cdot 4 \cdot 3}{9 \cdot 8 \cdot 7} = \frac{4}{9}$
$\small P(A\cap B) = \displaystyle \frac{4 \cdot 3 \cdot 2}{9 \cdot 8 \cdot 7} + \frac{5 \cdot 4 \cdot 4}{9 \cdot 8 \cdot 7} = \frac{13}{63}$
So, $\small P(A|B) = \displaystyle \frac{13}{28}$