Marginalizing over discrete and continuous mixed variables [closed]

Suppose we have the following joint probability distribution:

$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 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.

-
 This question has been answered at stats.stackexchange.com/questions/29218/… – emrea May 28 '12 at 21:50 I removed the bounty, and have closed the question here. I hope that helps. – Eric May 28 '12 at 22:01

closed as off topic by EricMay 28 '12 at 22:02

Questions on Mathematics Stack Exchange are expected to relate to math within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.