$X,Y$ independent r.v. uniformly distributed on $[0,1]$. Find $\mathbb{P}(Y\le \frac X2)$

1.7k Views Asked by At

I'm new to these concepts, I have two approaches wich gives the same result, but I don't know if they either are both right or not.

First: We must have $\mathbb{P}(Y=\frac X2)+\mathbb{P}(Y<\frac X2)+\mathbb{P}(Y>\frac X2)=1$. Since $X$ and $Y$ are unfiromly distributed, they are continuous, thus $\mathbb{P}(Y=\frac X2)=0$, which implies that $\mathbb{P}(Y>\frac X2)=\mathbb{P}(Y<\frac X2)=\frac12$ since uniformly distributed. Therefore $\mathbb{P}(Y\le\frac X2)=\mathbb{P}(Y=\frac X2)+\mathbb{P}(Y<\frac X2)=0+\frac12=\frac12$.

Second: The density function of a random variable uniformly distributed on $[a,b]$ is $f(x)=\frac1{b-a}$ for $a\le x\le b$ and $0$ otherwise. Hence on $[0,1]$ we have the density function $f(x,y)=1$. Since we are over the square $[0,1]^2$ in $\mathbb{R}^2$, we can integrate over the triangle with vertices $(0,0),(1,0),(1,\frac12)$, given by the intersection between the square and the area below the function $y=\frac x2$. So we have: $\mathbb{P}(Y\le\frac X2)=\int^1_0\int^{\frac x2}_01dydx=\int^1_0\frac x2dx=\frac 12$

Are these both right or what is wrong?

2

There are 2 best solutions below

0
On

First: We must have $\mathbb{P}(Y=\frac X2)+\mathbb{P}(Y<\frac X2)+\mathbb{P}(Y>\frac X2)=1$. Since $X$ and $Y$ are unfiromly distributed, they are continuos, thus $\mathbb{P}(Y=\frac X2)=0$, which implies that $\mathbb{P}(Y>\frac X2)=\mathbb{P}(Y<\frac X2)=\frac12$ since uniformly distributed.

The uniform distribution (iid between $X,Y$) does not entail any symmetry between $Y$ and $X/2$.


Second: The density function of a random variable uniformly distributed on $[a,b]$ is $f(x)=\frac1{b-a}$ for $a\le x\le b$ and $0$ otherwise. Hence on $[0,1]$ we have the density function $f(x,y)=1$. Since we are over the square $[0,1]^2$ in $\mathbb{R}^2$, we can integrate over the triangle with vertices $(0,0),(1,0),(1,\frac12)$, given by the intersection between the square and the area below the function $y=\frac x2$.

No integration is actually needed, since the density everywhere over the triangle is constant ($1$), and half the length times breadth is $1/4$.   So that is immediately the answer.

But anyway:

So we have: $\mathbb{P}(Y\le\frac X2)=\int^1_0\int^{\frac x2}_01dydx=\int^1_0\frac x2dx=\frac 12$

Correct until the last part.

$$\begin{align}\mathsf P(0\leq Y\leq X/2\leq 1/2) &=\int_0^1\int_0^{x/2}\,\mathrm d y\,\mathrm d x\\&=\int_0^1x/2\,\mathrm d x \\&= {\big[x^2/4\big]}_{x=0}^{x=1}\\&=1/4\\[3ex]\mathsf P(0\leq X/2\lt Y\leq 1)&=\int_0^{1/2}\int_0^{2y}\,\mathrm d x\,\mathrm d y+\int_{1/2}^1\int_0^{1}\,\mathrm d x\,\mathrm d y\\&=\int_0^{1/2}2y\,\mathrm d y+\int_{1/2}^1\mathrm dy\\&={\big[y^2\big]}_{y=0}^{y=1/2}+{\big[y\big]}_{y=1/2}^{y=1}\\&=(1/2)^2+(1-1/2)\\&=3/4\end{align}$$

0
On

$P(Y \leq X/2)=\int\limits_{0}^1 P(Y \leq X/2|X=x)f_X(x) dx=\int\limits_{0}^{1} x/2 dx=1/4$. You will have to fill in the gaps (this can be seen as the law of iterated expectation, how ?)