I am a bit rusty in probability, and for a project I am studying the random variable $Z = \max(X_1, \ldots, X_n) - X_i, i = 1, \ldots, n$ where the $X_i$ are positive independent random variables. In particular, I would like to have the cmd and the pdf of Z. For now let's assume that the $X_i$ are identical and let's take the simplest example, i.e. when the $X_i$ are exponentially distributed with parameter $\lambda$: $F_{X_i}(t) = 1 - \exp(-\lambda t)$ and $f_{X_i}(t) = \lambda \exp(-\lambda t)$. WLOG, say that $i = 1$, and that $n = 3$, for now I have
$F_Z(t) = P(\max(X_1, X_2, X_3) - X_1 \leq t) $ $= P(X_1 - X_1 \leq t, X_2 - X_1 \leq t, X_3 - X_1 \leq t) $ $= P(X_2 - X_1 \leq t, X_3 - X_1 \leq t)$ $= P(X_2 \leq t + X_1, X_3 \leq t + X_1)$ $= \int_0^\infty P(X_2 \leq t + x, X_3 \leq t + x | X_1 = x)f_{X_1}(x)dx$ $= \int_0^\infty P(X_2 \leq t + x)P(X_3 \leq t + x)f_{X_1}(x)dx$ $= \int_0^\infty F_{X_2}(t+x)F_{X_3}(t+x)f_{X_1}(x)dx$
Now using the assumption that all $X_i$ are iid exponentially distributed random variables,
$= \int_0^\infty (1-\exp(-\lambda (t+x)))^2 \lambda \exp(-\lambda x)dx$ $= 1 + \frac{\exp(-2\lambda t)}{3} - \exp(-\lambda t), t \geq 0$
The formula makes sense at least to the extent that $F_Z(0) = 1/3$: as the $X_i$ are iid, they all have equal chance of being the maximum to begin with, each with probability $1/n = 1/3$. Now is all of this correct, did I miss something? How can I find the pdf? It seems to me that there is a discrete point mass at $0$, I am not sure how to deal with it. Is the cmf continuous but the pdf discontinuous?
Moreover, does anyone know a sexier way of treating $\max(X_1, \ldots, X_n) - X_i$? or something that is more closed form than an integral? It seems to me that the mass at $0$ should be some sort of average... Finally, does anyone know results for the case when the $X_i$ are independent but not identically distributed (but still positive)?
Thanks in advance,
S