I have a question about joint distributions and i'm really struggling to find a solution:
$X$ and $Y$ are two independent random variables with $X \sim Exp(\lambda)$ and $Y \sim Exp(\mu)$. Suppose that we don't know the value of $X$ and $Y$, instead we observe the random variables $Z$ and $W$, where $Z = \min(X, Y)$ and W=\begin{cases} 1, & \text{if $Z=X$} \\ 0, & \text{if $Z=Y$} \end{cases}
I find the joint distribution for $\mathbb P$($Y>X>z$) = ${\frac{\lambda}{\lambda+\mu}}\cdot{\mathrm e^{-(\lambda+\mu)z}}$ and for $\mathbb P$$(X\gt Y\gt z)={\frac{\mu}{\lambda+\mu}}\cdot{\mathrm e^{-(\lambda+\mu)z}}.$ Now i have to find the marginal distribution of $Z$ and $W$ but i don't know how to build the integral for it, especially for $Z$. I appreciate any help. Thank you in advance
On many occasions, it is quite helpful to find equivalent events. For instance, $W=1$ simply means that $X<Y$, so $\Pr\{W=1\}=\Pr\{X<Y\}$, which you already have evaluated. Or if you want to evaluate the joint distribution of $W$ and $Z$, if $W=1$ (with probability that you already know), then the distribution of $Z$ is the distribution of $X$, which you already know. Sometimes the key is not to get caught up in the calculus and look for equivalent events, hopefully those that are known, or simple to demonstrate.