In Probability and uniform distribution, the following equation is used:

$P(X_1>X_2) = \displaystyle \int_{0}^1 P(X_1>X_2 | X_2=x) f_{X_2}(x) dx$

How the equation is derived? Base on which definition or theorem?


It follows from conditioning on $X_2$. In the case when $X_2$ is a discrete random variable, we have

\begin{align}P(X_1>X_2) &= \sum_{x_2} P(X_1 > X_2, X_2=x_2)\\ &= \sum_{x_2} P(X_1>X_2 \mid X_2=x_2) P(X_2=x_2) \\ &= \sum_{x_2} P(X_1 > x_2) P(X_2=x_2). \end{align}

When $X$ is a continuous random variable, the idea is the same, but we replace $P(X_2=x_2)$ with the density of $X_2$, and replace the sum with an integral. This gives the expression you wrote in your question. There are some technical issues with doing this, but I think you are at a point where you can overlook that.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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