[Math] Conditional Probability of marbles

probability

$ 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

Best Answer

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$