MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose we have a joint distribution $P(D,X,L) = P(D|X)P(X|L)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.

share|cite|improve this question
A little bit more complicated version of this problem is at…. Comments/answers needed. – eakbas May 26 '12 at 2:15
up vote 1 down vote accepted

I'm assuming that your "continuous" is actually "absolutely continuous", i.e. $X$ has a density.

$$P(D=d) = E[P(D=d|X)] = \int dx \ P(D=d|X=x) f_X(x) = \int dx \sum_\ell \ P(D=d|X=x) f_{X|L}(x|\ell) P(L=\ell)$$

where the sum is over the possible values of $L$, and $f_{X|L}(x|\ell)$ is the conditional density of $X$ given $L=\ell$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.