Distribution of the maximum of exponential random variables given their sum Let $X_1, \ldots, X_K$ be $K$ i.i.d. exponential r.v.s with parameter $\lambda$. The distributions of $S=\sum_{k=1}^K X_k$ and $M=\max\{X_k\}$ are well known. We are interested in the distribution of $M$ given $S$, i.e., in deriving the expression of the function:
$$
F_{M\mid S}(m\mid s)=\Pr\{M\leq m\mid S=s\}
$$
Clearly, a Laplace transform approach is ok, any idea about how to proceed or to approximate $F_{M\mid S}$?
 A: HINT
For iid exponentials, regardless of $\lambda,$ the joint density of $X_1,\ldots, X_n$ given the sum $S$ is given by $$ f_{X_i\mid S}(x_1,\ldots,x_n\mid S=s) = \frac{(n-1)!}{s^{n-1}}\delta_{\sum_i x_i,s},$$ i.e. the point $(X_1,\ldots,X_n)$ is conditionally uniformly distributed on the surface $\sum_i x_i = s.$
From this, you can compute$$P(M\le m\mid S=s) = P(X_1\le m,\ldots, X_n\le m\mid S=s) $$ as the area of the surface contained within the cube of side length $m$.
A: Let me try to put it here (I slightly change the notation and $\lambda=1$):
Let $X_1, \ldots, X_K$ be the order statistics of the i.i.d. exponential random variables, i.e., $X_1<X_2<\ldots<X_K$. Then, let us find the distribution of $T|X_K$, where 
$$
T=\sum_{i=1}^{K-1}X_i
$$
Then, the Laplace-transform $F^*_{T|X_K}$ is given by:
$$
   F^*_{T|X_K}(s)=
   \frac{1}{(1-e^{-m})^{K-1}} \left(\int_0^m e^{-sx} e^{-x}dx\right)^{K-1}
   =\frac{1}{(1-e^{-m})^{K-1}}\left(\frac{1-e^{-m(1+s)}}{1+s}\right)^{K-1}
$$
whose inversion leads to:
$$
   f_{T|X_K}(t|m)=\frac{1}{(1-e^{-m})^{K-1}}\frac{e^{-t}}{(K-2)!}
   \sum_{i=1}^K(-1)^{i+1}\binom{K-1}{i-1}(t-(i-1)m)^{K-2} \delta_{t\geq (i-1)m}\,,
$$
where $\delta_P$ is $1$ if $P$ is true, $0$ otherwise.
Now the game is done, because the distribution of $X_K$ is:
$$
f_{X_K}(m)=K (1-e^{-m})^{K-1}e^{-m}
$$
and the distribution of $S=\sum_{i=1}^K X_i$ is a gamma distribution:
$$
f_S(x)=\frac{e^{-x}x^{K-1}}{(K-1)!}\,.
$$
Now, we are in a position to apply Bayes's theorem and obtain the desired result:
$$
f_{X_K|S}(m|x)=\frac{f_{T|X_K}(x-m|m)f_{X_K}(m)}{f_S(x)}
=\frac{K(K-1)}{x^{K-1}}
   \sum_{i=1}^K(-1)^{i+1}(x-m i) ^{K-2}\binom{K-1}{i-1}\delta_{x \geq im}
$$
As sanity check, let us take $K=2$ and we obtain:
      $$
     f_{X_2|S}(m|x)=
     \begin{cases}
        0 &\text{ if } x<m \\
        2/x &\text{ if } m \leq x <2m\\
        0 &\text{ if } x \geq 2m
     \end{cases}
  $$
whose c.d.f. is:
$$
    F_{X_2|x}(m|x)=
     \begin{cases}
        0 & \text{ if } m<x/2\\
        \frac{2 m -x}{x} & \mbox{ if } x/2 \leq m <x\\
        1 & \mbox{ if } m\geq x
     \end{cases}
$$ 
that corresponds to the answer one obtains by applying the geometric approach.
