MODULE -5
• BAYE’S THEOREM AND IT’S USE
• WUMPUS WORLD REVISITED
PROBABILITY
• INDEPENDENT PROBABILITY: Independent Probability refers to the
probability of two or more events occurring where the occurrence of
one event does not affect the occurrence of the other(s).
EXAMPLE: Tossing two fair coins:
Let A = “First coin is Heads” and B = “Second coin is Heads”
These are independent because the outcome of one toss does not
affect the other.
P(A)=1/2=0.5 P(B)=1/2=0.5
PROBABILITY
• DEPENDENT PROBABILITY: Dependent probability refers to the
probability of two or more events where the occurrence of one event
does affect the occurrence of the other.
EXAMPLE: A bag has 3 red and 2 green balls.
Event A: Picking a green ball first.
Event B: Picking a green ball second without replacing the first ball.
EVENT A EVENT B
P(A)=2/5 P(B|A)=1/4
• Conditional probability: Conditional Probability is the probability of an
event occurring given that another event has already occurred.
• If A and B are two events, then the conditional probability of B given A
is denoted by:
P(B|A)= P(A ∩ B) / P(A) , provided P(A)>0
•It tells us how likely event B is if we already know that A has
occurred.
•Used in dependent probability situations.
BAYE’S RULE :
• P(a ∩ b) = P(a | b)P(b) and P(a ∩ b) = P(b | a)P(a)
ÞP(b | a) = (P(a | b)P(b))/(P(a)) BAYE’s RULE
\
• SIMPLE CASE
• COMBINED CASE
APPLYING BAYE’S RULE: SIMPLE
CASE
Bayes’ Rule Formula:
P(Cavity|Toothache) = P(Toothache|Cavity).P(Cavity)/P(Toothache)
Where:
P(Cavity|Toothache): Probability of cavity given toothache
P(Toothache∣Cavity): Likelihood of having toothache if there’s a cavity
P(Cavity): Prior probability of having a cavity
P(Toothache): Total probability of having a toothache
PATIENTS REPORT: THEN:
P(Cavity)=0.2
P(Toothache∣Cavity)=0.8
P(Toothache∣¬Cavity)=0.1
P(¬Cavity)=0.8
CONCLUSION: The patient has about a 67% chance of having a cavity given the toothache.
APPYLING BAYE’S RULE: COMBINED
CASE
What if we have more than one piece of evidence (e.g., toothache and probe
catching)??
Þ Computing P(Cause | Evidence1 ∧ Evidence2 ∧ ... ∧ Evidencen) directly using Bayes' rule requires
knowing joint probabilities of all combinations. This approach requires 2ⁿ values for n binary
symptoms — not practical for large n.
If symptoms are conditionally independent given a cause (like a cavity), we can
break the complex joint probability into smaller, simpler parts.
FORMULA:
P(Cavity∣Toothache∧Catch)=α⋅P(Toothache∣Cavity)⋅P(Catch∣Cavity)⋅P(Cavity)
FLOWCHART : CONDITIONAL
INDEPENDENCY
CAVITY
TOOTHACHE CATCH