# Distribution function of truncated random variable

Let, X,Y are two independent RVs following $U(0,1)$. Let, $W=XI_{\{Y\leq X^2\}}$, where $I_{A}$ denotes the indicator function on the set $A$. Find out the CDF(Cumulative Distribution Function) of W.

Ans:

$P(W\leq w)=P(X\leq w, Y\leq X^2)+P(Y\geq X^2)=P(\sqrt{Y}\leq X \leq w )+P(X^2 \leq Y)$

Now, $P(\sqrt{Y}\leq X \leq w )=\int_{0}^{1}(\int_{\sqrt{y}}^{w} 1 dx) 1 dy=w-\frac{2}{3}$.

Again, $P(X^2 \leq Y)=\int_{0}^{1}(\int_{0}^{\sqrt{y}} 1 dx) 1 dy=\frac{2}{3}$.

Therefore, $P(W\leq w)=w$.

Is it correct?

• Could you explain the reasoning behind your answer? In particular, why do you add in $P(Y\ge X^2)$? – whuber Aug 23 '18 at 18:54
• Best to write the second term as $$\mathbb{P}(W \leq w, Y \geq X^2)=\mathbb{P}(0 \leq w, Y \geq X^2)=\boldsymbol 1_{\{w\geq0\}}\mathbb{P}(Y \geq X^2)$$ – Rohit Arora Aug 23 '18 at 22:16

Your calculation of $P(X\leq w, Y\leq X^2)=P(\sqrt{Y}\leq X \leq w )$ is incorrect; it returns a negative probability when $w=0$. You can write the event $\{X\leq w, Y\leq X^2\}$ as $\{(X,Y)\in A\}$ where $A$ is the region in the $(x,y)$ plane bounded by $y=x^2$, $y=0$ and $x=w$. Visualizing the region $A$ will give you the right limits for the double integral: $$P (X\leq w, Y\leq X^2)=\iint_A1\,dy\,dx=\text{Area of A}=\int_{x=0}^w\left(\int_{y=0}^{x^2}1\,dy\right)dx.$$