Artificial intelligent assistant

Smallest $\sigma$-algebra such that $X$ is a random variable Let $X: \Omega \to \mathbb{R}$ be a random variable on a probability space $(\Omega, \mathcal{F}, \mathbb{P})$. It could be shown that $\Pi(X) := \\{ \\{X \leq x\\}: x \in \mathbb{R}\\} \subseteq \mathcal{F}$ is a $\pi$-system. Now, I want to show that $\Pi(X)$ generates $\sigma(X)$. Notwithstanding that this question is quite related to other posts, I have trouble to make ends meet according to the formulation of the above statement. If I am right, we want to show that \begin{align} \sigma(X) = \\{X^{-1}(B): B \in \mathcal{B}(\mathbb{R})\\}= \sigma(\\{\\{X\leq x\\}:x \in \mathbb{R}\\}). \end{align} However, I can not express how $\mathcal{B}(\mathbb{R})$ is generated $\neq \sigma\\{ \\{X \leq x\\} :x \in \mathbb{R}\\}$. Due to this indistinctness, I am not sure how to interchange the inverse image $X^{-1}$ in and out the $\sigma$ to find the result. Any help is appreciated!

Clearly $\Pi(X) \subset \sigma(X)$, which implies $\sigma(\Pi(X)) \subset \sigma(X)$.

The interesting part is the other inclusion. Let $M = \\{ B \in \mathcal{B}(\mathbb{R}) \mid X^{-1}(B) \in \sigma(\Pi(X))\\}$. By definition, $M$ contains all intervals of the form $(-\infty, x]$. This implies $$\mathcal{B}(\mathbb{R}) = \sigma(\\{(-\infty, x] \mid x \in \mathbb{R}\\}) \subset \sigma(M) = M \subset \mathcal{B}(\mathbb{R}),$$ since $M$ is itself a $\sigma$-Algebra (this is easy to verify).

Now we have proven $M = \mathcal{B}(\mathbb{R})$, which means $\sigma(X) \subset \sigma(\Pi(X))$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 5245755c46c3e8da719e5b5c274fe620