Two boxes contain red and blue marbles; given color of picked marbles, probability of having chosen the first box

conditional probability

Problem:
There are two boxes. The first one contains 5 red marbles and 7 blue ones. The second one contains 8 red marbles and 3 blue ones. One of the two boxes is chosen equiprobably, and two marbles are extracted, also equiprobably, from that box.

Knowing that the two extracted marbles are red, what is the probability of having chosen the first box?

My attempt:
I defined the events $S_1 = \{\text{first box is chosen}\}$ and $S_2 = \{\text{second box is chosen}\}$, $RR = \{\text {two red marbles are extracted}\}$.

  • If the first box is chosen, the probability of choosing two red marbles is $\dfrac{5}{12}\cdot \dfrac{4}{11}$. This should be $\mathbf{P}(RR |S_1)$.
  • Similarly, $\mathbf{P}(RR |S_2)$ should be $\dfrac{8}{11}\cdot\dfrac{7}{10}$.
  • What I'm looking for is [I think]: $\mathbf{P}(S_1 |RR)$. In order to find it, I would like to apply the formula: $$\mathbf{P}(S_1 |RR) = \dfrac{\mathbf{P}(RR | S_1) \cdot \mathbf{P}(S_1)}{\mathbf{P}(RR)}$$.

The thing is, I have no idea what $\mathbf{P}(RR)$ should be; it's not defined before we choose the box…

I'm new to the subject, I would appreciate suggestions on how to approach this kind of problems.

Best Answer

... $\mathbf P(S_1\mid RR)=\mathbf P(RR\mid S_1)\cdot\mathbf P(S_1)/\mathbf P(RR)$

The thing is, I have no idea what $\mathbf P(RR)$ should be; it's not defined before we choose the box...

Well, you surely pick one among the boxes when you draw two red marbles: $$\mathbf P(S_1\mid RR)+\mathbf P(S_2\mid RR)=1$$

So that suggests: $\mathbf P(RR)=\mathbf P(RR\mid S_1)\cdot\mathbf P(S_1)+\mathbf P(RR\mid S_2)\cdot\mathbf P(S_2)$


$$\mathbf P(S_1\mid RR)=\dfrac{\mathbf P(RR\mid S_1)\cdot\mathbf P(S_1)~~\phantom{+\mathbf P(RR\mid S_2)\cdot\mathbf P(S_2)}}{\mathbf P(RR\mid S_1)\cdot\mathbf P(S_1)+\mathbf P(RR\mid S_2)\cdot\mathbf P(S_2)}\\~\\~\\\mathbf P(S_2\mid RR)=\dfrac{\phantom{\mathbf P(RR\mid S_1)\cdot\mathbf P(S_1)+}~~\mathbf P(RR\mid S_2)\cdot\mathbf P(S_2)}{\mathbf P(RR\mid S_1)\cdot\mathbf P(S_1)+\mathbf P(RR\mid S_2)\cdot\mathbf P(S_2)}$$


As @lulu and @MathLover have commented, this is an application of the Law of Total Probability.

It is often used like so with Bayes' Rule, so remember it.