Solution (source code)

= Solution

For an invertible continuous <cumulative distribution function>, monotonicity gives
$$
\mathbb P(F^{-1}(U)\leq x)=\mathbb P(U\leq F(x))=F(x),\qquad U\sim\operatorname{Unif}(0,1).
$$
Thus \b[each transformed observation has the desired distribution]. More generally use the <quantile function> $q(u)=\inf\{x:F(x)\geq u\}$; the same event identity proves <inverse transform sampling> even when there are atoms. Independent uniform inputs give independent transformed samples; mere uniform marginal distributions do not imply independence between different samples.