Example of independent and identically distributed random variables Consider the probability space $(\Bbb [0, 1], \mathcal{B}, \mu),$ where $\mathcal{B}$ denotes the Borel sigma algebra in $[0, 1],$ and $\mu$ is the standard Lebesgue measure restricted to $[0, 1]$. Could you please provide an example (mathematically defined) of two absolutely continuous random variables $X_1, X_2 : ([0, 1], \mathcal{B}, \mu) \rightarrow \Bbb R$ that are independent and identically distributed?
 A: Let, for all $x \in [0,1]$, $X_1(x) := \sum^{\infty}_{n=1} \lfloor \frac{x}{2^{2n}} \rfloor \frac{1}{2^n}$ and $X_2(x) := \sum^{\infty}_{n=1} \lfloor \frac{x}{2^{2n-1}}\rfloor \frac{1}{2^n}$.
I leave you, as an exercise, to prove that $X_1$ and $X_2$ are indeed iid.
Hints:

*

*For every $k \in \mathbb{N}$, and $n \in \mathbb{N}^*$, compute $X^{-1}_1([\frac{k}{2^n},\frac{k+1}{2^n}))$ and $X^{-1}_2([\frac{k}{2^n},\frac{k+1}{2^n}))$. Each of these should be a dyadic interval.


*Deduce from this that $X_1$ and $X_2$ are both uniform and independent.
A: One can actually build explicitly two iid random variables $X_1$ and $X_2$ on $([0,1], \mathcal{B}, \mu)$ with any given distribution (even not absolutely continuous), noticed that it is possible to define two independent uniform variables $U_1$ and $U_2$. Indeed, if $F$ is the given cdf then we can put (for $i=1,2$):
$$X_i:=G(U_i)$$
where $G(x):=\inf \left\{t \in \mathbb{R}: F(t) \leq x \right\}$. So the problem consists in finding the expression of $U_1$ and $U_2$.
The way to construct such uniform variables exists and is described in
Existence of independent and identically distributed random variables.. Basically the idea is to define:
$$B_k(x):= k\mbox{-th binary digit of }x$$
and then
$$U_1(x):=\sum_{k=1}^\infty B_{\varphi(k)}(x) 2^{-k}$$
$$U_2(x):=\sum_{k=1}^\infty B_{\psi(k)}(x) 2^{-k}$$
where (for example) $\varphi(k)=2k$ and $\psi(k)=2k-1$ (digits in odd place and in even place "do not speak" to each other, and each of them gives a uniform random number in $[0,1]$). Note that in this way (see the linked post) we can actually define a sequence of iid uniform variables, and hence a sequence of iid variables on $[0,1]$ with any given distribution.
