# Thread: Need Help On Tough Conditional Probability Problem

1. ## Need Help On Tough Conditional Probability Problem

Supplier A provides 3 times as many eggs as supplier B.
All eggs are kept in a large container.
Based on past statistics, 4% of A's eggs and 7% of B's eggs are rotten.
Suppose an egg was picked from the container and it is defective, what is the probability that the egg was actually supplied by A?

I'm completely clueless in this problem, please advise. Thanks!

2. Hello,

From your text, we can say that $\displaystyle P(A \cap R)=.04$, where R represents the event "egg rotten" and A the even "egg provided by A".
We also have $\displaystyle P(B \cap R)=.07$

What we are looking for is $\displaystyle P(A / R)$, that is to say "if the egg is rotten (condition), what is the probability that it was supplied by A (event)"

Now, let X be the number of eggs supplied by B.
A will supply 3X eggs.

The total is 4X.

So the probability to take an egg from A is $\displaystyle \frac{3X}{4X}=\frac{3}{4}$

With the formula of conditional probability, we have $\displaystyle {\color{red} P(A/R)=\frac{P(A \cap R)}{P(A)}}$

Hence $\displaystyle P(A/R)=\frac{.04}{\frac{3}{4}}=\dots$

3. Hmm, the formula of conditional probability that I learnt was

$\displaystyle P(A/R)=\frac{P(A \cap R)}{P\color{red}(R)}$

And if so, to get $\displaystyle P(R)$ - would it be:

$\displaystyle \frac{3}{4} \times 0.04 = 0.03$

4. Outch ! Sorry, I'll think again about it !

5. Ok, so $\displaystyle P(A/R)=\frac{P(A \cap R)}{P\color{red}(R)}$
Plus $\displaystyle P(R/A)=\frac{P(A \cap R)}{P(A)} \Longleftrightarrow P(A \cap R)=P(R/A)P(A)$

Hence : $\displaystyle {\color{blue} P(A/R)=\frac{P(R/A)P(A)}{P(R)}}$

I misread and $\displaystyle {\color{blue} P(R/A)=.04}$, not $\displaystyle P(R \cap A)$

Let's calculate P(R).

$\displaystyle A \cup B=\Omega$
Hence :
$\displaystyle P(R)=P(R \cap A)+P(R \cap B)=\underbrace{P(R/A)}_{.04}$$\displaystyle P(A)+\underbrace{P(R/B)}_{.07} P(B)=.04*\frac{3}{4}+.07*\frac{1}{4}=.0475 Then you can calculate P(A/R) now... I hope I didn't make a mistake again 6. I've got another question! =P Suppose now I have two BIASED coins in two containers (4 coins in total). Container 1's coins have a probability of L1 of getting heads and Container 2's coins have a probability of L2 of getting heads. L1 is not equal to L2. Which will give a higher chance of getting two heads if I: a) Select one container at random then toss the two coins in it b) Toss one coin each from each container Please guide me and give me hints. I want to come up with the solution myself! For a start, this is about conditional probability, right? Also, I think option A will give a higher chance, but I'm not sure if I'm correct. Suppose, L1 is 0.9 and L2 is 0.4, by doing: a) Pr1 = (0.9 * 0.9) * 0.5 = 0.405 | Pr2 = (0.4 * 0.4) * 0.5 = 0.08 b) Pr = 0.9 * 0.4 = 0.36 (< Pr1) If L1 is 0.5 and L2 is 0.3, a) Pr1 = (0.5 * 0.5) * 0.5 = 0.125 | Pr2 = (0.3 * 0.3) * 0.5 = 0.045 b) Pr = 0.5 * 0.3 = 0.15 (> Pr1) After here, I'm stuck and unsure how to proceed next to justify my choice. Please help! ^^ Thanks. 7. Originally Posted by Moo Ok, so \displaystyle P(A/R)=\frac{P(A \cap R)}{P\color{red}(R)} Plus \displaystyle P(R/A)=\frac{P(A \cap R)}{P(A)} \Longleftrightarrow P(A \cap R)=P(R/A)P(A) Hence : \displaystyle {\color{green} P(A/R)=\frac{P(R/A)P(A)}{P(R)}} I misread and \displaystyle {\color{green} P(R/A)=.04}, not \displaystyle P(R \cap A) Let's calculate P(R). \displaystyle A \cup B=\Omega Hence : \displaystyle P(R)=P(R \cap A)+P(R \cap B)=\underbrace{P(R/A)}_{.04}$$\displaystyle P(A)+\underbrace{P(R/B)}_{.07} P(B)=.04*\frac{3}{4}+.07*\frac{1}{4}=.0475$

