This is related to discrete dynamical systems, with the initial condition $X\_1$ being a random variable with a non singular distribution. The system is driven by the iteration $X\_{n+1} = g(X\_n)$ for some rather smooth mapping $g$. The purpose here is to find a mapping $g$ so that the invariant distribution (also called attractor or invariant measure or fixed point distribution solution of an integral equation) is pre-specified. This is an inverse problem in the sense that typically $g$ is known and we are looking for the invariant distribution. Here the opposite is true: we assume the invariant distribution is known, and we want to find $g$ that will guarantee that no matter what the non-singular distribution of $X\_1$ is, we end up with the the target invariant distribution. There are typically many possible solutions for $g$. The reason I am asking this question is because I believe I got the wrong solution in a simple case, and would like to know how to get it right.


The most basic example is when the invariant distribution is uniform on $[0, 1]$, that is, $F\_X(x) = x$. In that case, $g(x) = \{ bx \}$ (the fractional part of $bx$), regardless of $b$ ( an integer $>1$) will work. Here I am trying to solve the case where the invariant distribution (the CDF) is $F\_X(x) = x^2$, also with the same support domain being $[0, 1]$. Of course, this is a fist step towards dealing with much more complicated $F\_X(x)$.


So, here is my investigation about $F\_X(x)=x^2$, and my question is about what is wrong with my analysis. I know something is wrong. First, $g$ must be a many-to-one mapping. The easiest case is when $g$ is a two-to-one mapping, as in the logistic map where $g(x)=4x(1-x)$, with $x\in [0, 1]$. Besides that, if the density $f\_X$ is symmetric around $x\_0$, then $g(\cdot)$ can not be symmetric around $x\_0$. The reason I say this is because I am focusing on mappings $g$ of $[0, 1]$ that are symmetric around some point $x\_0$, and in this case, $x\_0=\frac{1}{2}$. That is, $g(x)=g(1-x)$.


**My wrong solution that needs a fix**


Let $g$ be a two-to-one mapping, with $g(x)=g(1-x)$. If the (known) invariant distribution is $F\_X(x)$, then $g$ must satisfy the functional equation $f\_X(x)= f\_X(h\_1(x))-f\_X(h\_2(x))$ with $h\_1(x)=g^{-1}(x)$ being one of the two inverses of $g(x)$ when $x<1/2$, and $h\_2(x)=1-h\_1(x)$ being the other inverse. Based on this, we must have, using the notation $y=g^{-1}(x)$,


$$x^2 = y^2 - (1-y^2)$$


which results in $y = (x^2+1)/2$. Inverting this again, we get $x=\sqrt{2y-1}$, valid if $y\geq \frac{1}{2}$. It follows that $g(x)=\sqrt{2x-1}$ if $\frac{1}{2}\leq x \leq 1$, and $g(x) = \sqrt{1-2x}$ if $0\leq x \leq \frac{1}{2}$. Yet the true mean of the invariant distribution ($F\_X(x) = x^2$ on $[0, 1]$) does not seem to match that resulting from $g(\cdot)$ at equilibrium, when $n=\infty$. The system in question is ergodic.



Invariant distributions for iterated random variables (stochastic dynamical systems)
To have here the invariant distribution with cdf $F$ given by $F(x)=x^2$ for $x\in[0,1]$, all that is needed is a change of variables.


More generally, let $F$ be the cdf of any non-atomic distribution supported on an interval $I$ in $\mathbb R$. Let $F^{-1}$ denote the inverse of the restriction of $F$ to $I$. Let $U$ be a random variable uniformly distributed on $[0,1]$. Then the cdf of the random variable
$$X:=F^{-1}(U)$$
is $F$, and
$$U=F(X).$$


Suppose that a function $g\_\*$ is such that the uniform distribution on $[0,1]$ is invariant for the dynamical system $U\_{n+1}=g\_\*(U\_n)$ -- that is, $U\overset D=g\_\*(U)$, where $\overset D=$ means the equality in distribution. Then $F(X)\overset D=g\_\*(F(X))$, that is,
$$X\overset D=g(X),$$
where
$$g:=F^{-1}\circ g\_\*\circ F.$$
So, the distribution with the prescribed cdf $F$ is invariant for the dynamical system $X\_{n+1}=g(X\_n)$, as desired.


In particular, if $F(x)=x^2$ for $x\in[0,1]$ and
$g\_\*(u)=\{bu\}$ for $u\in[0,1]$, then
$$g(x)=\sqrt{\{bx^2\}}$$
for $x\in[0,1]$.


