In a network B→A←E (burglary, alarm, earthquake), P(B=1)=0.01 and P(E=1)=0.02. The alarm probabilities are P(A=1∣B=1,E=1)=0.95, P(A=1∣B=1,E=0)=0.94, P(A=1∣B=0,E=1)=0.29 and P(A=1∣B=0,E=0)=0.001. What are P(B=1∣A=1) and P(B=1∣A=1,E=1), and why do they differ?

Probabilistic models, Bayesian networks
Level L3 Intermediate. Length Long. Nature Mat Mathematical.

What's being asked

Whether you can do exact inference by enumeration and explain explaining away from the numbers.

Key idea

Use P(B∣A)∝∑EP(B)P(E)P(A∣B,E). A collider becomes dependent once it, or its descendant, is observed, so learning E=1 lowers the belief in B.

Steps

  1. Joint: P(B,E,A)=P(B) P(E) P(A∣B,E) from the graph, so B⊥E a priori.
  2. P(B=1,A=1)=0.01 [ 0.02⋅0.95+0.98⋅0.94 ]=0.01⋅0.9402=0.009402.
  3. P(B=0,A=1)=0.99 [ 0.02⋅0.29+0.98⋅0.001 ]=0.99⋅0.00678=0.006712.
  4. So P(A=1)=0.016114 and P(B=1∣A=1)=0.009402/0.016114=0.583.
  5. Now also observe E=1. P(B=1,E=1,A=1)=0.01⋅0.02⋅0.95=0.000190 and P(B=0,E=1,A=1)=0.99⋅0.02⋅0.29=0.005742.
  6. P(B=1∣A=1,E=1)=0.000190/(0.000190+0.005742)=0.032.
  7. Interpretation: the alarm raises the belief in a burglary from 0.01 to 0.58. Learning that an earthquake occurred gives a competing explanation, so the belief falls to 0.032. B and E are independent a priori but dependent given A.

Common mistakes

How long your answer should be

Half a page to a page, with the two posterior calculations.

Last checked on 4 December 2026.

Read this

Previous in Probabilistic models: The unnormalised density p~(θ)=θ4(1−θ)2 on (0,1) is a Beta(5,3) density. What is its Laplace approximation, and how does its variance compare with the exact one?
Next in Probabilistic models: A Bayesian network has a root X0 and n children X1,…,Xn, with arrows X0→Xi, all variables binary. To compute P(X1) with no evidence, compare the cost of eliminating X0 first against eliminating Xn,…,X2 first. What is the induced width in each case?