How to calculate an intersection in bayesian network

96 Views Asked by At

I was trying to solve this question, but i don't know how to proceed from there. And i am not sure how to compute $P(A|X_1,X_2,\neg X_3)$ or $P(A \cap X_1\cap X_2)$. It seems like i don't understand something fundamentally important about Bayesian Belief networks.

The Question

Given the following information, Calculate $P(A|X_1,X_2,\neg X_3 )$and $P(X_3|X_1)$

  • $P(A) = 0.5$
  • $P(X_i|A) = 0.8$
  • $P(X_i| \neg A) = 0.4$

Network visualization

Solution for $P(A|X_1,X_2,\neg X_3)$

$$P(A,X_1,X_2, X_3) = P(A)\times P(X_1|A)\times P(X_2|A)\times P(X_3|A)$$ $$P(A|X_1,X_2,\neg X_3) = $$

Solution for $P(X_3|X_1)$

$$P(X_3|X_1) = \frac{P(X_1\cap X_3)}{P(X_1)} $$

$$= \frac{P(A \cap X_1\cap X_3) + P(\neg A \cap X_1\cap X_3)}{P(A\cap X_1)+ P(\neg A\cap X_1)} $$ $$= \frac{P(A \cap X_1\cap X_3) + P(\neg A \cap X_1\cap X_3)}{P(X_1|A)\times P(A)+ P(X_1|\neg A)\times P(\neg A)}$$

$$= \frac{P(A \cap X_1\cap X_3) + P(\neg A \cap X_1\cap X_3)}{0.8\times 0.5+ 0.4\times 0.5}$$ $$= \frac{P(A \cap X_1\cap X_3) + P(\neg A \cap X_1\cap X_3)}{0.6}$$

1

There are 1 best solutions below

0
On

This notation with commas really confuses me. But I think they are the same.

$P(A \cap B) = P(A, B)$

Solution for $P(A|X_1,X_2,\neg X_3)$

$$P(A,X_1,X_2, X_3) = P(A)\times P(X_1|A)\times P(X_2|A)\times P(X_3|A)$$ $$P(A|X_1,X_2,\neg X_3) = \frac{P(A, X_1, X_2, \neg X_3)}{P( X_1, X_2, \neg X_3)}$$ $$= \frac{P(A)\times P(X_1|A)\times P(X_2|A)\times P(\neg X_3|A)}{P(X_1|A)\times P(X_2|A)\times P(\neg X_3|A)}$$ $$= \frac{0.5\times 0.8\times 0.8\times 0.2}{0.8\times 0.8\times 0.2}=0.5$$

Solution for $P(X_3|X_1)$

$$P(X_3|X_1) = \frac{P(X_1\cap X_3)}{P(X_1)} $$

$$= \frac{P(A \cap X_1\cap X_3) + P(\neg A \cap X_1\cap X_3)}{P(A\cap X_1)+ P(\neg A\cap X_1)} $$ $$= \frac{P(A \cap X_1\cap X_3) + P(\neg A \cap X_1\cap X_3)}{P(X_1|A)\times P(A)+ P(X_1|\neg A)\times P(\neg A)}$$

$$= \frac{P(A \cap X_1\cap X_3) + P(\neg A \cap X_1\cap X_3)}{0.8\times 0.5+ 0.4\times 0.5}$$ $$= \frac{P(A \cap X_1\cap X_3) + P(\neg A \cap X_1\cap X_3)}{0.6}$$ $$= \frac{P(A)\times P(X_1|A)\times P(X_3|A) + P(\neg A)\times P(X_1|\neg A)\times P(X_3|\neg A)}{0.6}$$ $$\frac{0.5 \times 0.8\times 0.8 + 0.5 \times 0.4\times 0.4}{0.6} = \frac{0.32 + 0.08}{0.6} = \frac{0.40}{0.6} = 0.\overline 6$$