# Q3(a) Bayesian-network conditional cough probability [10]

Subject: Intelligent Systems II

Exam: TEE

Reader: https://deep-learning-study-room.vercel.app/is2/#tee/papers/paper-2025-april/q3a

Canonical: https://deep-learning-study-room.vercel.app/read/is2/tee/papers/paper-2025-april--q3a/

Actual historical paper ·100 marks attempted /140 offered · Q1 compulsory + any four of Q2–Q7. Source defects and solution assumptions are explicitly identified.

**Question. Q3(a)** [10 marks · 2025-04-28]Swipe across the diagram to read its labels ↔

![Original graph: Smoking→Lung Cancer→Cough; Pneumonia→Cough and Pneumonia→Fever.](https://deep-learning-study-room.vercel.app/is2/fig/legacy25-bayes.7f566dbf34.svg)

Diagram: Original graph: Smoking→Lung Cancer→Cough; Pneumonia→Cough and Pneumonia→Fever.. Labels: Original smoking cancer pneumonia cough fever Bayesian network | Smoking S | Lung cancer C | Cough Co | Pneumonia P | Fever F

Original graph: Smoking→Lung Cancer→Cough; Pneumonia→Cough and Pneumonia→Fever.

| Smoking S | P(S) |
| --- | --- |
| T | 0.3 |
| F | 0.7 |

| Smoking S | P(C=T|S) | P(C=F|S) |
| --- | --- | --- |
| T | 0.1 | 0.9 |
| F | 0.01 | 0.99 |

| Pneumonia P | P(P) |
| --- | --- |
| T | 0.3 |
| F | 0.7 |

| C | P | P(Co=T|C, P) | P(Co=F|C, P) |
| --- | --- | --- | --- |
| T | T | 0.95 | 0.05 |
| T | F | 0.8 | 0.2 |
| F | T | 0.7 | 0.3 |
| F | F | 0.1 | 0.9 |

| P | P(Fever=T|P) | P(Fever=F|P) |
| --- | --- | --- |
| T | 0.9 | 0.1 |
| F | 0.01 | 0.99 |

Given the above tables for the Bayesian network, calculate Probability of a person having cough given he doesn’t have lung cancer but Smokes.

### Answer

### Given

Evidence: C=F (no lung cancer), S=T (smokes). Query: Co=T. Pneumonia is not observed; sum over its two states.

### To find

P(Co=T | C=F, S=T).

### Formula and why



$$
P(Co\mid\neg C,S)=\sum_{p\in\{T,F\}}P(Co\mid\neg C,S,P=p)P(P=p\mid\neg C,S)
$$



The network says cough depends on its parents C and P. Once they are known, smoking provides no additional direct information about cough. The pneumonia root is independent of S and C in this network when no descendant evidence such as cough/fever is conditioned on.

### Step 1. Write the network factorization



$$
P(S,C,P,Co,F)=P(S)P(C\mid S)P(P)P(Co\mid C,P)P(F\mid P)
$$



This factorization expresses the model, not a general medical truth. Fever is unobserved and its two conditional probabilities sum to 1.

### Step 2. Select the correct cough rows

| Hidden pneumonia state | Cough probability with C=F | Pneumonia weight |
| --- | --- | --- |
| P=T | P(Co=T|C=F, P=T)=0.70 | 0.30 |
| P=F | P(Co=T|C=F, P=F)=0.10 | 0.70 |

Do not use 0.95 or 0.80: those rows assume lung cancer is present, which contradicts the given evidence.

### Step 3. Multiply each conditional probability by its weight



$$
0.70\times0.30=0.21,\qquad0.10\times0.70=0.07
$$



### Step 4. Add the mutually exclusive pneumonia cases



$$
P(Co=T\mid C=F,S=T)=0.21+0.07=\boxed{0.28}
$$



**Final answer:28%.** We do not multiply the final answer byP(smoking)=0.3: smoking is already a condition, not an additional joint event.

### Step 5. Verify using joint-over-evidence



$$
P(\neg C,S)=0.9\times0.3=0.27
$$





$$
P(Co,\neg C,S)=0.27\times0.28=0.0756
$$





$$
P(Co\mid\neg C,S)=0.0756/0.27=0.28
$$


