How to condition this problem involving Urns

140 Views Asked by At

There are two urns one with 6 blue objects an 4 yellow objects, and the other with 3 blue objects and 4 yellow objects. We choose an object at random.

(1) If an object we select is yellow, what is the probability it came from the first urn?

(2) Assume we put the yellow object from (1) back in the urn it was drawn from and then draw an object from the same urn. This object is also yellow. What is the probability we chose the first urn?

I have already determined that $$\mathbb{P}(\{\text{We drew from the first urn}\}| \{\text{The object was yellow}\})=\frac{1}{2}.$$

$$\mathbb{P}(\{\text{We drew from the first urn}\}| \{\text{The object was yellow}\})$$

We compute this using Bayes' theorem.

$$\frac{\mathbb{P}(\{\text{The object was yellow}\}|\{\text{We drew from the first urn}\})\mathbb{P}(\{\text{We drew from the first urn}\})}{\mathbb{P}\{\text{The object was yellow}\}}$$

Implicit in the question are the following probabilities:

$$\mathbb{P}(\{\text{The object was yellow}\})=\frac{8}{17}$$

$$ \mathbb{P}(\{\text{The object was yellow}\}|\{\text{We drew from the first urn}\})=\frac{4}{10}$$

$$\mathbb{P}(\{\text{We drew from the first urn}\})=\frac{10}{17}$$

Combining these results together, we have that

$$\mathbb{P}(\{\text{We drew from the first urn}\}| \{\text{The object was yellow}\})=\frac{\frac{4}{10}\frac{10}{17}}{\frac{8}{17}}=\frac{1}{2}$$

Part $(b)$ looks like it is asking to compute $\mathbb{P}(\{\text{We drew the second object the first urn}\}| \{\text{the set of outcomes such that the first and second draws are from the same urn and both objects are yellow}\})$.

Is this the correct way to set up the question?

3

There are 3 best solutions below

6
On

Here is my understanding for part $(2)$, let $A$= "from $1$st urn | ball is yellow"

$$P(A)=P(A\cap \text{part(1) from 1st urn})+P(A\cap \text{part(1) from 2nd urn})$$

$$P(A\cap \text{part(1) from 1st urn})=P(A~|~ \text{part(1) from 1st urn})\cdot P(\text{part(1) from 1st urn})$$

$P(A\cap \text{part(1) from 2nd urn})=0$, because it says "we put the yellow object from (1) back in the urn it was drawn from and then draw an object from the same urn", so if the first time in part(1) you draw from the 2nd urn, then for part(2), you still draw from 2nd urn (from the same urn), so event $A$ cannot happen, so this part is zero.

8
On

Remember, each urn has equal a priori probability of $\frac12$ of being chosen

P(1st urn |yellow) $= \frac{(Urn\; 1\; \cap\;yellow)}{(Urn1\;\cap\; yellow) + (urn2\;\cap\; yellow)}\quad\quad= \dfrac{\frac12\frac4{10}}{\dfrac12(\frac4{10}+\frac 47)}=\dfrac7{17}$

For the second part, we are returning the yellow to the same urn from which drawn,

Thus P(drawn second time from urn $1) = \dfrac7{17}\dfrac4{10} = \dfrac{14}{85}$

If the first time, yellow was drawn from urn $2$,the probability of drawing second time from Urn $1$ is obviously $0$ zero, so it won't enter the calculations for second part


NOTE

The question isn't very clearly phrased. I have taken it that the two urns are placed in such a way that while drawing, we don't know whether we are drawing from urn 1 or urn 2.Else the second part would become meaningless.

6
On

(1) Before drawing from one of the urns, the urn we are drawing from is chosen randomly with the same probability.

$$P(\text{Urn 1}) = P(\text{Urn 2}) = \frac 12$$

The probability of drawing a yellow object from the chosen urn is not $\frac 8{17}$, because the objects have different probability to be chosen depending on the urn they are in.

$$\begin{align*} P(\text{Urn 1}\mid \text{1st yellow}) &= \frac{P(\text{Urn 1} \cap \text{1st yellow})}{P(\text{1st yellow})}\\ &= \frac{P(\text{Urn 1} \cap \text{1st yellow})}{P(\text{Urn 1} \cap \text{1st yellow}) + P(\text{Urn 2} \cap \text{1st yellow})}\\ &= \frac{\frac 12\cdot \frac 4{10}}{\frac 12\cdot \frac 4{10} + \frac 12\cdot \frac 47}\\ &= \frac{7}{17} \end{align*}$$


(2) Here the observation is that we have drawn two yellow objects (with replacement) from the chosen urn. The question does not confirm or deny which urn we are drawing from, but is only asking for the probability given the observation.

This assumes that from a fixed urn, the probabilities of drawing yellow objects (with replacement) every time are identical and independent.

$$\begin{align*} &\quad P(\text{Urn 1}\mid \text{1st yellow}\cap \text{2nd yellow})\\ &= \frac{P(\text{Urn 1} \cap \text{1st yellow}\cap \text{2nd yellow})}{P(\text{1st yellow}\cap \text{2nd yellow})}\\ &= \frac{P(\text{Urn 1} \cap \text{1st yellow}\cap \text{2nd yellow})}{P(\text{Urn 1}\cap \text{1st yellow}\cap \text{2nd yellow})+P(\text{Urn 2}\cap \text{1st yellow}\cap \text{2nd yellow})}\\ &= \frac{\frac12 \cdot \frac4{10}\cdot\frac4{10}}{\frac12 \cdot \frac4{10}\cdot\frac4{10}+\frac12 \cdot \frac47\cdot\frac47}\\ &= \frac{49}{149} \end{align*}$$

Or alternatively, to reuse part (1) that $P(\text{Urn 1}\mid \text{1st yellow})=\frac{7}{17}$,

$$\begin{align*} &\quad P(\text{Urn 1}\mid \text{1st yellow}\cap \text{2nd yellow})\\ &= \frac{P(\text{Urn 1} \cap \text{1st yellow}\cap \text{2nd yellow})}{P(\text{1st yellow}\cap \text{2nd yellow})}\\ &= \frac{P(\text{Urn 1} \cap \text{2nd yellow}\mid \text{1st yellow})}{P(\text{2nd yellow}\mid\text{1st yellow})}\\ &= \frac{P(\text{Urn 1} \cap \text{2nd yellow}\mid \text{1st yellow})}{P(\text{Urn 1}\cap \text{2nd yellow}\mid\text{1st yellow})+P(\text{Urn 2}\cap \text{2nd yellow}\mid\text{1st yellow})}\\ &= \frac{\frac 7{17}\cdot \frac 4{10}}{\frac 7{17}\cdot \frac 4{10} + \left(1-\frac 7{17}\right)\cdot \frac 47}\\ &= \frac{49}{149} \end{align*}$$

The calculation formats of the two alternatives are actually both similar to part (1), but replacing either

  1. in the first method, replacing the probability of the observation given each urn: $$P(\text{1st yellow}\mid\text{Urn }x) \longrightarrow P(\text{1st yellow}\cap\text{2nd yellow}\mid\text{Urn }x)$$

  2. in the second method, replacing the prior probability of choosing each urn: $$P(\text{Urn }x) \longrightarrow P(\text{Urn }x\mid \text{1st yellow})$$