'Bayes Network Inference Calculation

I am quite new to inference for Baynes network

Harry installed a new burglar alarm at his home to detect burglary. The alarm reliably responds at detecting a burglary but also responds for minor earthquakes. Harry has two neighbors David and Sophia, who have taken a responsibility to inform Harry at work when they hear the alarm. David always calls Harry when he hears the alarm, but sometimes he got confused with the phone ringing and calls at that time too. On the other hand, Sophia likes to listen to high music, so sometimes she misses to hear the alarm. Here we would like to compute the probability of Burglary Alarm.

Given a graph of five nodes. B -> A, E -> A, A -> D, A -> S

enter image description here

B       P
True    0.002
False   0.998
E       P
True    0.001
False   0.999
B   E   P(A= True)  P(A= False)
True    True    0.94    0.06
True    False   0.95    0.04
False   True    0.31    0.69
False   False   0.001   0.999
A   P(D= True)  P(D= False)
True    0.91    0.09
False   0.05    0.95
A   P(S= True)  P(S= False)
True    0.75    0.25
False   0.02    0.98

Can you teach me how to work out the following inference?

P(+A | +S, -D)

P(+A | +S, +E)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source