Excercise
Let $X, Y$ be random variables such that their joint density function is defined by:
$f_{X,Y}(x,y)=e^{-(x+y)}, \enspace x,y>0$.
Find the distribution of Z defined as:
$Z=\frac{X+Y}{2}$.
Attempt of solution
I am using the fact that:
$F_Z(z)=P\{\frac{X+Y}{2}<z\}$, which implies that:
$F_Z(z)=\int_{0}^{\infty}\int_{0}^{2z-y}e^{-(x+y)}dxdy$.
My problem is that this leads to:
$F_Z(z)=\int_{0}^{\infty}e^{-y}-e^{-2z}dy$,
and this integral does not converge.
What am I getting wrong here? Thanks in advance.
Without doing any calculation, just observe that $f_{XY}(x,y)=f_X(x)f_Y(y)$ where $X,Y$ are iid $Exp(1)=Gamma(1;1)$ distributed.
Thus $(X+Y)\sim Gamma(2;1)$ and $Z=\frac{1}{2}(X+Y)\sim Gamma(2;2)$ that is
$f_Z(z)=4ze^{-2z}$
$z\geq 0$