# Showing that Y has a uniform distribution if Y=F(X) where F is the cdf of continuous X

Let $X$ be a random variable with a continuous and strictly increasing c.d.f. function $F$ (so that the quantile function $F^{−1}$ is well-deﬁned). Deﬁne a new random variable $Y$ by $Y = F(X)$. Show that $Y$ has a uniform distribution on the interval $[0, 1]$.

My initial thought is that $Y$ is distributed on the interval $[0,1]$ because this is the range of $F$. But how do you show that it is uniform?

• This is not true in cases where there's a discrete component. For example, suppose $X=\left.\begin{cases} 1/2 & \text{with probability }1/2, \\ W & \text{with probability }1/2,\end{cases}\right\}$ and $W$ is uniformly distributed on $[0,1]$, and that the choice between whether $X=1/2$ or not is independent of $W$. Then the cdf of $X$ has no values between $1/4$ and $3/4$, so it cannot be uniformly distributed on $[0,1]$. It is, however, true of continuous distributions. – Michael Hardy Jul 15 '14 at 21:41
• see the text of the question. X is continuous! – user162381 Jul 15 '14 at 21:44
• By the way, it is not necessary that $F$ is a strictly increasing CDF, continuity is sufficient. Just define the quantile function the usual way as a generalized inverse via $F^-(y)=inf\{x\in\mathbb{R}: F(x)\geq y\}$. See the proof of Proposition 3.1 in Embrechts, P., Hofert, M.: A note on generalized inverses. Mathematical Methods of Operations Research 77(3), 423-432 link for a very careful and detailed explanation. – binkyhorse Jul 16 '14 at 14:38
• Thanks @binkyhorse - that reference is really good. – Math1000 Apr 5 '15 at 22:33
• @s0ulr3aper07 By Proposition 3.1 in the paper I linked above, yes. Prop. 3.1: Let F be a distribution function and X ~ F. (a) If F is continuous, F(X)∼U[0,1]. The paper includes a detailed proof. – binkyhorse Mar 27 at 20:10

## 5 Answers

Let $F_Y(y)$ be the CDF of $Y = F(X)$. Then, for any $y \in [0,1]$ we have:

$F_Y(y) = \Pr[Y \le y] = \Pr[F(X) \le y] = \Pr[X \le F^{-1}(y)] = F(F^{-1}(y)) = y$.

What distribution has this CDF?

• Are all CDF's of continuous densities invertible? – tintinthong Aug 22 '17 at 7:43
• @tintinthong: not always completely, but enough. If you define $G(y)= \inf\{x:F_X(x) \ge y\}$ then $F_X(G(y))=y$ when $y \in (0,1)$ – Henry Aug 22 '17 at 22:12
• Strictly increasing and continuous CDF is needed. – Dani Feb 20 at 15:36

$$Prob(Y\leq x)=P(F(X)\leq x)=P(X\leq F^{-1}(x))=x \\$$ The last equality is from the definition of the quantile function.

Let $y=g(x)$ be a mapping of the random variable $x$ distributed according to $f(x)$. In the mapping $y=g(x)$ you preserve the condition of probability density (namely you counts the same number of events in the respective bins)

$$h(y)dy=f(x)dx$$

where h(y) is the probability distribution of $y$

if $h(y)=1$ (uniform distribution) we have

$$dy=g'(x)dx=f(x)dx$$

This means that $$g(x)=\int f(x)dx$$

namely the function $g(x)$ that maps the random variable $x$ distributed according $f(x)$, into a random variable $y$ distributed uniformly is his own cumulative distribution function $\int f(x) dx$.

Let x be a RV with a PDF f(x) and CDF F(x), then: dF= f(x)dx

Or g(F)dF=f(x)dx

Comparing the two equations we see that g(F) must be uniform.

Since it is shown by JimmyK4542 that the cdf is equal to $y$, differentiating this with respect to $y$ will yield 1, which will be the pdf of $Y$. And a random variable that is uniformly distributed on $[0,1]$ should have a pdf equal to 1 by definition. Therefore, $Y$ is uniformly distributed over $[0,1]$.