Suppose we have a joint distribution $P(D,X,L) = P(DX)P(XL)P(L)$. Here, D and L are discrete but X is a continuous random variable. I want to compute $P(D=d)$. How do I do this numerically? The fact that $X$ is continuous confuses me.
Take the 2minute tour
×
MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

I'm assuming that your "continuous" is actually "absolutely continuous", i.e. $X$ has a density. $$P(D=d) = E[P(D=dX)] = \int dx \ P(D=dX=x) f_X(x) = \int dx \sum_\ell \ P(D=dX=x) f_{XL}(x\ell) P(L=\ell)$$ where the sum is over the possible values of $L$, and $f_{XL}(x\ell)$ is the conditional density of $X$ given $L=\ell$. 

