What is the joint distribution of $Z=\min(X,Y)$ and $I_{Z=X}$? Assume that $X$ and $Y$ are independent random variables with $X \sim \exp(\lambda)$ and $Y \sim \exp(\mu)$. It is impossible to obtain direct observations of $X$ and $Y$. Instead, we observe the random variables $Z$ and $W$, where $Z = \min\{X,Y\}$ and $W =1$ if $Z=X$ and $W=0$ if $Z=Y$.
How to find the joint distribution of $Z$ and $W$?
 A: For every nonnegative $z$, $$[Z\gt z,W=1]=[Y\gt X\gt z],\qquad [Z\gt z,W=0]=[X\gt Y\gt z],$$ and the value of the probability of these events, for every $z$, fully determines the joint distribution of $(Z,W)$. For example, $$P(Y\gt X\gt z)=\int_z^\infty\mu\mathrm e^{-\mu y}\int_z^y\lambda\mathrm e^{-\lambda x}\,\mathrm dx\,\mathrm dy=\int_z^\infty\mu\mathrm e^{-\mu y}(\mathrm e^{-\lambda z}-\mathrm e^{-\lambda y})\,\mathrm dy=\color{red}{\frac{\lambda}{\lambda+\mu}}\cdot\color{blue}{\mathrm e^{-(\lambda+\mu)z}}.$$ By symmetry $(\lambda,\mu)\leftrightarrow(\mu,\lambda)$, $$P(X\gt Y\gt z)=\color{red}{\frac{\mu}{\lambda+\mu}}\cdot\color{blue}{\mathrm e^{-(\lambda+\mu)z}}.$$  The product form of these probabilities shows that $(Z,W)$ is independent, with $$P(Z\gt z)=\color{blue}{\mathrm e^{-(\lambda+\mu)z}},$$ for every $z\geqslant0$, which proves that $Z$ is exponential with parameter $\lambda+\mu$, and with $$P(W=1)=\color{red}{\frac{\lambda}{\lambda+\mu}},\qquad P(W=0)=\color{red}{\frac{\mu}{\lambda+\mu}},$$ which proves that $W$ is Bernoulli with parameter $\lambda/(\lambda+\mu)$.
A: I assume your $\lambda$ and $\mu$ are rates rather than times (there are two different ways of parametrizing the exponential distribution).  Think of two
independent Poisson processes with rates $\lambda$ and $\mu$, where $X$ and $Y$ are the times until the first occurrences of the first and second processes respectively.
Another way to realize the process is to have a combined Poisson process of rate $\lambda + \mu$ for "occurrences", where each occurrence has probability $\lambda/(\lambda + \mu)$ of belonging to the first process and $\mu/(\lambda + \mu)$ of belonging to the second, independent of all other occurrences and of when it happens.  In this way we see that $W$ and $Z$ are independent; $Z$ is exponential with rate $\lambda + \mu$, and $W$ is a Bernoulli random variable
with parameter $\lambda/(\lambda + \mu)$.
