Week 2 Conditional Probability PDF
Week 2 Conditional Probability PDF
Week 2 Conditional Probability PDF
phenomena,
• Conditional Probability
• Bayes’Theorem
• Independence
Toy Example
• Examples
• 5-year survival probability of a colorectal cancer
patient given that his age is between 55-64 and he
has a Chinese background.
Notation
Prior Probability
≠
Probability that David has colon cancer given
that he has a Chinese background.
Conditional Probability
𝑃𝑃(𝐴𝐴 ∩ 𝐵𝐵)
𝑃𝑃(𝐴𝐴|𝐵𝐵) =
𝑃𝑃(𝐵𝐵)
Conditional Probability
Venn diagram
B
Conditional Probability
Note that
𝑃𝑃(𝐴𝐴 ∩ 𝐵𝐵)
𝑃𝑃(𝐴𝐴|𝐵𝐵) =
𝑃𝑃(𝐵𝐵)
implies:
𝑃𝑃 𝐴𝐴 ∩ 𝐵𝐵 = 𝑃𝑃(𝐵𝐵 ∩ 𝐴𝐴)
𝑃𝑃(𝐴𝐴 ∩ 𝐵𝐵) = 𝑃𝑃(𝐴𝐴|𝐵𝐵) 𝑃𝑃(𝐵𝐵)
Common Mistake:
✗
Conditional Probability
Example
Experiment : pick one card from a deck
Bayes’ theorem
𝑃𝑃(𝑩𝑩|𝑨𝑨𝒊𝒊 ) 𝑃𝑃(𝑨𝑨𝒊𝒊 )
𝑃𝑃(𝑨𝑨𝒊𝒊 |𝑩𝑩) =
𝑃𝑃(𝑩𝑩|𝑨𝑨𝟏𝟏 )𝑃𝑃(𝑨𝑨𝟏𝟏 ) + 𝑃𝑃(𝑩𝑩|𝑨𝑨𝟐𝟐 )𝑃𝑃(𝑨𝑨𝟐𝟐 )+ . . . +𝑃𝑃(𝑩𝑩|𝑨𝑨𝒏𝒏 )𝑃𝑃(𝑨𝑨𝒏𝒏 )
Bayes’ Theorem
𝑃𝑃(𝑩𝑩|𝑨𝑨𝒊𝒊 ) 𝑃𝑃(𝑨𝑨𝒊𝒊 )
𝑃𝑃(𝑨𝑨𝒊𝒊 |𝑩𝑩) =
𝑃𝑃(𝑩𝑩|𝑨𝑨𝟏𝟏 )𝑃𝑃(𝑨𝑨𝟏𝟏 ) + 𝑃𝑃(𝑩𝑩|𝑨𝑨𝟐𝟐 )𝑃𝑃(𝑨𝑨𝟐𝟐)+ . . . +𝑃𝑃(𝑩𝑩|𝑨𝑨𝒏𝒏)𝑃𝑃(𝑨𝑨𝒏𝒏 )
Bayes’ Theorem
B
A1 A2 A3
A Quick Example
• A NUS student can be a graduate from JC or Poly or Others.
• Each student can be a BIZ student or non-BIZ student
Pr 𝐵𝐵𝐵𝐵𝐵𝐵 = Pr 𝐵𝐵𝐵𝐵𝐵𝐵 and 𝐽𝐽𝐽𝐽 + Pr 𝐵𝐵𝐵𝐵𝐵𝐵 and 𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 + Pr 𝐵𝐵𝐵𝐵𝐵𝐵 and 𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂
Bayes’ Theorem on
Diagnostic Test
Sensitivity = the probability that a person tests positive if the disease is present
= Pr(test positive | has the disease)
Specificity = the probability that a person tests negative if the disease is absent
= Pr(test negative| disease absent)
Bayes’ Theorem
Joint Marginal
probabilities Probabilities
Probability Table
• Let A1, A2 mutually exclusive and collectively exhaustive
events. Likewise for B1, B2.
+ =
+
+
= + =
=
+ =
Bayes’ Theorem
BC = woman (at 40) has breast cancer P( B C) = 0 .0 1
NBC = woman (at 40) does not have breast cancer
BC NBC
PM
NPM
1
Bayes’ Theorem
PM = woman has a positive mammogram P(PM|BC) = 0.80
P(PM|NBC) = 0.096
BC NBC
PM
NPM
1
Bayes’ Theorem
Now that we have completed the probability
table below, we can answer the question: P(BC|PM) =
BC NBC
PM
NPM
P(D | C) = P(D)=1/13
Independent Events