Joint density function - question about integration limits
Let X and Y be two random variables with joint density function:
f(x, y) = e^(-y) 0 < x < y (these are greater than or equal to inequalities)
0 otherwise
We are asked to find the covariance. While I was finding E(XY), I used the limits for y as x to infinity and for x as 0 to y. The answer says that the inequality for x should be from 0 to infinity. I don't understand why. I drew the graph as well.
The integral should be as follows: $$ \mathbb E[XY] = \int_0^\infty\int_0^y xy e^{-y}\ \mathsf dx\ \mathsf dy = 3. $$ (Note that we may compute this expectation by iterated integration by the Fubini-Tonelli theorem; $(x,y)\mapsto xy e^{-y}$ is nonnegative and $$\iint_{(0,\infty)\times(0,y)} xy e^{-y}\ \mathsf d(x\times y)<\infty. $$ This is because we have $0<x<y<\infty$, which is the only way for the joint density to integrate to one: $$ \int_{\mathbb R^2}f(x,y)\ \mathsf d(x\times y) = \int_0^\infty\int_0^y e^{-y}\ \mathsf dx\ \mathsf dy = 1. $$ For completion's sake, I will compute $\mathrm{Cov}(X,Y)$. The marginal density of $X$ is computed by integrating the joint density over all values of $Y$: $$ f_X(x) = \int_x^\infty e^{-y}\ \mathsf dy = e^{-x}. $$ It follows readily that $\mathbb E[X]=1$. Similarly, the marginal density of $Y$ is computed by $$ f_Y(y) = \int_0^y e^{-y}\ \mathsf dx = ye^{-y}, $$ and hence $$ \mathbb E[Y] = \int_0^\infty y^2 e^{-y}\ \mathsf dy = 2. $$ It follows that $$ \mathrm{Cov}(X,Y) = 3 - 1\cdot2 = 1. $$