Find $P(X < Y)$ for $X$ uniform and $Y$ normal

508 Views Asked by At

Suppose $X$ is uniform in $[0, 1]$ and $Y$ is $N(0, 1)$, and they are independent. Find $P(X < Y )$.

Here's my attempt:

So since they are independent, the joint distribution is $f_{X,Y}(x,y) = 1\cdot\frac{1}{\sqrt{2\pi}}e^{\frac{-y^2}{2}}$ on $0 \leq x \leq 1$. So the answer should be the integral of the joint distribution over the area where $x < y$, which in this case is

$$\int_0^1\int_x^\infty\frac{1}{\sqrt{2\pi}}e^{\frac{-y^2}{2}}dydx$$

Is this correct? But if so, how do I evaluate this integral? Should I switch the order of integration? But in that case I would need two integrals, one for the case where $y < 1$ and another for $y > 1$. And the integral for the second case is still hard do calculate.

1

There are 1 best solutions below

4
On BEST ANSWER

Observe that $$\begin{align*} \Pr[X < Y] &= 1 - \Pr[X \ge Y] \\ &= 1 - \left(\Pr[Y \le 0] + \int_{y=0}^1 \Pr[X > Y \mid Y = y]f_Y(y) \, dy \right) \\ &= \frac{1}{2} - \int_{y=0}^1 (1-y) \frac{e^{-y^2/2}}{\sqrt{2\pi}} \, dy \\ &= \frac{1}{2} - \left( \Phi(1) - \Phi(0) - \frac{1}{\sqrt{2\pi}} \int_{y=0}^1 y e^{-y^2/2} \, dy \right) \\ &= 1 - \Phi(1) + \frac{1}{\sqrt{2\pi}} \left[ -e^{-y^2/2} \right]_{y=0}^1 \\ &= 1 - \Phi(1) + \frac{1 - e^{-1/2}}{\sqrt{2\pi}} \approx 0.315627 \end{align*}$$ where $\Phi(1) = \Pr[Y \le 1]$ is the CDF of the standard normal distribution at $1$.


If you have trouble following the above reasoning, we can still use your integral, which is correct: $$\int_{x=0}^1 \int_{y=x}^\infty \frac{e^{-y^2/2}}{\sqrt{2\pi}} \, dy \, dx = \int_{y=0}^1 \int_{x=0}^y \frac{e^{-y^2/2}}{\sqrt{2\pi}} \, dx \, dy + \int_{y=1}^\infty \int_{x=0}^1 \frac{e^{-y^2/2}}{\sqrt{2\pi}} \, dx \, dy.$$ All I have done here is interchanged the order of integration; in doing so, we must split the region of integration into a triangular piece and an infinite rectangular piece; i.e., $$(0 \le X \le 1) \cap (X < Y) \equiv (0 \le X \le Y \le 1) \cup (0 \le X \le 1 < Y).$$ The rest of the evaluation proceeds as follows: $$\Pr[X < Y] = \int_{y=0}^1 \frac{ye^{-y^2/2}}{\sqrt{2\pi}} \, dy + \int_{y=0}^1 \frac{e^{-y^2/2}}{\sqrt{2\pi}} \, dy.$$ This is just the result of performing the inner integration with respect to $x$. Now the first integral is simply $$\frac{1 - e^{-1/2}}{\sqrt{2\pi}},$$ and the second is again $\Phi(1) - \Phi(0) = \Phi(1) - 1/2 = 1 - \Phi(1)$.