# Urn Probability Problem containing algebraic variables

Urn A contains $$x$$ red marbles and $$y$$ white marbles, and Urn B contains $$z$$ red marbles and $$v$$ white marbles.

If a marble is drawn from Urn A and put into Urn B and then a marble is drawn from Urn B, what is the probability that the second marble is red?

I get the answer $$\frac{2z+1}{z+v+1}$$, but my book gives the answer $$\frac{xz+x+yz}{(x+y)(z+v+1)}$$. I cannot understand how the books answer was obtained.

There are two cases: A red marble has been drawn from urn A and a white marble has been drawn from urn A.

$$\texttt{First case}$$:

The probability that a red marble has been drawn from urn A is $$\frac{x}{x+y}$$. Then you have $$z+1$$ red marbles in urn B and $$z+v+1$$ marbles in total. The probability to draw a red marble from urn B then is $$\frac{z+1}{z+v+1}$$

$$\texttt{Second case}$$:

The probability that a white marble has been drawn from urn A is $$\frac{y}{x+y}$$. Then you have still $$z$$ red marbles in urn B and $$z+v+1$$ marbles in total. The probability to draw a red marble from urn B then is $$\frac{z}{z+v+1}$$

Therefore the probability that hat the second marble is red is

$$\frac{x}{x+y}\cdot \frac{z+1}{z+v+1}+\frac{y}{x+y}\cdot \frac{z}{z+v+1}=\frac{x(z+1)+yz}{(x+y)\cdot (z+v+1)}=\frac{xz+x+yz}{(x+y)\cdot (z+v+1)}$$

Remark on the comment.

Firstly we define the relevant events:

$$A \texttt{ :Marble from urn A is red}$$

$$\overline A\texttt{ :Marble from urn A is white}$$

$$B \texttt{ :Marble from urn B is red}$$

$$\overline B\texttt{ :Marble from urn B is white}$$

There are two ways where the seocond marble is red.

1. $$\texttt{Marble from urn A is red} \rightarrow \texttt{Marble from urn B is red}$$

2. $$\texttt{Marble from urn A is white} \rightarrow \texttt{Marble from urn B is red}$$

Compared to only one way you have a higher chance to get a red marble from urn B. Thats why you add the two cases.

If you go along a path each node represents an event, which happen with a specific probability. At path 1 the event A and event B have to happen at the same time. That´s why we multiply the probabilities: $$P(A)\cdot P(B|A)$$. The second probability is a conditional probability since the probability depends on the what we have drawn from the first urn.

Similar for the second path: $$P(\overline A)\cdot P(B|\overline A)$$

It is an application of the law of total probability $$P(B)=P(A)\cdot P(B|A)+P(\overline A)\cdot P(B|\overline A)$$ • Thanks for the answer I think you mean (x+y) in the bottom of the last fraction...An explanation as to why yuo are multiplying the probabilities and then adding would be nice .......... – herashefat Oct 3 '18 at 2:48
• @herashefat I have made an edit. – callculus Oct 3 '18 at 8:48

Your answer doesn't involve $$x$$ or $$y,$$ so you get the same probability no matter what the distribution of colors in the first urn. Surely, this can't be right.

I think you are neglecting to weight your probabilities by the probability of the initial outcomes. I guess you're saying something like, if the first marble is red, the probability that the second is red is $${z+1\over z+v +1},$$ and if the first marble is black, the probability that the second marble is black is $${z\over z+v +1},$$ and we add these probabilities.

But we have \begin{align} Pr(M_2=R)&=P(M_2=R|M_1=R)\cdot P(M_1=R)\\ &+ P(M_2=R|M_1=B)\cdot P(M_1=B)\end{align} where $$M_1$$ and $$M_2$$ are the colors of the first and second marbles. You've just added up the conditional probabilities, without weighting them by the probabilities of the color of the first marble.

If you plug these in, I imagine you'll get the answer in the book.

• @saulpatz ,but why do we have to multiply here?? – herashefat Oct 3 '18 at 3:55
• @herashefat because in general $P(A\mid B)P(B)=P(A\cap B)$. Note that $P(M_2=R)=P(M_2=R\wedge M_1=R)+P(M_2=R\wedge M_1=B)=\text{RHS in answer}$. – drhab Oct 3 '18 at 8:16