© All Rights reserved @ LearnWithDash
Step-by-Step Solution
Step 1: Identify All Possible Compositions of the Bag
There are 8 balls in the bag, each of which can be either white or black. The number of white balls, denoted by $X$, can range from 0 to 8. Assuming each configuration (each value of $X$) is equally likely, we have:
$P(X = k) = \frac{1}{9}$ for $k = 0, 1, 2, \ldots, 8$.
Step 2: Define the Desired Event
We draw 4 balls from the bag without replacement and observe that exactly 2 are white and 2 are black. Let this event be $A$. We want the probability that the bag originally contained an equal number of white and black balls (i.e., $X = 4$) given that event $A$ has occurred. Symbolically, we want:
$$
P(X = 4 \mid A).
$$
Step 3: Apply Bayes’ Theorem
By Bayes' theorem:
$$
P(X = 4 \mid A) \;=\; \frac{\,P(A \mid X = 4)\,P(X = 4)\,}{\sum\limits_{k=0}^{8} P(A \mid X = k)\,P(X = k)}.
$$
Step 4: Compute $P(A \mid X = k)$
If the bag has $k$ white balls and $8-k$ black balls, then drawing 2 white and 2 black (event $A$) out of 4 drawn is given by the hypergeometric distribution:
$$
P(A \mid X = k) \;=\; \frac{\binom{k}{2} \,\binom{8-k}{2}}{\binom{8}{4}},
$$
provided $k \ge 2$ and $8 - k \ge 2$. Otherwise, $P(A \mid X = k) = 0$.
Step 5: Calculate the Relevant Terms
Case $X = 4$:
$$
P(A \mid X = 4)
= \frac{\binom{4}{2}\,\binom{4}{2}}{\binom{8}{4}}
= \frac{6 \times 6}{70}
= \frac{36}{70}
= \frac{18}{35}.
$$
Since $P(X = 4) = \frac{1}{9}$,
$$
P(X = 4)\,P(A \mid X = 4)
= \frac{1}{9} \,\times\, \frac{18}{35}
= \frac{18}{315}
= \frac{2}{35}.
$$
Case $X = 2$:
$$
P(A \mid X = 2) = \frac{\binom{2}{2}\,\binom{6}{2}}{\binom{8}{4}}
= \frac{1 \times 15}{70}
= \frac{15}{70}
= \frac{3}{14}.
$$
Thus,
$$
P(X = 2)\,P(A \mid X = 2)
= \frac{1}{9} \,\times\, \frac{3}{14}.
$$
Case $X = 3$:
$$
P(A \mid X = 3) = \frac{\binom{3}{2}\,\binom{5}{2}}{\binom{8}{4}}
= \frac{3 \times 10}{70}
= \frac{30}{70}
= \frac{3}{7}.
$$
Hence,
$$
P(X = 3)\,P(A \mid X = 3)
= \frac{1}{9} \,\times\, \frac{3}{7}.
$$
Case $X = 5$:
$$
P(A \mid X = 5)
= \frac{\binom{5}{2}\,\binom{3}{2}}{\binom{8}{4}}
= \frac{10 \times 3}{70}
= \frac{30}{70}
= \frac{3}{7}.
$$
Thus,
$$
P(X = 5)\,P(A \mid X = 5)
= \frac{1}{9} \,\times\, \frac{3}{7}.
$$
Case $X = 6$:
$$
P(A \mid X = 6)
= \frac{\binom{6}{2}\,\binom{2}{2}}{\binom{8}{4}}
= \frac{15 \times 1}{70}
= \frac{15}{70}
= \frac{3}{14}.
$$
Hence,
$$
P(X = 6)\,P(A \mid X = 6)
= \frac{1}{9} \,\times\, \frac{3}{14}.
$$
Case $X = 0, 1, 7,$ or $8$:
$P(A \mid X = k) = 0$ in these cases, since we cannot draw 2 white and 2 black if all or nearly all the balls are of the same color.
Step 6: Sum the Denominator in Bayes’ Formula
We need
$$
\sum_{k=0}^{8} P(A \mid X = k)\,P(X = k).
$$
From the nonzero cases ($k = 2, 3, 4, 5, 6$), this sum is:
$$
\frac{1}{9}\Bigl[
\underbrace{\frac{3}{14}}_{X=2}
+ \underbrace{\frac{3}{7}}_{X=3}
+ \underbrace{\frac{18}{35}}_{X=4}
+ \underbrace{\frac{3}{7}}_{X=5}
+ \underbrace{\frac{3}{14}}_{X=6}
\Bigr].
$$
Converting each fraction to a common denominator 70:
$$
\frac{3}{14} = \frac{15}{70},
\quad
\frac{3}{7} = \frac{30}{70},
\quad
\frac{18}{35} = \frac{36}{70}.
$$
Summing inside the brackets:
$$
15 + 30 + 36 + 30 + 15 = 126,
\quad
\text{which is } \frac{126}{70} = \frac{9}{5}.
$$
Multiplying by $\frac{1}{9}$ gives:
$$
\sum_{k=0}^{8} P(A \mid X = k)\,P(X = k)
= \frac{1}{9} \times \frac{9}{5}
= \frac{1}{5}.
$$
Step 7: Compute the Final Probability
From Step 5, we have
$$
P(X = 4)\,P(A \mid X = 4) = \frac{2}{35}.
$$
By Bayes’ theorem:
$$
P(X = 4 \mid A)
= \frac{\frac{2}{35}}{\frac{1}{5}}
= \frac{2}{35} \times 5
= \frac{10}{35}
= \frac{2}{7}.
$$
Final Answer
The probability that the bag contains 4 white balls and 4 black balls, given that 2 drawn were white and 2 drawn were black, is
$$
\frac{2}{7}.
$$