Let's try to do some inference tasks over the restaurant network in Fig 3.1. Let's say we want to find P(C). We know the following from the chain rule of probability:
Also, we know that the random variables L and Q are independent of each other if C is not observed. So, we can write the preceding equation as follows:
Now, we can see that we know the probability values involved in the product for the computation of P(C). We have the values of from the CPD of C, the values of P(l) from the CPD of L, and the values of P(q) from the CPD of Q. Summing up the product of these probabilities, we can easily find the probability of C.
We can also note that the computational cost for this computation would be , where represents the number of states of the variable X. We can see that in order to compute the probability of each state of C, we need to compute the product for each combination of states L and Q, and then add them together. This means that for each state of C, we have...