COMP 130 Elements of Algorithms and Computation
Spring 2012

Bayes Theorem Example with Playing Cards

Consider the following set of cards:

What is the probability of drawing a card with a value less than 5, given that you already picked a heart, i.e.  P(<5 | Heart) = ?

Some observations:

The number of hearts with values less than 5 is

# of hearts < 6 = P(Heart | <5) * P(<5) =  2/3 * 3/12 = 1/6

The number of hearts with values greater of equal to 5 is

# hearts >= 5 = P(Heart | >=5) * P(>=5) =  4/9 * 9/12 = 1/3

Thus the probablility of a value < 5, given a heart is

P(<5 | Heart) = (# of hearts < 5)/ (# of hearts < 5 + # hearts >= 5) =   1/6/(1/6+ 1/3) = 1/3

 

Using Bayes' Theorem:

P(<5 | Heart) =  P(Heart | <5) * P(<5)/P(Heart) =   2/3 * (1/4)/(1/2) = 1/3

 

Notice how the experiment of first pulling a heart effectively reduces the size of the universe from 12 black or red cards to just 6 red cards.    The probability of getting a card less than 5 changes from 1/4 in the full universe to 1/3 in the reduced universe.