Bayes’ Theorem with example

Example:Suppose in Karnataka, 51% of the adults are males. One adult is randomly selected for a survey involving credit card usage.

  1. Find the prior probability that the selected person is a male.
  2. It is later learnt that the selected survey subject was smoking a cigar. Also, 9.5% of males smoke cigars, whereas 1.7% of females smoke cigars (based on available data). Use this additional information to find the probability that the selected subject is a male.

Solution

Let us use the following notation:

M = male                                 M̅ = female (or not male)

C  = cigar smoker       C̅   = not a cigar smoker

 

  1. Before using the information given in part b, we know only that 51% of the adults in Karnataka are males, so the probability of randomly selecting an adult and getting a male is given by P(M) = 0.51.
  2. Based on the additional given information, we have the following:

P (M) = 0.51  because 51% of the adults are males.

P (M̅) = 0.49   because 49% of the adults are females (not males)

P (C│M) = 0.095        because 9.5% of the males smoke cigars (That is, the probability of getting someone who smokes cigars, given that the person is a male, is 0.095).

P (C│M̅) = 0.017 because 1.7% of the females smoke cigars (That is, the probability of getting someone who smokes cigars, given that the person is a female, is 0.017).

 

Let us now apply Bayes’ theorem by using the preceding formula with M in place of A, and C in place of B. we get the following result:

 

P (M). P(C│M)

P (M│C)     =     ————————————————

[P (M). P (C│M)] + [P (M̅). P (C│M̅)]

 

 

0.51* 0.095

=     ——————————————–

[0.51* 0.095] + [0.49* 0.017]

 

=  0.85329341

=  0.853

Leave a Reply

Your email address will not be published. Required fields are marked *