Suppose I have a discrete random variable $S$. Now further suppose that I have a random variable $X$ which is a continuous random variable on the real line. I wanted to express the p.m.f. $P[S=s]$ for $S$ using the expression: \begin{equation} P[S=s]= \int_{\mathbb{R}}P[S=s\mid x]P[x\mid s]dx \end{equation}

A professor I spoke to mentioned that if both $S$ and $X$ were discrete, this expression would have been correct, however, given that $X$ is a continuous random variable, the way I have expressed it implies a zero probability (I suppose because of $P[x\mid s]$). I was told to express this correctly, I have to express it in terms of probability measures.

I have been spending the better part of yesterday on Shiryaev's probability book and on probability measures and Lebesgue integrals; but while I know he is correct about my incorrect expression, I am not sure exactly how this needs to be expressed in terms of probability measures.

  • $\begingroup$ Not sure what you're trying do there. But I guess you need conditional density. $\endgroup$ Commented Jul 3, 2023 at 8:58

1 Answer 1


It sounds like you are trying to write the law of total probability. For a discrete random variable $S$ and a continuous conditioning random variable $X$ with marginal density $f_X$, you can write this as:

$$\mathbb{P}(S=s) = \int \limits_\mathbb{R} \mathbb{P}(S=s|X=x) f_X(x) \ dx.$$

Observe that the integrand here consists of the conditional probability mass for $S|X$ multiplied by the marginal density of $X$ (not the conditional density). I see no reason you would need to write this in terms of the probability measures or the Lebesgue integral (since you know that $X$ is continuous here), but if you really want to do so then you can take the probability measure $\mu_X$ or the distribution function $F_X$ for $X$ and write the relevant result as:

$$\mathbb{P}(S=s) = \int \limits_\mathbb{R} \mathbb{P}(S=s|X=x) \ d F_X(x) = \int \limits_\mathbb{R} \mathbb{P}(S=s|X=x) \ d \mu_X.$$

  • $\begingroup$ Hi Ben. You are correct. However, I noticed I made an error in formulating the question, which explains the unnecessary conditioning in the second term. My intended question was, suppose there $S$ AND $I$ are the discrete random variables, and I wish to express $P[S=s\mid I=i]=\int_{\mathbb{R}}P[S=s\mid I=i,X=x]P[X=x \mid I=i]dx$, where as before $X$ is continuous. How would the formulation would this specific case be? $\endgroup$
    – Carl
    Commented Jul 3, 2023 at 23:45
  • $\begingroup$ Probably best to ask this as a new question. $\endgroup$
    – Ben
    Commented Jul 4, 2023 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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