B = battery is charged
M = arm moves
L = object is liftable
G = gauge reads that battery is charged
What is P(~g, ~b, ~m, l) ?
P(~g, ~b, ~m, l) = P(~g|~b) P(~m|~b,l) P(~b) P(l) (Eq. 1)
= (0.9) (1) (0.05) (0.7) (Eq. 2)
= 0.63/20 = 0.0315
(Eq. 1) comes from the chain rule and the conditional dependencies
in the graph of the Bayes network:
P(node|nondescendents(node), parents(node)) = P(node|parents(node))
(Eq. 2) is filled in from the Conditional Probability Tables (CPTs)
When asked to calculate "the probability that the battery is low given the observer's report," this requires computing both
Note: you do not have to implement the general algorithm, just solve the specific problem at hand.
An example Monte Carlo program (using rejection sampling) is provided in the Lecture#18 eHandout.
Technically, you don't have to perform rejection sampling here because there is no evidence (i.e., every sample is consistent with the evidence). So, you really only have to do "direct sampling" for the particular atomic event given.