# Marginal Probability Density Functions

Q) Let X and Y have the joint p.d.f.

$$f(x,y)=\begin{cases} e^{-y}, \text{if } 0<x<y<\infty \\ 0, \text{otherwise } \end{cases}$$

Obtain the marginal p.d.f's for X and Y.

A)I know that $F_{x}(s)=\lim_{t \to \infty} F_{x,y}(s,t)$ So have found f(x) to be

$$f(x)=\begin{cases} \lim_{y \to \infty} e^{-y} = 0, \text{if } 0<x<y<\infty \\ \lim_{y \to \infty} 0 = 0, \text{otherwise } \end{cases}$$

and f(y) to be

$$f(y)=\begin{cases} \lim_{x \to \infty} e^{-y} = 0, \text{if } 0<x<y<\infty \\ \lim_{x \to \infty} 0 = 0, \text{otherwise } \end{cases}$$

(since if x is going to infinity then y is going to infinity.)

However, the next question is asking about calculating the co-variance matrix of X+Y and X-Y which makes me think that my first answer was wrong. I don't know how to fix it so any hints would be really helpful, thanks!

• What you are stating at here is saying that given a joint CDF, how to obtain the marginal CDF. However, you are now given a joint pdf to find the marginal pdf, which require you to do integration. – BGM Apr 8 '17 at 12:58

The following figure depicts the joint density which is zero outside the red region.

So the marginals are

$$f_X(x)=\int_{-\infty}^{\infty}f_{X,Y}(x,y)\ dy=\int_x^{\infty}e^{-y}\ dy=e^{-x},$$ if $x\ge 0$

and

$$f_Y(y)=\int_{-\infty}^{\infty}f_{X,Y}(x,y)\ dx=\int_0^{y}e^{-y}\ dx=ye^{-y},$$ if $y\ge 0$.

EDIT

$$E[XY]=\int_0^{\infty}\int_0^{\infty}xyf_{X,Y}(x,y)\ dxdy=$$ $$=\int_0^{\infty}x\int_x^{\infty}ye^{-y}\ dy\ dx.$$

For the internal integral, the antiderivative is $-e^{-y}(1+y)$. This antiderivative is gained by integrating by parts and using $v'=e^{-y}$ and $u=y$.

And $\left[-e^{-y}(1+y)\right]_x^{\infty}=e^{-x}(1+x).$ Then

$$E[XY]=\int_0^{\infty}xe^{-x}(1+x)\ dx=\int_0^{\infty}xe^{-x}\ dx+\int_0^{\infty}x^2e^{-x}\ dx$$

and you can use the antiderivative formula given above. But without that, you know that, the first integral is $1$ bacause we compute the mean of the exponential distribution of $\lambda=1$, also, the other integral is $2$ because we compute the second momentum of the same. So,

$$E[XY]=3.$$

• Thanks! I have used f(x,y)=f(x)f(y) and found X and Y to not be independent, so the co-variance of X and Y is non-zero. I have cov(x,y)=E(xy)-E(x)E(y). I know how to calculate E(x) and E(y) using integrals by don't know how to calculate E(xy)? – Koala Apr 8 '17 at 14:17
• @Koala: I'll edit my answer. – zoli Apr 8 '17 at 14:27
• for the integral of x in the second line, why are the boundaries 0 and infinity and not 0 and y? – Koala Apr 8 '17 at 14:47
• 1 Sorry, I had to edit my answer because I omitted accidentally an $x$. But the answer is no. Below is the reverse order of integration: 2 No, and $$\int_0^{\infty}x\int_x^{\infty}ye^{-y}\ dy\ dx=\int_0^{\infty}ye^{-y}\int_0^yx\ dx\ \ dy =\frac12\int_0^{\infty}y^3e^{-y}\ dy=3.$$ (See the third moment of the exponential distribution.) – zoli Apr 8 '17 at 15:50