# Conditional Probability of marbles

$1.$ Box A has $4$ green marbles and $5$ red marbles. Box B has $3$ green marbles and $2$ red marbles. A Marble is selected at random from box B and is put into box A. Then a marble is selected from Box A. Find the probability that.

A) The marble selected from box A is green. B) The marble selected from box B is green given that the marble selected from A is green.

For A) $P(G|Box A)=\frac{P(A|G)P(G)}{P(A)}$ So I know that in Box A it can be 5 Green and 5 Red or 4 Green and 6 Red, this is after transferring 1 random ball from box B. But I in my formula I don't know what should be $P(G)$ and $P(A)$ or is it incorrect to use that formula in this question? Another thing I tried is if I can get $\frac{5}{10}$Green balls or $\frac{4}{10}$ If the transferred ball is Green or Red respectively. But wait which one is the answer? For B) I don't get it

• For a), use law of total probability: $P(G_A) = P(G_A|G_B)P(G_B) + P(G_A|R_B)P(R_B)$; For b), use Bayes Theorem: $\displaystyle P(G_B|G_A) = \frac {P(G_A|G_B)P(G_B)} {P(G_A)}$ – BGM Jan 16 '16 at 6:53
• @BGM $P(G_a|G_b)$ what do you mean by that? is 5/10? since if I got a green ball from box B then my balls will be 5G and 5R for box a so its 5/10 multiplied by Gb? Gb is 3/10 or 4/10 do i minus 1 since i got the green and transferred it to box a? – Mickey Jan 16 '16 at 6:59

A) Let us using Total Probability conditioning on the color of ball selected from box B:

$\begin{multline}P(\mbox{select green marble})\\=P(\mbox{select green marble}|\mbox{green marble in}B)P(\mbox{green marble in}B)\\+P(\mbox{select green marble}|\mbox{red marble in}B)P(\mbox{green red in}B)\end{multline}$

Now:

$P(\mbox{select green marble}|\mbox{green marble in}B)=5/10=1/2$,

$P(\mbox{green marble in}B)=3/5$

$P(\mbox{select green marble}|\mbox{red marble in}B)=4/10=2/5$

$P(\mbox{red marble in}B)=2/5$

Thus, $P(\mbox{select green marble})=\frac{1}{2}\frac{3}{5}+\frac{2}{5}\frac{2}{5}=\frac{23}{50}=0.46$

B) $P(\mbox{select green in B }|\mbox{select green in A})=P(\mbox{select green in A }|\mbox{select green in B})\dfrac{P(\mbox{select green in B})}{P(\mbox{select green in A})}=\dfrac{5}{10}\dfrac{\frac{3}{5}}{\frac{23}{50}}=\frac{15}{23}=0.652$

So, the events we are considering are after the procedure described is done.

Let $G = \{\text{Choose Green marble}\},R =\{\text{Choose Red marble}\}$ and $B =\{\text{Add 1 green marble from Box B to A}\},\bar B = \{\text{Add on red marble from Box B to A}\}.$

Then for (a) \begin{align*} P(G) &= P(G|B)P(B)+P(G|\bar B)P(\bar B)\tag1\\ &=\frac{5}{10}\cdot\frac{3}{5}+\frac{4}{10}\cdot\frac{2}{5}\tag2\\ &=\frac{23}{50} \end{align*} where in

• $(1)$ The probability of picking a green depends on whether or not a green ball was transferred to Box A or not. Thus we condition on the event that happened in Box B, not on Box A.

• $(2)$ For example $P(G|B)$ means what is the probability that you pick green given that a green was added to box A. Well, there are 5 greens and 10 total, so 5/10. What is the probability of $B$? Well, there was a 3/5 chance that you chose a green marble and transferred it to box A.

So, using the notation above, we're ask $P(B|G)$. This is \begin{align*} P(B|G) &=\frac{P(BG)}{P(G)}\tag 1\\ &=\frac{P(G|B)P(B)}{P(B)}\tag 2\\ &=\frac{(5/10)(3/5)}{23/50}\tag 3\\ &=\frac{15}{23} \end{align*} where in

• (1) I used Bayes' rule and

• (2) I conditioned on $B$

• (3) I plugged in the values calculated previously.