Professional Documents
Culture Documents
55 PM
Since a bayesian network is nothing but a directed graph, from each edge we can have a maximum
of N-1 edges. So, the maximum number of edges is n*(n-1) = n^2 -1.
2.
Part 1 :
P(Lungcancer|Smoker) = P(old)*P(lungcancer|old^smoker) +P(~old)*P(lungcancer|~old^smoker) =
0.2 * 0.3 + 0.8* 0.1 = 0.06 + 0.08 = 0.14
Part 2:
P(TUBERCULOSIS) = P(TUBERCULOSIS|old)*P(old) + P(TUBERCULOSIS|~old)*P(~old)
= 0.05 * 0.2 + 0.8* 0.1
= 0.09
P(blood|smoker) = P(b|L^TUBERCULOSIS)*P(L|S)*P(TUBERCULOSIS) + P(b|
~L^TUBERCULOSIS)*P(~L|S)*P(TUBERCULOSIS) +
P(b|L^~TUBERCULOSIS)*P(L|S)*P(~TUBERCULOSIS) + P(b|~L^~TUBERCULOSIS)*P(~L|
S)*P(~TUBERCULOSIS)
= 1*0.14*0.09 + 0.86*0.09*0.8 + 0.14*0.91*0.9 + 0.86*0.91*0.01
=0.197
Part 3:
P(TUBERCULOSIS | old ^ smoker) = 0.05
P(L | old ^ smoker) = 0.3
P ( blood | L ^ old ^ smoker ) = P(blood|L^T^old^smoker) * P (T|old^smoker^L) + P(blood|
L^~T^old^smoker) * P (~T|old^smoker^L)
= 1*0.05 + 0.9*0.95 = 0.905
P ( L | blood ^ old ^ smoker) = P ( blood | L ^ old ^ smoker ) * P(L | old ^ smoker) / P(blood|old ^
smoker)
= 0.905 * 0.3 / 0.306 = 0.887
Q3)
. For each of the networks given in Figure 1 (a,b), do the following statements hold? Please explain
your reasoning.
a) A⊥C| blood, D
b) blood⊥D| A, C
Fig 1.a: A⊥C|blood,D :True. All the paths are inactive between A and C. blood⊥D|A,C : False.
Once C is observed the path between blood and D is active
Fig 1.b: A⊥C|blood,D : False. There is an active path between A and C once blood and D are
observed. blood⊥D|A,C : True. All the paths between A and C are inactive.
4. Construct two different Bayesian network which encode exactly the following conditional
independence assumptions
A⊥C | blood
A⊥D | blood
C⊥D | blood
i) Assume that these samples came from performing Prior Sampling, calculate the sample estimate
of P(+c)
ii) Which samples would not be used when doing Rejection sampling for the task estimating P(+c |
+a,-d) . What is the sample of estimate of P(+c | +a,-d)
b) Using Likelihood Weighting Sampling to estimate P(-a | +b,-d) the following samples were
obtained. Calculate the weight of each sample