Statistics(probability) example 4 Random vector $(X, Y)$ has density distribution 
$$f (x, y) = k * e^{-y}$$ for  $$0 < x < y $$
and $0$ otherwise .


*

*Determine the value of $k$ for which $f (x, y)$ is a density distribution. 

*Determine the density of the marginal distribution. 

*Calculate $P (X> 1 | Y <3)$.

 A: First comes a diagram, to  help us identify visually where the joint density function "lives." Draw the line $y=x$. The density function is $ke^{-y}$ in the part of the first quadrant above the line $y=x$. 
The integral of the density function over this region is $1$. So we want
$$\int_{x=0}^\infty \left(\int_{y=x}^\infty ke^{-y}\,dy\right)\,dx=1.\tag{1}$$
The inner integral is $ke^{-x}$. So the iterated integral (1) is equal to $k$. It follows that $k=1$. 
For the two marginal densities $f_X(x)$ and $f_Y(y)$, we "integrate out" $y$ and $x$ respectively. Thus
$$f_X(x)=\int_{y=x}^\infty e^{-y}\,dy=e^{-x}$$
(for $x\gt 0$). For completeness, note that $f_X(x)=0$ if $x\le 0$.
For $f_Y(y)$, integrate $e^{-y}$ with respect to $x$, from $x=0$ to $x=y$. We get $ye^{-y}$.
Finally, we calculate $\Pr(X\gt 1|Y\lt 3)$. By the usual expression for conditional probability, we have
$$\Pr(X\gt 1|Y\lt 3)=\frac{\Pr(X\gt 1 \cap Y\lt 3)}{\Pr(Y\lt 3)}.$$
We need to compute the two probabilities on the right. 
For the numerator, draw the line $y=3$ and the line $x=1$. We want the probability that $(X,Y)$ lands in the region to the right of $x=1$, and below $y=3$. Recall that we also must be above the line $y=x$. So we want the probability that $(X,Y)$ lands in a certain triangle. Integrate the joint density over that triangle. If we integrate first with respect to $y$, then $y$ will go from $x$ to $3$, and then $x$ will go from $1$ to $3$.
The denominator is a similar integral, a little easier to set up.
