# There are $n$ urns with $4$ white and $6$ black balls.

There are n urns marked $1, 2, ..., n$ respectively, with each of the $n$ urns containing 4 white and 6 black balls. There is another urn, marked $(n+1)$ containing $5$ white and $5$ black balls. An urn is chosen at random from the $(n+1)$ urns, and two balls are drawn at random from that urn, both being black. The probability that $5$ white and $3$ black balls are left in the chosen urn is $1/7$. Determine that value of n.

I know I'm supposed to use Bayes' Rule to it, but I'm not sure how to categorize the events.

Given that there are total $n+1$ bags of which first $n$ bags contain $4W + 6B$

First we find the total probability of drawing $2$ black balls.

Probability of choosing each of the first $n$ bags = $\dfrac{1}{{n + 1}}$

So Total probability of drawing $2$ black balls = Drawing 2 black from first $n$ bags + Drawing 2 black balls from the last bag = $\dfrac{n}{{n + 1}}\left( {\dfrac{{{}^6{C_2}}}{{{}^{10}{C_2}}}} \right)$ + $\dfrac{1}{{n + 1}}\left( {\dfrac{{{}^5{C_2}}}{{{}^{10}{C_2}}}} \right)$

To leave $5W + 3B$ in a bag, we have to draw from the last bag. So Probability of drawing $2$ black balls from the last bag = $\dfrac{1}{{n + 1}}\left( {\dfrac{{{}^5{C_2}}}{{{}^{10}{C_2}}}} \right)$

Given that, $\dfrac{{\dfrac{1}{{n + 1}}\left( {\dfrac{{{}^5{C_2}}}{{{}^{10}{C_2}}}} \right)}}{{\dfrac{n}{{n + 1}}\left( {\dfrac{{{}^6{C_2}}}{{{}^{10}{C_2}}}} \right) + \dfrac{1}{{n + 1}}\left( {\dfrac{{{}^5{C_2}}}{{{}^{10}{C_2}}}} \right)}} = \dfrac{1}{7}$

Solving $n = 4$

Define the events:

• $A =$ the last urn is chosen (and not one of the first $n$ urns).
• $B =$ the two balls drawn from the chosen urn are both black.

Then by Bayes' Rule, we have: $$\frac{1}{7} = \Pr[A \mid B] = \frac{\Pr[A]\Pr[B \mid A]}{\Pr[A]\Pr[B \mid A] + \Pr[\overline A]\Pr[B \mid \overline A]} = \cdots$$