# Re: Bayesian story problem SPOILER WARNING: attempt at solution

From: John Stick (johnstick@worldnet.att.net)
Date: Sat Mar 29 2003 - 20:46:57 MST

Psy-kosh,

You had it right up to the last calculation: try reducing that fraction
again.

Psy-Kosh wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>
>
>>A couple of #SL4ers have asked me for this, so I'm posting it to
>>SL4-the-mailing-list:
>>
>>Suppose you have a large barrel containing a number of plastic
>>
>>
>eggs. Some
>
>
>>eggs contain pearls, the rest contain nothing. Some eggs are
>>
>>
>painted
>
>
>>blue, the rest are painted red. Suppose that 40% of the eggs are
>>
>>
>painted
>
>
>>blue, 5/13 of the eggs containing pearls are painted blue, and 20%
>>
>>
>of the
>
>
>>eggs are both empty and painted red. What is the probability that
>>
>>
>an egg
>
>
>>painted blue contains a pearl?
>>
>>As a check on your calculations, the likelihood that a red egg is
>>
>>
>empty,
>
>
>>divided by the likelihood that an egg contains a pearl, equals
>>approximately .51. To use this information in the problem, of
>>
>>
>course,
>
>
>>would be cheating.
>>
>>
>>
>
>Spoiler space:
>
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>.
>
>
>Given:
>
>P(B)=2/5
>
>P(B|P)=5/13
>
>P(~B,~P)=1/5
>
>We have
>
>1-P(B)=P(~B)=3/5
>
>We can subtract the third item from the fourth to get the probability
>that an egg contains a pearl and is red:
>
>P(~B)-P(~B,~P)=P(~B,P)=2/5
>
>Also we have the probability that an egg containing a pearl is red:
>
>1-P(B|P)=P(~B|P)=8/13
>
>Now, we are able to determine the total probability that an egg
>contains a pearl:
>
>P(~B|P)P(P)=P(~B,P) so P(P)=P(~B,P)/P(~B|P)=(2/5)/(8/13)
>
>P(P)=13/20
>
>So.... (Hail Bayes! All Hail Rationality! :)
>
>P(P|B)=P(B|P)P(P)/P(B)
>
>P(P|B)=(5/13)*(13/20)/(2/5)=1/10=10%
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.2.1-nr1 (Windows XP) - GPGOE 0.4.1
>
>iQCVAwUBPoZgqZzw44XQRmJ0AQI1pwP/VH+hhk37de1Keur9YACbCmS5xQCXNSu+
>qRL7SCFyT3yCpO8oKvl0ZvqrfORbrZ8ktiRX1OTYaibc0NeQjkpzOxh8Q17OEX+x
>l8LxpTd21MV+r8uq+irYdXahvYETgAC4/jcgzig5srgWXyJ/0n3Sc7ObAMEDcI3H
>lizDRUJfOQs=
>=DC4o
>-----END PGP SIGNATURE-----
>
>
>
>
>

This archive was generated by hypermail 2.1.5 : Wed Jul 17 2013 - 04:00:42 MDT