0
$\begingroup$

Given X~$Gamma(2,\lambda)$ and the conditional distribution of $Y$ given $X=x$ ~ $U(0,x)$.

I have already solved for the following joint, marginal, and conditional density functions where:

$f_{X,Y}(x,y) = f_Y(y|X=x)f_X(x) = {\lambda^2}e^{-\lambda x}$ if $0\leq y\leq x$, $0$ otherwise.

$f_Y(y) = \lambda e^{-\lambda y}$ if $0\leq y$, $0$ otherwise.

$f_X(x|Y=y) = \lambda e^{\lambda y-\lambda x}$

I need to use the conditional distribution of X given Y = y to describe the joint distribution of Y and X-Y

However, I am confused as to where to proceed from here. I have calculated the joint distribution as

$F_{{X-Y},{Y}}(x,y) = \lambda e^{-\lambda y}*({1-e^{-\lambda x}})*({1-e^{-\lambda y}})$

1 Answers 1

0

The conditional density is not enough to compute the common distribution of $X-Y$ and $Y$. You need the joint distribution...


The joint density is

$$f_{X,Y}(x,y)=\begin{cases} \lambda^2e^{-\lambda x}&\text{ if } 0\leq y\leq x\\ 0& \text{ otherwise}. \end{cases}$$

In order to to calculate the common distribution function of $X-Y$ and $Y$ we need to calculate the probability below

$$F_{X-Y,Y}(u,v)=P(X-Y

Let's consider the region

$$A_{u,v}=\{x,y\geq0\ : x-yx-u, y

The probability we are looking for can be given by integrating the common density over $A_{u,v}$:

$$F_{X-Y,Y}(u,v)=\iint_{A_{u,v}}f_{X,Y}(x,y)\ dxdy.$$

Taking into account that $f_{X,Y}(x,y)=0$ if $y>x$, the following figure helps evaluate the integral above.

enter image description here

If $u\leq0$ or $x\leq0$ or $y\leq0$ then $F_{X-Y,Y}=0$, otherwise, if $u

$$F_{X-Y,Y}(u,v)=$$ $$=\lambda^2\left[\int_0^u\int_0^xe^{-\lambda x}\ dy \ dx+\int_u^v\int_{x-u}^xe^{-\lambda x}\ dy \ dx+\int_v^{u+v}\int_{x-u}^ve^{-\lambda x}\ dy \ dx\right].$$

If however $u\geq v$ then

$$F_{X-Y,Y}(u,v)=$$ $$=\lambda^2\left[\int_0^v\int_0^x e^{-\lambda x}\ dy\ dx+\int_v^u\int_0^ve^{-\lambda x}\ dy \ dx + \int_u^{u+v}\int_{x-u}^ve^{-\lambda x} \ dy \ dx\right].$$

From this point on, there are only trivial definite integrals to be evaluated.