Consider $\mathbb{R}^n$ along with its Borel $\sigma$-algebra, and let $\mathbb{P}$ be a non-atomic probability measure on $\mathbb{R}^n$. Let $f, g: \mathbb{R}^n \rightarrow \mathbb{R}^n$ be two measurable functions such that their pushforwards of $\mathbb{P}$ match, i.e. $f_\# \mathbb{P} = g_\# \mathbb{P}$.
Consider a random variable $X$ whose law is given by $\mathbb{P}$. I would like to know if there exists a random variable $X'$ such that $(X, f(X)) \overset{d}{=} (X', g(X'))$.
Thanks!
I realized there need not exist such an $X'$. Take for example $n=1$, $\mathbb{P}$ as the uniform distribution on $[0,1]$, $f(x)=x$, and $g(x)=1-x$. In this case $(X, f(X))$ is supported on $D_1=\{(x, x): x \in [0,1]\}$, whereas for any $X'$ whose law is also $\mathbb{P}$, $(X', g(X'))$ will be supported on $D_2=\{(x, 1-x): x \in [0,1]\}$, which intersects with $D_1$ at a single point.