Normal and Uniform Distribution, calculate $P(Y>X\mid X=x)$

308 Views Asked by At

Let $X$ and $Y$ be independent random variables distributed as $X \sim N(0,1)$ and $Y \sim \operatorname{Unif}(0,1)$.

(a) Find $P(Y > X\mid X = x)$.

(b) Use your answer in part (a) to compute $P(Y > X)$

I'm not sure where to start...

I think the joint density is

$$ f(x,y) = \frac{1}{\sqrt{2π}}e^{-x^2/2}, \quad 0<x<1, 0<y<1 $$

And do I just integrate that? If so from where, 0 to 1 on both integrals? I'm pretty lost with this and any help would be so appreciated. Apologies if it's not formatted correctly or if my attempt at an answer is plain stupid. I don't even really understand what part (a) means...

3

There are 3 best solutions below

1
On BEST ANSWER

$$ \Pr(Y>X\mid X=x) = \underbrace{\Pr(Y>x\mid X=x) = \Pr(Y>x)}_{\large\text{These are equal because of independence}} = \begin{cases} 1-x & \text{if } 0\le x\le 1, \\ 0 & \text{if }x>1, \\ 1 & \text{if } x<0. \end{cases} $$ Therefore $$ \Pr(Y>X\mid X) = \begin{cases} 1-X & \text{if } 0\le X\le 1, \\ 0 & \text{if } X>1, \\ 1 & \text{if } X<0. \end{cases} $$ $$ \Pr(Y>X) = \operatorname{E}(\Pr(Y>X\mid X)) = 1\cdot\Pr(X<0) + 0\cdot \Pr(X>1) + \int_0^1 (1-x) \varphi(x)\,dx $$ where $\varphi$ is the standard normal density.

$$ \int_0^1 (1-x)\varphi(x)\,dx = \int_0^1 \varphi(x)\,dx - \int_0^1 x\varphi(x)\,dx. $$ The value of the first integral is the probability that a standard normal random variable is between $0$ and $1$, and everybody knows that's about $0.34.$ The second integral admits a closed form, thus: $$ \frac 1 {\sqrt{2\pi}} \int_0^1 e^{-x^2/2} (x\, dx) = \frac 1 {\sqrt{2\pi}} \int_0^{1/2} e^{-u}\,du = \cdots. $$

3
On

HINT

Easier to think about it directly:

  • if $x \ge 1$ what is $\mathbb{P}[Y > X\mid X=x]$?
  • if $x \le 0$ what is $\mathbb{P}[Y > X\mid X=x]$?
  • if $x \in (0,1)$ what is $\mathbb{P}[Y > X\mid X=x]$?

For (b), recall the definition of conditional probability. The analog of $\mathbb{P}[X=x]$ in the continuous world is $$\lim_{\epsilon \to 0} \mathbb{P}[X \in (x-\epsilon,x+\epsilon)] = f_X(x)$$

1
On

Hint on a):

$$\Pr(Y>X\mid X=x)=\Pr(Y>x\mid X=x)=\Pr(Y>x)$$

The second equality because $X$ and $Y$ are independent.

Hint on b):

$$\Pr(Y>X)=\int \Pr(Y>X\mid X=x)f_X(x) \, dx$$ where $f_X$ denotes the PDF of $X$.