Suppose we have the following probabilistic graphical model:
$L \rightarrow X, L \rightarrow Y, F \rightarrow Y, X \rightarrow D, Y \rightarrow D$.
That is, the joint is: $P(D,X,Y,L,F) = P(D|X,Y)P(X|L)P(Y|L,F)P(L)P(F)$.
Here $L,F,D$ are discrete, $X,Y$ are continuous random variables (having proper pdf's).
I want to compute $P(D=d,L=l | X=x, F=f)$. Note that we have already observed ($x$) for one of the continuous variables.
Here is my solution attempt so far:
$P(d,l | x, f) = \frac{P(d,l,x, f)}{P(x,f)}$ Let's ignore the denominator for now. The numerator:
$P(d,l,x,f) = \int_y P(d|x,y) P(x|l) P(y|l,f)P(l)P(f)$
Now, $P(x|l)$ and $P(y|l,f)$ should be zero because they are continuous variables. But we have already observed the value of X. So, I am not sure how to proceed from now on. My guess is that we should use the pdf's instead of probabilities:
$P(d,l,x,f) = \int_y P(d|x,y)\;f_{X|L}(x|l)\;f_{Y|L,F}(y|l,f)\;P(l)\;P(f)dy$
Is this correct?
If this is correct, then another question is how to compute this integral. Would the following work?
Sample a $y$ from $f_{Y|L,F}(Y|l,f)$, compute $P(d|x,y)$ and then compute $g(y) = P(d|x,y)\;f_{X|L}(x|l)\;P(l)\;P(f)$. Do this a large number of times and take the average of $g(y)$'s. ???
Any ideas, hints, directions would be highly appreciated.