Problems with urns A and E. Are my calculations correct?

53 Views Asked by At

(UPDATED,changed $P(H_1)$ and $P(H_2)$ to 0.5 and recalculated everything else, including P(e), which turned out to be incorrect )

We have two urns, named urn A and urn E.

Urn A contains 4 balls, 1 of which is white and 3 are black Urn E contains 100 balls, 75 of which are white and 25 are black.

We got a ball from unknown urn (There was 50/50 to select either urn) and said ball is BLACK . Now we have two questions.

1) Which urn is most probable to be the one from which said ball came?

2) Which hypothesis is supported by the fact that the ball is black? We have two hypotheses, either the ball came from urn A or urn E

Hypothesis $H_1$ is for probability that the ball came from urn A. $H_2$ is probability that the ball came from urn E. P(e) stands for apriori probability of getting a black ball, with all hypotheses being taken into account.

a) Let's answer the first question. The question can be formalized as following: it's comparison of P($H_1$|e) and P($H_2$|e)

We will need to apply Bayes' theorem, so let's calculate things first.

P(e)=1/2 (If we apply the law of total probability we will get 0.5(3/4 +1/4), that is equal to 1/2)

P($H_1$)=1/2 (There is 50/50 chance to choose either urn)

P($H_2$)=1/2 (There is 50/50 chance to choose either urn)

P(e|$H_1$)=3/4 (We have selected urn A. There are 3 black balls out of 4, so chance to select them from urn A is 3/4)

P(e|$H_2$)=1/4 (We have selected urn E. There are 25 black balls out of 100, so chance to select them from urn E is 25/100, which can be simplified to 1/4)

Now let's apply Bayes' formula for $H_1$:

$$P(H_1|e)=\frac{P(H_1)P(e|H_1)}{P(e)}=\frac{3}{4}$$

Now,for $H_2$:

$$P(H_2|e)=1-P(H_1|e)=\frac{1}{4}$$

This answers our first question, we can clearly see that $P(H_1|e)$>$P(H_2|e)$, thus we can conclude that after taking into account the evidence (the ball that we have is black) urn A has higher chance to be the urn of origin than urn E.

b)Now the second question. We can formalize it as following: Which one is true: $P(H_1|e)$>$P(H_1)$ or $P(H_2|e)$>$P(H_2)$ ? From what I wrote above, in the solution for the first question, we can see that $P(H_1|e)$>$P(H_1)$. In other words, probability of selecting a ball specifically from urn A is increased if we know that it's a black ball, meaning that said evidence supports $H_1$.

1

There are 1 best solutions below

2
On BEST ANSWER

The question as currently worded is ambiguous since it does not adequately describe what the random process is to select a ball, in particular selecting which urn.

To reword it with a few additional necessary assumptions, one possible intended interpretation of your problem is the following:

You have two urns. The first of which has 4 balls, 3 of which are black and 1 of which is white. The second urn has 100 balls, 25 of which are black and 75 of which are white. Your friend chooses a ball at random by first randomly selecting an urn by flipping a fair coin. If heads then they choose the first urn, otherwise they choose the second urn. After having selected an urn, they pick a ball uniformly at random from the urn.

At the end of this process you find that the ball your friend selected was black. What is the probability that the ball originated from the first urn? The second urn?

So, as you noted correctly, this is a question involving Bayes' Theorem. We begin by trying to write down all necessary relevant probabilities and begin calculating those probabilities which we are missing that are also relevant. Matching notation that you started, let $H_1, H_2$ be the events that you selected from the first and second urn respectively. Let $e$ be the event that you selected a black ball.

We are told from the revised problem statement that $Pr(H_1)=Pr(H_2)=\frac{1}{2}$. Further it is plain to see that $Pr(e\mid H_1)=\frac{3}{4}$ and $Pr(e\mid H_2)=\frac{25}{100}$.

Next, $Pr(e)$ is a bit trickier than you realize to calculate. By total probability and multiplication principle we break this down as $Pr(e) = Pr(e\cap H_1) + Pr(e\cap H_2) = Pr(H_1)Pr(e\mid H_1)+Pr(H_2)Pr(e\mid H_2)$

and so $Pr(e) = \frac{1}{2}\times\frac{3}{4}+\frac{1}{2}\times\frac{25}{100} = \frac{1}{2}$

We continue now as normal now that we have gotten back on track.