Medical Diagnosis with Two Features
1. A disease prediction model uses two symptoms 𝑆1 and 𝑆2 .
𝑃(𝐷) = 0.1 and 𝑃(𝐷𝑐 ) = 0.9
𝑃(𝑆1 |𝐷) = 0.8 and 𝑃(𝑆2 |𝐷) = 0.7
𝑃(𝑆1 |𝐷𝑐 ) = 0.2 and 𝑃(𝑆2 |𝐷𝑐 ) = 0.1
Assuming conditional independence, calculate: 𝑃(𝐷 ∣ 𝑆1 , 𝑆2 ).
Advanced Spam Classification
2. An email classifier has three classes:
S: Spam
P: Promotion
N: Normal
The priors are:
𝑃(𝑆) = 0.40, 𝑃(𝑃) = 0.35, 𝑃(𝑁) = 0.25
For an email containing the words 𝑤1, 𝑤2 , 𝑤3 :
|𝐶𝑙𝑎𝑠𝑠|𝑃(𝑤1 ∣ 𝐶)|𝑃(𝑤2 ∣ 𝐶)|𝑃(𝑤3 ∣ 𝐶)|
|---|---:|---:|
| Spam | 0.8 | 0.7 | 0.6 |
| Promotion | 0.6 | 0.8 | 0.5 |
| Normal | 0.1 | 0.2 | 0.1 |
Assuming conditional independence, classify the email.
Fraud Detection with Three Features
3. A bank has:
𝑃(𝐹𝑟𝑎𝑢𝑑) = 0.02 and 𝑃(𝐿𝑒𝑔𝑖𝑡𝑖𝑚𝑎𝑡𝑒) = 0.98
For a transaction:
|Feature|𝑃(𝐹𝑖 ∣ 𝐹𝑟𝑎𝑢𝑑)|𝑃(𝐹𝑖 ∣ 𝐿𝑒𝑔𝑖𝑡𝑖𝑚𝑎𝑡𝑒)|
|---|---:|---:|
| International transaction | 0.80 | 0.15 |
| High amount | 0.70 | 0.10 |
| Unusual location | 0.60 | 0.05 |
Calculate the probability that the transaction is fraudulent.
4. Suppose: 𝑃(𝐶1 ) = 0.30, 𝑃(𝐶2 ) = 0.70
For an observed feature vector X:
𝑃(𝑋 ∣ 𝐶1) = 0.8
𝑃(𝑋 ∣ 𝐶2) = 0.2
Calculate the posterior probabilities.