Suppose X and Y are both distributed exponentially with parameter $\lambda$ and $\mu$ respectively. I am trying to find the distribution of X - Y via this method and it does not seem to be working, could you show me what I am doing wrong?
Define Z1 = X - Y, Z2 = Y so $\begin{bmatrix} Z1 \\ Z2 \end{bmatrix}$ = $\begin{bmatrix} 1 & -1 \\ 0 & 1 \end{bmatrix}$ $\begin{bmatrix} X \\ Y \end{bmatrix}$ and so $\begin{bmatrix} X \\ Y \end{bmatrix}$ = $\begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}$ $\begin{bmatrix} Z1 \\ Z2 \end{bmatrix}$
So the joint pdf of Z1 and Z2 is $ g(z_1, z_2) = 1/det A * f_X(z_1 + z_2)f_Y(z2) = \lambda e^{-\lambda(z_1+z_2)} \mu e^{-\mu z_2} =\lambda \mu e^{-(\lambda + \mu)z_2 -\lambda z_1} $.
Hence the marginal density of Z1 is $g(z_1) = \int_0^\infty \lambda \mu e^{-(\lambda + \mu)z_2 -\lambda z_1} dz_2 = [ \frac{-\lambda \mu}{\lambda + \mu} e^{-(\lambda + \mu)z_2 - \lambda z_1}]^{\infty}_0 = \frac{\lambda \mu}{\lambda + \mu} e^{-\lambda z_1}$ Which is wrong?