Real valued random variables and cumulative distribution functions (c.d.f.) Let $X$ be a random variable with values in $\mathbb R$ (we fix the Lebesgue measure on $\mathbb R$), then is well defined a c.d.f. $F_X$ such that
$$F_X(x)=X_\ast P(]-\infty,x])=P(X\in]-\infty,x])$$

Remember that a c.d.f is a function $f:\mathbb R\longrightarrow [0,1]$ with the following three properties:


*

*$f$ is a non decreasing function.

*$f$ is continous from the right.

*$\lim_{x\to+\infty} f(x)=1$, $\lim_{x\to-\infty} f(x)=0$



Now suppose that a c.d.f. $f$ is given; then does exist some random variable $X$ such that $F_X=f$? What is the strategy to construct such $X$?
Many thanks in advance. 
 A: If you talk about the distribution of a random variable, you always have to specify the corresponding probability space. Your question could be interpreted in the following ways:


*

*Suppose that a distribution function $F$ is given. Does there exist a probability space $(\Omega,\mathcal{A},\mathbb{P})$ and a random variable $X:\Omega \to \mathbb{R}$ such that $F_X = F$?

*Suppose that a distribution function $F$ and a probability space $(\Omega,\mathcal{A},\mathbb{P})$ is given. Does there exist a random variable $X:\Omega \to \mathbb{R}$ such that $F_X = F$?


The answer to both questions is yes. Here are the ideas of the proofs:


*

*Given a distribution function $F$, we set $$\mathbb{P}([a,b)) := F(b)-F(a), \qquad a<b, a,b \in \mathbb{R}.$$ Since intervals of the form $[a,b)$, $a<b$, are a generator of the Borel-$\sigma$-algebra $\mathcal{B}(\mathbb{R})$, it follows from the properties of the distribution function that we can extend $\mathbb{P}$ (uniquely) to a measure on $(\Omega,\mathcal{A}) := (\mathbb{R},\mathcal{B}(\mathbb{R}))$. Now we define $X: \mathbb{R} \to \mathbb{R}, x \mapsto x$. Then it follows from the construction of the measure $\mathbb{P}$ that the distribution function of $X$ equals $F$.

*Suppose now that a probability space $(\Omega,\mathcal{A},\mathbb{P})$ is given. Now we let $U \sim (0,1)$ be a uniformly distributed random variable on $(0,1)$ and define $$X := F^{-1}(U)$$ where $F^{-1}$ denotes the (generalized) inverse of $F$. Let us assume for simplicity that $F$ has an inverse function. Then $$\mathbb{P}(X \leq x) = \mathbb{P}(F^{-1}(U) \leq x) = \mathbb{P}(U \leq F(x)) \stackrel{U \sim U(0,1)}{=} F(x)$$ for all $x \in \mathbb{R}$. This shows that $F_X = F$. In case that $F$ does not have an inverse, we have to consider the generalized inverse; the argumentation is basically the same, but more technical. 

