# Finding PDF of $Z = \frac{X+Y}{2}$ when X and Y have exponential distributions.

I'm given the following PDF for $X,Y$:

$f(x,y) = e^{-(x+y)}$ for $x>0$ and $y>0$.

And I'm told to find the PDF of $Z = \frac{X+Y}{2}$ using the Jacobian method.

So, it's easy to see that both $X$ and $Y$ have Exponential densities with mean equal to 1. I then proceed to choose $W = X$ and find the joint PDF of $W$ and $Z$. The Jacobian matrix's determinant turned out to be 2 so the joint PDF of $W$ and $Z$ is:

$f(z,w) = 2e^{-2z}$ for $z>0$ and $w>0$.

However, when integrating to find $f(z)$, you would find yourself multiplying by $\infty$.

Now, it could be that this is a trick question and it cannot be done as I'm also asked to find the PDF using the generator function method, but if someone finds how it can be done or if I'm doing something wrong it would be greatly appreciated.

EDIT: By the way, when using the generator function method I find $f(z) = 4ze^{-2z}$ (Gamma distribution with $\alpha = 2$ and $\beta = \frac{1}{2}$.

• Why would $w$ be bounded by $2z$? If $W = X$, wouldn't the fact that $x$ is not bounded above imply that $w$ isn't either? – D. Brito May 1 '17 at 20:23
• Oh, of course, don't know why I didn't see that before – D. Brito May 1 '17 at 20:32
• The general procedure when you face this kind of problem is, after you obtained the inverse transformation $x = w, y = 2z - w$, and you need to find the new support of the transformed one, you put this back to the original support and solve for the inequality: $x = w > 0, y = 2z - w > 0$ and you will obtain the required results. – BGM May 2 '17 at 4:01

Let $h$ be a bounded measurable function and $Z = \frac{X+Y}{2}$. Using a change of variable, \begin{aligned} \mathbb{E} h(Z) &= \int_{\mathbb{R}^2} h\!\left(\frac{x+y}{2}\right) f_{(X,Y)}(x,y)\, dx\, dy\\ &= \int_{\mathbb{R}^2} h(z) f_{(X,Y)}(x,2z-x)\, dx\, 2 dz\\ &= \int_{\mathbb{R}} h(z) \underbrace{\left[2\!\int_\mathbb{R} f_{(X,Y)}(x,2z-x)\, dx\right]}_{\displaystyle f_Z(z)} dz \, , \end{aligned} where the joint probability density function (PDF) is $$f_{(X,Y)}(x,y) = \mathrm{e}^{-(x+y)} \boldsymbol{1}_{x>0, y>0} \, .$$ Therefore, the PDF of $Z$ is identified as $$f_Z(z) = 2\, \mathrm{e}^{-2z} \int_\mathbb{R} \boldsymbol{1}_{0<x<2z}\, dx = 4 z\,\mathrm{e}^{-2z} \boldsymbol{1}_{z>0} \, .$$