Probability with Bayes

722 Views Asked by At

We have two boxes of the same size and type. The first one has $4$ Apples and $2$ oranges inside, whereas the second one has only $5$ Apples. We cover our eyes so that not to be able to see and We put our hand in one of these boxes. We remove a fruit and when We uncover our eyes We see that We chose an apple. We are asked to calculate the Probability that the box (from which we removed the fruit) includes oranges as well.

I tried to use Bayes Theorem P(A|B) but I find it difficult to find the denominator of the fraction.

I would appreciate for your quidance.

Thank you very much in advance.

3

There are 3 best solutions below

0
On

Let $A$ be the event we picked an apple. Let $B$ be the event that we picked the first box.

We are able to reason that $\Pr(A\mid B) = \frac{4}{6}$, that $\Pr(A\mid B^c)=1$ and that $\Pr(B)=0.5$

We are asked to calculate $\Pr(B\mid A)$ which by Bayes' theorem we know is equal to $$\Pr(B\mid A) = \dfrac{\Pr(A\mid B)\Pr(B)}{\Pr(A)}$$

You say you have difficulty specifically with the denominator.

Recall that by total probability we have that $\Pr(A) = \Pr(A\mid B)\Pr(B)+\Pr(A\mid B^c)\Pr(B^c)$

So $\Pr(A)=\frac{4}{6}\cdot 0.5 + 1\cdot 0.5$

Now, finish the necessary arithmetic and calculations.

1
On

Let's look at 3 scenarios.

We will call the box that is all apples "box 1" and the box with apples and oranges "box 2"

Scenario 1 -- Box 1 and apple. Probability $\frac 12$

Scenario 2 -- Box 2 and apple. Probability $(\frac 12)(\frac 46) = \frac {1}{3}$

Scenario 3 -- Box 2 and orange. Probability $(\frac 12)(\frac 26) = \frac {1}{6}$

Given that you picked an apple, we can discard scenario 3.

What it the chance that you have box 2? $\frac {\frac 13}{\frac 13 + \frac 12} = \frac 25$

1
On

Let's define the events $B_1 :=$ We pick a fruit from the box that contains 4 apples and 2 oranges, $B_2:=$ we pick a fruit from the box that contains 5 apples and $A:=$ we pick an apple

So we have to calculate $P(B_1 | A)$ and this is $\frac{P(B_1 \cap A)}{P(A)}$ but can see that

$P(B_1 \cap A) = P(B_1) \cdot P(A | B_1)$

$P(A) = P(B_1) \cdot P(A | B_1) + P(B_2) \cdot P( A | B_2)$

So if we asume that there is an equal probability of picking either box 1 or 2 and there is an equal probability to pick either of the fruits in either of the boxes then we have that $P(B_1) = P(B_2) = \frac{1}{2} , P( A | B_1)= \frac{4}{6} $ and $P( A | B_2) = 1$ so you just have to replace those values.