# I have two sampling techniques $\varphi_1,\varphi_2$. Given $x=\varphi_1(u)$ can I compute a $v$ with $x=\varphi_2(v)$?

I have two sampling surjective techniques $$\varphi_1,\varphi_2:[0,1)\to E$$ mapping a random number $$u\in[0,1)$$ to a sample in a measurable space $$(E,\mathcal E)$$.

Say $$u\in[0,1)$$ and $$x:=\varphi_1(u)$$. Is there any chance to compute the random number $$v\in[0,1)$$ which would have produced the same sample $$x$$ under $$\varphi_2$$, i.e. $$x=\varphi_2(v)$$?

Clearly, if (for example) $$\varphi_1$$ is not injective, $$\varphi_1$$ might be constant on an interval and hence we're not able to identify a unique random number producing $$x$$. However, maybe we can somehow commit to a single value.

The question is too vague in my opinion as there must be constraints on the transforms $$\varphi_1$$ and $$\varphi_2$$ for this to happen. Namely that the realised value of $$X_1$$ as $$x=\varphi_1(u)$$ must be a possible value of $$X_2$$ as well, namely that $$x$$ must belong to the support of $$X_2$$ for a $$v$$ such that $$x=\varphi_2(v)$$ to exist.
With this constraint in mind, an approach to the problem is to consider that $$\varphi_1$$ and $$\varphi_2$$ are the inverse cdfs of the random variables $$X_1$$ and $$X_2$$, namely$$\varphi_i(u)=F_i^-(u) = \sup \{x;\ F_i(x)\le u\}\qquad i=1,2$$(under the convention that cdf's are left-continuous). Either $$x$$ is a continuity point for $$F_2$$ and then $$v=F_2 \circ F_1^{-1}(u)$$ (since $$F_2$$ is then invertible at this point). For this is a discontinuity poiny, meaning it is an atom, in which case $$v\in \{\nu;\ \lim_{{y \to x}\\{y< x}} F_2(y)\le \nu\le \lim_{{y \to x}\\{y> x}} F_2(y)\}$$ This includes the special value $$v=F_2 \circ F_1^- (u)$$
• Regarding your answer: I've forgot to mention that I want to assume that $\varphi_1,\varphi_2$ are surjective. – 0xbadf00d Jan 3 at 18:43
• And, clearly, the problem with your solution is that it only works for $E=\mathbb R$, doesn't it? Actually, I'm willing to assume that $E$ is a Banach space, but I don't see how the notion of a CDF generalizes to this case. The case $E=\mathbb R^3$ is interesting for me as well. – 0xbadf00d Jan 3 at 19:15
• Well, no. Sorry. I think I made some mistakes in my attempt to simplify my concern. For the case $E=\mathbb R^3$, I'm actually using a sample from a unit (hemi-)sphere. – 0xbadf00d Jan 3 at 19:40