Professional Documents
Culture Documents
13-LIKELIHOOD, PRIOR, POSTERIOR, MARGINAL Probability, Problems Solved Appliying Bayes Rule-11-03-2024
13-LIKELIHOOD, PRIOR, POSTERIOR, MARGINAL Probability, Problems Solved Appliying Bayes Rule-11-03-2024
• Heads = 1 Tails = 0
• Random variable.
Wet ~Wet
Rain 0.6 0.1
~Rain 0.2 0.1
Atomic event P
Cavity = false Toothache = false 0.8
Cavity = false Toothache = true 0.1
Cavity = true Toothache = false 0.05
Cavity = true Toothache = true 0.05
P(Cavity, Toothache)
Cavity = false Toothache = false 0.8
Cavity = false Toothache = true 0.1
Cavity = true Toothache = false 0.05
Cavity = true Toothache = true 0.05
P(Cavity) P(Toothache)
Cavity = false ? Toothache = false ?
Cavity = true ? Toochache = true ?
P(A B)
P(A) P(B)
P(Cavity) P(Toothache)
Cavity = false 0.9 Toothache = false 0.85
Cavity = true 0.1 Toothache = true 0.15
P(toothache)
= 0.016+0.064
0.108 + 0.012 + 0.016 + 0.064
= 0.4
P( A, B) P( A | B) P( B) P( B | A) P( A)
P ( B | A) P ( A)
• Therefore, P( A | B)
P( B)
• Why is this useful?
• Can get diagnostic probability P(cavity | toothache) from causal
probability P(toothache | cavity)
• Can update our beliefs based on evidence
• Important tool for probabilistic inference
BMEE407L Module <4> 33
Question 1: Three individuals A, B, and C have applied for a job at a private firm. Their chances of selection are in the
ratio 1:2:4. The probabilities that A, B, and C can bring about changes to boost the company's profits are 0.8, 0.5, and 0.3,
respectively. If the desired change doesn't occur, find the probability that it is due to the appointment of C.
Solution: Let's denote the following events:
E1: A gets selected, E2: B gets selected and E3: C gets selected
A: Changes were introduced, but no profit occurred
Now, we can calculate the following probabilities:
P(E1) = 1/(1+2+4) = 1/7, P(E2) = 2/7 and P(E3) = 4/7
P(A|E1) = P(Profit didn't occur due to changes introduced by A)
= 1 – P(Profit occurred due to changes introduced by A) = 1 – 0.8 = 0.2
P(A|E2) = P(Profit didn't occur due to changes introduced by B)
= 1 – P(Profit occurred due to changes introduced by B) = 1 – 0.5 = 0.5
Similarly, P(A|E3) = 1- 0.3 =0.7
We need to find the probability of profit not occurring due to the selection of C.
Thus, the required probability is 0.7.
13-03-2024 BMEE407L 34
Question 2:
In a certain neighborhood, 90% of children fell ill due to the flu and 10% due to measles, with no other diseases reported.
The probability of observing rashes for measles is 0.95, and for the flu is 0.08. If a child develops rashes, find the
probability of the child having the flu.
Solution: Let's denote the following events:
F: Children with the flu, M: Children with measles, R: Children showing the symptoms of a rash
We can calculate the following probabilities:
P(F) = 90% = 0.9
P(M) = 10% = 0.1
P(R|F) = 0.08
P(R|M) = 0.95
• To classify a new email--it matches against the spam model and the
non-spam model and outputs the best match