probability density of the maximum of samples from a normalized uniform distribution Suppose
$$X_1, X_2, \dots, X_n\sim Unif(0, 1), iid$$
and suppose
$$\hat\theta = \max\{X_1, X_2, \dots, X_n\} / \sum_i^nX_i$$
How would I find the probability density of $\hat\theta$?
I know the answer if it's iid. But I don't know how to formalize the fact that the sum is iqual to 1.
a simiar question can be found here: 
probability density of the maximum of samples from a uniform distribution

I arrive here:
\begin{align}
P(Y\leq x)&=P(\max(X_1,X_2 ,\cdots,X_n)/\sum_i^nX_i\leq x)\\&=P(X_1/\sum_i^nX_i\leq x,X_2/\sum_i^nX_i\leq x,\cdots,X_n/\sum_i^nX_i\leq x)\\
&\stackrel{ind}{=} \prod_{j=1}^nP(X_j/\sum_i^nX_i\leq x )\\& \ \ \ \ \ 
\end{align}

Because of symmetry, it is sufficient to only look at the cases where $X_1$ is the maximum. In that case, $X_2, \dots, X_n$ are independent and uniformly distributed between 0 and $X_1$.
$$\theta = \frac{X_1}{X_1 + \sum_{i=2}^n X_i} \quad \text{with} \ X_2, \dots, X_n \sim U(0, X_1)$$
Now we divide by $X_1$ on both sides of the fraction and we get the formula A.S. gave us.
$$\theta = \frac{1}{1 + \sum_{i=2}^n X_i} \quad \text{with} \ X_2, \dots, X_n \sim U(0, 1)$$
The sum of $n$ iid standard uniform random variables has the Irwin–Hall distribution. It's PDF (probability density function) is:
$$f(x) = \frac{1}{2\left(n-1\right)!}\sum_{k=0}^n\left(-1\right)^k{n \choose k}\left(x-k\right)^{n-1}\operatorname{sgn}(x-k)$$
Let
$$
X = \sum_{i=2}^n X_i
$$
The PDF of $X$ is:
$$f_X(x) = \frac{1}{2\left(n-2\right)!}\sum_{k=0}^{n-1}\left(-1\right)^k{n-1 \choose k}\left(x-k\right)^{n-2}\operatorname{sgn}(x-k)$$
Now we can use change of variable to calculate the PDF of $\theta$. The following formula gives the PDF of $\theta$ if $\theta = g(X)$ and $g(x)$ is monotonic.
$$f_\theta(y) = \left| \frac{\mathrm{d}}{\mathrm{d}y} (g^{-1}(y)) \right| \cdot f_X(g^{-1}(y))$$
We have
$$
\begin{array}{rl}
 g(x) &= \frac{1}{1 + x} \\
 g^{-1}(y) &= 1/y - 1 \\
 \left| \frac{\mathrm{d}}{\mathrm{d}y} g^{-1}(y) \right| &= y^{-2}
\end{array}
$$
So the PDF of $\theta$ is:
$$
\begin{array}{rl}
f_\theta(y) &= \displaystyle  \frac{1}{2 y^2 \left(n-2\right)!}\sum_{k=0}^{n-1}\left(-1\right)^k{n-1 \choose k}\left(1/y-1-k\right)^{n-2}\operatorname{sgn}(1/y-1-k) \\
&= \displaystyle \frac{-1}{2 y^2 \left(n-2\right)!}\sum_{k=1}^{n}\left(-1\right)^k{n-1 \choose k-1}\left(1/y-k\right)^{n-2}\operatorname{sgn}(1/y-k)
\end{array}
$$
It is positive at $y \in (1/n, 1)$.
Approximation for large $n$
The mean and the variance of the Irwin-Hall distribution are respectively $\mu=n/2$ and $\sigma^2=n/12$.
Because the Irwin-Hall distribution is the sum of $n$ iid random variables, the central limit theorem
states that for large $n$ its distribution is very close to the normal distribution with the same mean and variance.
The normal distribution has PDF:
$$f(x) = \frac{1}{\sigma\sqrt{2\pi} } \; \exp\left( -\frac{(x-\mu)^2}{2\sigma^2} \right)$$
Replacing $\mu$ and $\sigma^2$ with the mean and variance of the Irwin-Hall distribution with parameter $n-1$ gets us:
$$f_X(x) \approx \frac{1}{\sqrt{\pi (n-1)/6} } \; \exp\left( -\frac{(x-(n-1)/2)^2}{(n-1)/6} \right)$$
Using the same change of variable technique as above, we get the distribution of $\theta$ for large $n$:
$$
\begin{array}{rl}
f_\theta(y) &\approx \displaystyle \frac{1}{y^2\sqrt{\pi (n-1)/6} } \; \exp\left( -\frac{(1/y-1-(n-1)/2)^2}{(n-1)/6} \right) \\
&= \displaystyle \frac{1}{y^2\sqrt{\pi (n-1)/6} }  \; \exp\left( -\frac{3}{2}\cdot\frac{(2/y-n-1)^2}{n-1} \right)
\end{array}
$$
