A well known fact in probability is that a uniform random variable on $[0,1]$ can be used to simulate any other probability distribution on $\mathbb{R}$. 


A standard way of doing this is to define, given $\mu$ a probability on $\mathbb{R}$, the random variable $F(u,\mu) = \min\lbrace x \in \mathbb{R}: \mu((-\infty,x]) \ge u\rbrace$. The random variable $F(u,\mu)$ has distribution $\mu$.


Suppose now that $(X,d)$ is a compact metric space and let $\mathcal{P}(X)$ be the space of Borel probability measures on $X$ endowed with the topology of weak convergence.


**I'm looking for a reference for the following statement:**



> 
> There exists a Borel function $F:[0,1]\times \mathcal{P}(X) \to X$ such that if $u$ is a random variable whose distribution is uniform on $[0,1]$ then for each $\mu$ the random variable $F(u,\mu)$ has distribution $\mu$.
> 
> 
> 



Simultaneous simulation of all probability measures on a compact metric space
This is a result of Blackwell and Dubins, ["An extension of Skorohod's almost sure representation theorem"](http://www.ams.org/journals/proc/1983-089-04/S0002-9939-1983-0718998-0/). In fact, your function F can be constructed to be almost surely continuous in the measure argument, and X can be any Polish space.


