Let $F: \mathbb{R} \to [0,1]$ be cumulative distribution function (cdf). The standard way to build a random variable $\tau$ on $([0,1],\mathcal{B},\text{Leb})$ with $F$ as its cdf is using the Skorokhod representation: For $x \in [0,1]$, let
$$
 \tau(x) := \inf \{ z : F(z) > x \}
$$
be the generalized inverse of $F$.


I'm looking for a more general version of this. Let $X = \mathbb{R}^n$ (to begin with), and let $\mu$ be a probability measure on it. How does one build a random variable $\tau$ on $([0,1],\mathcal{B},\text{Leb})$ that takes values in $X$, so that the pushforward measure $\text{Leb}\_\* (\tau)$ is $\mu$?


Can this be done if $X$ is a Polish space and $\mu$ is a Borel measure? My feeling that this is generally true, and the result is probably due to von Neumann. I can't remember the right reference though. 


Can anyone help? Note that a statement like "an isomorphism between these measure spaces exists" is not what I'm looking for. I want an explicit way to construct $\tau$.



General version of Skorokhod representation of random variables
The statement is true for probability measures on a complete separable metric
space. I made a slight variation of the Skorokhod representation theorem
in my PhD thesis (way long time ago!) so I am more or less cutting and pasting,
sorry for the errors.
I got the original proof from Ikeda, Watanabe, *Stochastic differential
equations and diffusion processes*, North Holland Mathematical Library
**24**, North Holland/Kodansha 1989.


Let $(S,d)$ be a complete separable metric space, and $\mu$ a probability
measure on $S$ (on the Borel $\sigma$-algebra of $S$).
Set $\Omega=[0,1)$, $\mathcal{F}$ the Borel $\sigma$ algebra of $[0,1)$,
and $\mathcal{L}$ the Lebesgue measure on $[0,1)$.


Step 1: construction of suitable families of subsets of $S$.
For each $k\geq0$ let $(B\_m^k)\_{m\geq1}$ be balls with radius less than
$2^{-(k+1)}$ which cover $S$ and such that
$\mu(\partial B\_m^k)=0$. This is possible since $\mu$ is a finite
measure, hence in each point only a countable set of radii gives balls
with ``fat'' boundaries. Set
$$
D\_1^{k} = B\_1^k, \qquad
D\_2^k = B\_2^k\setminus B\_1^k, \quad
\ldots, \quad
D\_n^k = B\_n^k\setminus\bigcup\_{i=1}^{n-1}B\_i^k, \quad
\ldots
$$
and
$$
S\_{i\_1\ldots i\_k}=D\_{i\_1}^1\cap D\_{i\_2}^2\cap\ldots\cap D\_{i\_k}^k.
$$
It can be easily seen that


* if $(i\_1,\ldots, i\_k)$ and $(i\_1',\ldots, i\_k')$ are different,
then $S\_{i\_1\ldots i\_k}$ and $S\_{i\_1'\ldots i\_k'}$ are disjoint,
* $\bigcup\_i S\_i=S$ and $\bigcup\_i S\_{i\_1\ldots i\_ki}=S\_{i\_1\ldots i\_k}$,
* the diameter of $S\_{i\_1\ldots i\_k}$ is $\leq 2^{-k}$,
* $\mu(\partial S\_{i\_1\ldots i\_k})=0$.


Order the $k$-tuples $S\_{i\_1\ldots i\_k}$ by lexicographic order.


Step 2: Define a family of sub--intervals $\Delta\_{i\_1\ldots i\_k}$
(of the type $[a,b)$ in $[0,1)$), such that
$$
\mathcal{L}(\Delta\_{i\_1\ldots i\_k})
 = \mu(S\_{i\_1\ldots i\_k}),
$$
such that $\Delta\_{i\_1\ldots i\_k}$ is on the left of $\Delta\_{i\_1'\ldots i\_k'}$
if $(i\_1,\ldots, i\_k)<(i\_1',\ldots,i\_k')$, and such that
together they cover $[0,1)$.


Step 3: Define the random variable. For each $(i\_1,\ldots, i\_k)$
such that $S\_{i\_1\ldots i\_k}$ is non-empty, choose a point $x\_{i\_1\ldots i\_k}$
in the interior of $S\_{i\_1\ldots i\_k}$. For each $\omega\in[0,1)$ set
$X\_k(\omega)=x\_{i\_1\ldots i\_k}$ if $\omega\in\Delta\_{i\_1\ldots i\_k}$.
The random variable is well defined since, if $\Delta\_{i\_1\ldots i\_k}$
is non-empty, then the interior of $S\_{i\_1\ldots i\_k}$ is non-empty.
Observe that $d(X\_k(\omega),X\_{k+p}(\omega))\leq\frac1{2^k}$,
hence by the completeness, the limit
$X(\omega)=\lim\_k X\_k(\omega)$ always exists.


Step 4: $X$ has law $\mu$. Indeed
$$
\mathbb{P}[X\_{k+p}\in\bar S\_{i\_1\ldots i\_k}]
= \mathbb{P}[\omega:\omega\in\Delta\_{i\_1\ldots i\_k}]
= \mu(S\_{i\_1\ldots i\_k}),
$$
and, since each open set $A$ in $S$ is a disjoint countable union of sets
$S\_{i\_1\ldots i\_k}$, by Fatou, $\mu(A)\leq\liminf\_k\mathbb{P}[X\_k\in A]$,
that is $X$ has law $\mu$.


