Let $X\perp Y\sim Exp(\lambda)$.
- Find the distribution of $Z=\frac{X}{X+Y}$
- Find the distribution of $W=U-V$ where $U=max(X,Y)$ and $V=min(X,Y)$.
- Is it possible determine if $U\perp V$ are indipendent without making calculations? If yes, why?
For the first point we have $F_Z(z)=\mathbb{P}(Z\leq z)=\mathbb{P}(Y\leq \frac{1-Z}{Z}X)=\int_{0}^{+\infty}[\int_{\frac{1-Z}{Z}X}^{+\infty}… dy]dx=z$ $\Rightarrow Z\sim U(0,1)$.
For the second point we have:
if… $\left.\begin{matrix} Y<X\rightarrow U=max(X,Y)=X;V=min(X,Y)=Y\Rightarrow U-V=X-Y \\ Y>X\rightarrow U=max(X,Y)=Y;V=min(X,Y)=X\Rightarrow U-V=Y-X \end{matrix}\right\}$ $\Leftrightarrow max(X,Y)-min(X,Y)=|X-Y|$, …so:
$F_W(w)=\mathbb{P}(W\leq w)=\mathbb{P}(max(X,Y)-min(X,Y)\leq w)=\mathbb{P}(|X-Y|\leq w)=\mathbb{P}(Y\leq X+w,Y<X)+\mathbb{P}(Y\geq X-w,Y>X)$
Now i've trouble to fix the extremes of integration. I've tried with…
1) $\int_{0}^{+\infty}[\int_{0}^{x+w}… dy]dx+\int_{0}^{+\infty}[\int_{x-w}^{+\infty}… dy]dx=1-\frac{1}{2}e^{-\lambda w}+\frac{1}{2}e^{\lambda w}$;
2) $\mathbb{P}(|X-Y|\leq w)=\mathbb{P}(-w\leq X-Y \leq w)=2[\mathbb{P}(X-Y\leq w)-\mathbb{P}(X-Y\leq 0)]=2[\mathbb{P}(Y\geq X-w)-\mathbb{P}(Y\geq X)]=2[\int_{0}^{+\infty}[\int_{x-w}^{+\infty}… dy]dx-\int_{0}^{+\infty}[\int_{x}^{+\infty}… dy]dx]=e^{\lambda w}-1$.
…but the correct result is $1-e^{-\lambda w}\Rightarrow W\sim Exp(\lambda)$.
Every time I'm in front of a sum or a difference in module, I don't understand how proceed. Could you please explain me, in the specific case but (more important) in general, how do you calculate the sum/difference in module?
Thanks in advance for any answer!