# Distribution of a conditional random variable defined from two independent random variables

Let $$X$$ and $$Y$$ be independent real-valued random variables with distributions $$f_X$$ and $$f_Y$$ respectively.

Consider a new random variable $$Z=(X\mid X>Y)$$.

It is defined as $$Z=X$$ on a subset $$\Omega':=\{\omega\mid X(\omega)>Y(\omega)\}$$ of the sample space $$(\Omega,P)$$, and the probability measure on $$\Omega'$$ is normalized as $$P'(A)=P(A)/P(\Omega')$$ for measurable $$A\subset\Omega'$$.

How can I describe the distribution of $$Z$$?

• Don't you mean $P'(A)=P(A)/P(\Omega')$ (accent on $\Omega$). We have $P(\Omega)=1$ by definition. – drhab Jun 6 at 11:04
• Oh thanks, I will fix it – user680089 Jun 6 at 11:27

We can directly describe $$Z$$ using a pdf $$f_Z$$. To do this, notice that,

$$P(\Omega’) = \int_{\mathbb{R}}\int_{(-\infty,x)}f_X(x)f_Y(y)\,dy \,dx$$

If $$P(\Omega’)=0$$, then $$Z$$ is not well-defined. Otherwise,

$$P(Z\in A)= \frac{\int_A \int_{(-\infty,x)} f_X(x)f_Y(y)\,dy\,dx}{P(\Omega’)}.$$

Differentiating and applying the fundamental theorem of calculus yields,

$$f_Z(z) = f_X(z)\frac{\int_{(-\infty,z)} f_Y(y)\,dy}{\int_{\mathbb{R}}\int_{(-\infty,x)} f_X(x)f_Y(y)\, dy\, dx}$$