Finding the marginal density when the conditional density is given to us.

571 Views Asked by At

Let the conditional probability density of $X$ given $Y=y$ is as follows:

$f(x|y)= {e^{y-x}, x>y}$ where $y>0$. and let the density of $Y$ has been provided as exponential distribution with mean $\frac{1}{\lambda}$. then what is the marginal density of the $X$. I have obtained the joint density of the $X$ and $Y$ by multiplying the given densities and obtained: $f(x,y)=\lambda e^{-x} e^{-\lambda y+y}$ where $y<x$. To obtain the density of $X$, i calculated the following integral:

$\int_{0}^{x} \lambda e^{-x} e^{-\lambda y+y} dy$ which after a little simplification turned out to be:

$f(x)=\frac{\lambda}{1-\lambda} [e^{-\lambda x}+e^{-x}]$

I am not sure whether my density of $X$ is correct or not. My textbook is showing some different answers. Also, is there any quick method to the given problem because the definite integral took some time to solve. Thanks in advance.

1

There are 1 best solutions below

0
On BEST ANSWER

Your result is almost right. The integral is not hard to calculate.

$$\int_{0}^{x} \lambda \cdot e^{-x} e^{-\lambda y+y} \, dy=\lambda \cdot e^{-x}\cdot \int_{0}^{x} e^{y\cdot (1-\lambda )} \, dy$$

$$=\lambda \cdot e^{-x}\cdot\frac1{1-\lambda}\cdot \left[e^{y\cdot (1-\lambda )} \right]_0^x=\lambda \cdot e^{-x}\cdot\frac1{1-\lambda}\cdot \left(e^{x\cdot (1-\lambda )} -1 \right)$$

$$=\frac{\lambda}{1-\lambda}\cdot \left( e^{-x+x-\lambda x}-e^{-x}\right)=\frac{\lambda}{1-\lambda}\cdot \left( e^{-\lambda x}-e^{-x}\right)$$

Thus the (marginal) density function of $X$ is

$$f_X(x)=\begin{cases} \frac{\lambda}{1-\lambda}\cdot \left( e^{-\lambda x}-e^{-x}\right), \text{if} \ 0\leq x < \infty \\ \\ 0, \qquad \text{if} \ x<0\end{cases}$$

One property of a pdf is $\int_{-\infty}^{\infty} f(x) \, dx=1$. Thus a necessary condition is $$\int_0^{\infty}\frac{\lambda}{1-\lambda}\cdot \left( e^{-\lambda x}-e^{-x}\right) \, dx=1 $$

You can check that.