Every countably generated sigma algebra is generated by a random variable

Suppose I have a sigma algebra which is countably generated. I want to find a random variable such that it is generated by that random variable. If the countable class is just a single set then my random variable is indicator function. But, how to do in this case ? If we sum up all the indicators to define our random variable then the sum may diverge. How to make sure it converge ?

Solutions Collecting From Web of "Every countably generated sigma algebra is generated by a random variable"

Hint: Each $\mathbf 1_{A_n}$ is measurable with respect to $X=\sum\limits_k\frac1{3^k}\mathbf 1_{A_k}$.

In the interests of completeness, we provide a complete solution.

Lemma. Let $X_1, X_2, \dots$ be a sequence of Bernoulli random variables $($not necessarily independent, not necessarily with same $p$-value$)$. Define$$Y = \sum_{i=1}^\infty {{2X_i}\over{3^i}}.$$Then $\sigma(Y) = \sigma(X_1, X_2, \dots)$.

Proof. Fix $n$, and consider the event $\{X_n \in I\}$, where $I \subset \mathbb{R}$ is an interval. If $I$ contains $0$ and $1$, then $\{X_n \in I\} = \Omega \in \sigma(Y)$. If $I$ contains neither $0$ nor $1$, then $\{X_n \in I\} = \emptyset \in \sigma(Y)$. If $I$ contains $1$, but not $0$, then $\{X_n \in I\} = \{X_n = 1\}$. This is the event that the $n$th digit in the ternary expansion of $Y$ is $2$, which occurs exactly when$$Y \in \bigcup_{k=1}^{3^{n-1}} \left[{k\over{3^{n-1}}} – {1\over{3^n}}, {k\over{3^{n-1}}}\right],$$which is a Borel set. Thus in this case, $\{X_n \in I\} \in \sigma(Y)$. If $I$ contains $0$, but not $1$, then $\{X_n \in I\} = \{X_n = 0\}$ and a similar argument to the preceding case shows $\{X_n \in I\} \in \sigma(Y)$. Since intervals generate the Borel $\sigma$-algebra on $\mathbb{R}$, it follows that $\sigma(X_1, X_2, \dots) \subset \sigma(Y)$.

Now, choose $x \in [0, 1]$ and write down a ternary expansion $x = 0.a_1a_2a_3\dots$. Then we have$$\{Y \ge x\} = \bigcup_{k=1}^\infty \left(\{2X_1 \le a_1\} \cap \{2x_2 \le a_2\} \cap \dots \cap \{2X_k > a_k\}\right) \in \sigma(X_1, X_2, \dots).$$Since the intervals $[x, \infty)$ generate the Borel $\sigma$-algebra on $\mathbb{R}$, it follows that $\sigma(Y) \subset \sigma(X_1, X_2, \dots)$.$\tag*{$\square$}$

Let $X: \Omega \to \mathbb{R}$ be a random variable. Recall that the Borel $\sigma$-algebra on $\mathbb{R}$ is countably generated; let $\{A_i\}$ be a countable generating collection for the Borel sets. It is an exercise left to the reader to show that every Borel set may be obtained by a sequence of countable unions and complementations of the $A_i$ $($alternatively, one can use the Dynkin $\pi$-$\lambda$ Theorem$)$. Since these operations are preserved under taking preimages, every event of the form $\{X \in B\}$, where $B$ is a Borel set, is included in $\sigma\left(X^{-1}(A_1), X^{-1}(A_2), \dots\right)$. Hence $\sigma(X)$ is countably generated, by the collection $\left\{X^{-1}(A_i)\right\}$.

Conversely, suppose $\mathcal{G}$ is countably generated, say by the collection $\{A_i\}$. For each $i \in \mathbb{N}$, define the random variable $X_i = \mathbb{1}_{A_i}$. Evidently, $\sigma(X_1, X_2, \dots) = \mathcal{G}$, since the event $\{X_i \in A_i\}$ is just $A_i$ for each $i \in \mathbb{N}$. Note that each $X_i$ is Bernoulli distributed, taking value $1$ with probability $P(A_i)$ and value $0$ with probability $1 – P(A_i)$. Thus, setting $Y = \sum(2X_i)/3^i$, the lemma implies that $\mathcal{G} = \sigma(Y)$.