Let $X\sim \exp(\lambda=1)$ and $Y \sim U(1,2)$ two independent random variables; what is the joint distribution function? Compute $P(X>Y)$

Let $$X\sim \exp(\lambda=1)$$ and $$Y \sim U(1,2)$$ two independent random variables; what is the joint distribution function? Compute $$P(X>Y)$$

I started by calculating:

$$f(x) = \begin{cases} e^{-x} & x\geq 0\\ 0 &x < 0 \end{cases}$$

$$f(y) = \begin{cases} 1 & 1\leq y\leq 2\\ 0 & \text{otherwise} \end{cases}$$

Now I am not sure about the joint density. I do know that the fact that X,Y are independent means that I should some how multiply their densities, though I am not so sure what would be the product range. In addition, I am not sure how I can from that derive $$P(X>Y)$$. Again, I have some clue about a 2-d integral but I can't figure out what's the logic behind it, or how to even define it.

Thanks!

2 Answers

Consider that

$$P(X>Y)=E\left[\mathbf1_{X>Y}\right]$$

, where $$\mathbf1_{X>Y}$$ equals $$1$$ if $$X>Y$$, and equals $$0$$ otherwise.

And for any (measurable) function $$g$$ of $$(X,Y)$$, courtesy of this theorem, we have

$$E\left[g(X,Y)\right]=\iint g(x,y)f_{X,Y}(x,y)\,\mathrm{d}x\,\mathrm{d}y$$

, where $$f_{X,Y}$$ is the joint density of $$(X,Y)$$.

You are right that independence of $$X$$ and $$Y$$ implies that $$f_{X,Y}$$ is just the product of the marginal densities of $$X$$ and $$Y$$. So you have to evaluate

\begin{align} P(X>Y)&=\iint \mathbf1_{x>y}\,e^{-x}\mathbf1_{x>0}\mathbf1_{1y,\,x>0,1

For the first part the joint distribution is $$e^{-x}$$ for the range $$x\geq 0$$ and $$1\leq y\leq 2$$, and 0 otherwise.

For the second part

$$\text{Pr}[X>Y]=\int_{y=1}^2\text{Pr}[X>y]\,dy=\int_{1}^2e^{-y}\,dy$$