Approximate distribution of a complicated function of a random variable If $X$ is a random variable cdf $F(x)$ such that $F$ is invertible then we have the standard method of finding the pdf of any function of $X$, say,  $\sin(X) $  or $ X^3+1 $.However,in many situations we have very complicated composite  functions of random variables(with known distributions ,however).To take an example ,let $X_1,X_2,\dots,X_n$ be iid random variables following uniform distributions in the interval (0,1).Consider the following random varibales
$$ Y=\max_{1 \leq i
\leq n}X_i$$
$$ Z= \frac{1}{2}\left\{ 1+X_{n-1}+ \sqrt{\left(1-X_{n-1}\right)^2+4Y} \right\}$$
To the best of my knowledge, it is almost impossible to analytically find the distribution of the  $Z$. However, it is straight-forward to numerically simulate $Z$.I want to know if there are some methods of finding the approximate distributions of random variables defined like $Z$. Any references/links/hints/suggestions will be greatly appreciated. I believe the problem is of immense significance in the theory of probability and machine learning and other applied disciplines, but I honestly do not know much about it.

The explicit distribution for $Z$ is nicer than you might expect: the cdf is either
$$F_Z(u)=\frac{u^n-1}{n}(u-1)^{n-1}$$
or
$$F_Z(u)=u+\frac{1-n-(u-1)^n}{n(u-1)}$$
depending on whether $u$ is less than or bigger than the golden ratio.

Let $V$ be $X_{n-1}$, and let $W$ be the maximum of all the $X$'s except $X_{n-1}$. Then $V$ has a uniform distribution, $W$ has a cdf with $f_W(t)=t^{\,n-1}$ for $0\le t\le 1$, and $V$ and $W$ are independent.
We can rewrite $Z$ as
$$Z=\frac12\left(1+V+\sqrt{(1-V)^2+4\max(V,W)}\right)$$
and find a few useful properties.

*

*$Z$ is an increasing function of both $V$ and $W$.

*$1+V\le Z \le 2$, which ​follows from $V\le\max(V,W)\le 1$

*$(Z-1)(Z-V)$ is an increasing function of $Z$

*$(Z-1)(Z-V)=\max(V,W)$
Now
\begin{align}
P[Z<u]
&= P[(Z-1)(Z-V)<(u-1)(u-V)]\\
&= P[\ \ \ \ \ \ \max(V,W)<(u-1)(u-V)]\\
&= P[V<(u-1)(u-V) \ \& \ W<(u-1)(u-V)]\\
&= P[V<u-1 \phantom{((u-V))}\ \& \ W<(u-1)(u-V)]\\
&= \int_{V=0}^{u-1}\min(1,(u-1)^{n-1}(u-V)^{n-1})\,dV\\
&= \int_{t=1}^{u}\min(1,t^{\,n-1}(u-1)^{n-1})\,dt
\end{align}
So if $1\le u\le\frac{1+\sqrt{5}}{2}$, then $u\le \frac{1}{u-1}$ and
\begin{align}
P[Z<u]&=\int_{t=1}^{u}t^{\,n-1}(u-1)^{n-1}\,dt\\
&=(u-1)^{n-1}\,\frac{u^n-1}{n}
\end{align}
And if $\frac{1+\sqrt{5}}{2}\le u\le 2$, then $u\ge\frac{1}{u-1}$ and
\begin{align}
P[Z<u]&=u-\frac{1}{u-1}+\int_{t=1}^{1/(u-1)}t^{\,n-1}(u-1)^{n-1}\,dt\\
&=u-\frac{1}{u-1}+\frac{(u-1)^{-n}-1}{n}(u-1)^{n-1}\\
&=u+\frac{1-n-(u-1)^n}{n(u-1)}\\
\end{align}
The graph at the beginning shows these two functions in blue and orange for $n=3$, with the cdf for $Z$ being the combination of the two solid curves.
