Let $X$ be a continuous random variable with cdf, $F_X(x)$ and let $Y=F_X^{-1}(U)$.The distribution function is strictly increasing on a single interval (which could be infinite, so that the inverse function $F_X^{-1}(y)$ is defined in the natural way.$U$ is a continuous uniform random variable on the interval zero to one. Find cdf of $Y$
So I believe I have the density function of $U$ is $f(x)=1$ for $0\leq x\leq 1$ and $f(x)=0$ otherwise.
But I'm not sure how to interpret $F_X^{-1}(U)$,
I realize its the inverse of $F_X$ but I don't understand what $U$ is.
Best Answer
Suppose that $X \sim \mathsf{Exp}(\lambda = 1)$ so that $F_X(u) = 1 - e^{-u}.$ Then, after a little algebra one has $F_X^{-1}(u) = -\ln(1-u).$
If you let $U \sim \mathsf{Unif}(0,1),$ then $F_X^{-1}(U) \sim \mathsf{Exp}(1).$
This is a method for simulating a random variable $X$ by inverting its CDF (if feasible), and then transforming a standard uniform random variable $U$ according to the inverse CDF of of $X,$ sometimes known as the quantile function of $X.$ [The output of a satisfactory pseudorandom number generator is essentially indistinguishable from independent realizations of a standard uniform random variable.]
Demonstration in R:
The first 5000 realizations of $X$ above pass a Kolmogorv-Smirnov test for $\mathsf{Exp}(1).$ [The test can't accommodate more than 5000 values.]