Then you can calculate P(A/R) now...

I hope I didn't make a mistake again
The green LaTeX is hard to read, try blue

8. Hello, zepher!

I got a different answer . . .

Supplier A provides 3 times as many eggs as supplier B.
All eggs are kept in a large container.
Based on past statistics, 4% of A's eggs and 7% of B's eggs are rotten.
Suppose an egg was picked from the container and it is rotten,
what is the probability that the egg was actually supplied by A?
We're expected to know Bayes' Theorem: . $\displaystyle P(X|Y) \;=\;\frac{P(X \cap Y)}{P(Y)}$

We want: . $\displaystyle P(A|\text{rotten}) \;=\;\frac{P(A \cap\text{ rotten})}{P(\text{rotten})}$

We know: .$\displaystyle P(A) \,= \,0.75\:\text{ and }\;P(\text{rotten}|A) \,=\,0.04$
. . Hence: .$\displaystyle P(A \cap\text{ rotten}) \:=\0.75)(0.04) \:=\:{\color{blue}0.03}$

We know: .$\displaystyle P(B) \,= \,0.25\,\text{ and }\,P(\text{rotten }|B) \,=\,0.07$
. . Hence: .$\displaystyle P(B \cap\text{ rotten}) \:=\0.25)(0.07) \:=\:0.0175$

Then: .$\displaystyle P(\text{rotten}) \;=\;0.03 + 0.0175 \;=\;{\color{blue}0.0475}$

Therefore: .$\displaystyle P(A|\text{ rotten}) \;=\;\frac{0.03}{0.0475} \;=\;0.631578047 \;\approx\;63\%$

9. Originally Posted by Soroban
Therefore: .$\displaystyle P(A|\text{ rotten}) \;=\;\frac{0.03}{0.0475} \;=\;0.631578047 \;\approx\;63\%$
Hm, this is the same result as mine...

10. haha yeah. I've got that too

Any idea about the 2nd question posted? =P

11. Originally Posted by zepher
Supplier A provides 3 times as many eggs as supplier B.
All eggs are kept in a large container.
Based on past statistics, 4% of A's eggs and 7% of B's eggs are rotten.
Suppose an egg was picked from the container and it is defective, what is the probability that the egg was actually supplied by A?

I'm completely clueless in this problem, please advise. Thanks!
Probability that a random egg is supplied by $\displaystyle A$ is $\displaystyle 0.75$, and by $\displaystyle B$ is $\displaystyle 0.25$, then:

Bayes' Theorem:

$\displaystyle p(A|r)=\frac{p(r|A)p(A)}{p(r)}=\frac{0.04 \times 0.75}{0.75 \times 0.04 + 0.25 \times 0.07}$

12. Haha, yes. The latter question. Let me paste it here once again for easier reference

Suppose now I have two BIASED coins in two containers (4 coins in total).
Container 1's coins have a probability of L1 of getting heads and Container 2's coins have a probability of L2 of getting heads. L1 is not equal to L2.

Which will give a higher chance of getting two heads if I:
a) Select one container at random then toss the two coins in it
b) Toss one coin each from each container

Please guide me and give me hints. I want to come up with the solution myself!

For a start, this is about conditional probability, right?
Also, I think option A will give a higher chance, but I'm not sure if I'm correct.

Suppose, L1 is 0.9 and L2 is 0.4, by doing:
a) Pr1 = (0.9 * 0.9) * 0.5 = 0.405 | Pr2 = (0.4 * 0.4) * 0.5 = 0.08
b) Pr = 0.9 * 0.4 = 0.36 (< Pr1)

If L1 is 0.5 and L2 is 0.3,
a) Pr1 = (0.5 * 0.5) * 0.5 = 0.125 | Pr2 = (0.3 * 0.3) * 0.5 = 0.045
b) Pr = 0.5 * 0.3 = 0.15 (> Pr1)

After here, I'm stuck and unsure how to proceed next to justify my choice. Please help! ^^ Thanks.