Derivation of Joint distribution Property I have the following note in my Statistics Script used for a derivation of a uniform minimum risk estimator.

Given  a $Y \equiv X - Z$, with (X,Z) being f(x,z) distributed the density of y is:

$f_Y(y) = \int f(y + z, z) dz$

Can anyone help me to derive the expression above. It is not trivial to me.

Thanks
$P(Y \leq y)=P(X\leq Z+y)=\int_{-\infty}^{\infty}\int_{-\infty}^{v+y}  f(u,v)dudv$. Putting $w=u-v$ we can write this as  $$\int_{-\infty}^{\infty}\int_{-\infty}^{y}  f(w+v,v)dwdv.$$ Interchanging the order of integration this becomes $$\int_{-\infty}^{y} \int_{-\infty}^{\infty} f(w+v,v)dvdw.$$ Differentiating this we see that the density of $Y$ is $$ \int_{-\infty}^{\infty} f(y+v,v)dv.$$ which is same as $$ \int_{-\infty}^{\infty} f(y+z,z)dz.$$
$P(Y \leq y)=P(X\leq Z+y)=\int_{-\infty}^{\infty}\int_{-\infty}^{v+y}  f(u,v)dudv$. Putting $w=u-v$ we can write this as  $$\int_{-\infty}^{\infty}\int_{-\infty}^{y}  f(w+v,v)dwdv.$$ Interchanging the order of integration this becomes $$\int_{-\infty}^{y} \int_{-\infty}^{\infty} f(w+v,v)dvdw.$$ Differentiating this we see that the density of $Y$ is $$ \int_{-\infty}^{\infty} f(y+v,v)dv.$$ which is same as $$ \int_{-\infty}^{\infty} f(y+z,z)dz.$$