Some issues about Uniform Distibution in Inverse Transform Method There is a theorem about inverse transform method says if X is a continuous random variable with cdf F, then U=F(X)~U[0,1]
So I am wondering the logic in this sentence. 
Why if X is a continuous random variable with cdf F, then U=F(X)~U[0,1]?
Why is it always be uniform and 
how does this theorem work in real example?
 A: This fundamental fact follows directly from the definition of a cumulative density function (CDF), after applying some clever manipulation.
The definition of the CDF is the following

A function $F$ is called the CDF of a random variable $X$ when, for every number $z$, $P(X < z) = F(z)$.

Now, if we are in the above situation, we can ask

What is the CDF of the random variable $F(X)$?

Let's see
$$P(F(X) < z) = P(F^{-1}(F(X)) < F^{-1}(z)) = P(X < F^{-1}(z)) = F(F^{-1}(z)) = z $$
Here:


*

*In the first equality I have used that a CDF is always an increasing function.  Otherwise there would be no (or a much more complex) relation between the two probabilities.

*In the second to last equality I have used the definition of a CDF, applied to the fact that $F$ is the CDF of the random variable $X$.


Reading from top to bottom:
$$P(F(X) < z) = z $$
Which, comparing with the definition of a CDF again, shows that the CDF of $F(X)$ is the identity function.  The identity function is also the CDF of the uniform distribution.  Distributions are the same if and only if their CDF is the same, so this also means that
$$ F(X) \sim U(0, 1) $$
