How $\sigma$-algebra determines random variable? In my probability textbook there is a statement saying that

Knowing the $\sigma$-algebra $\sigma(X)$ generated by a random variable $X$ is equivalent to knowing $X$ itself. We equate $\sigma(X)$ to our everyday term "information".

Here, sigma-algebra generated by a random variable is defined as the following.

Suppose $X:(\Omega,\cal{F}) \to$ $(E,\cal E)$, then the sigma-algebra generated by $X$ is $\sigma(X)=\sigma\{X^{-1}(A):A\in \cal E \}$, i.e. the sigma-algebra generated by $\{X^{-1}(A):A\in \cal E \}$.

The following is my understanding with confusion.


*

*If we know the random variable $X$, which is a function mapping elements in $\Omega$ to $E$, then clearly we can determine $\sigma(X)$ by its definition. This direction is OK to me.

*For the other direction, if $\sigma(X)$ is known, then how $X$ is determined? For example, suppose $\Omega=\{1,2,3,4,5,6\}, E=\{0,1\}$ and $\sigma(X)=\{\emptyset,\Omega, A, A^C\}$ where $A=\{1,3,5\}$. Now it seems that we have two possibilities, $X(x) = \left\{ {\begin{array}{*{20}{c}}
0&{x \in A}\\
1&{x \in {A^C}}
\end{array}} \right.$ and $X(x) = \left\{ {\begin{array}{*{20}{c}}
1&{x \in A}\\
0&{x \in {A^C}}
\end{array}} \right.$. It looks to me that knowing only the $\sigma(X)$ can not help distinguish between the two.
The above seems to be very basic in probability theory and it affects my understanding of some later claims. For example, my textbook states the following theorem for conditional expectation. I don't understand why the following argument is true.

Given two random variable $X,Y$ where $Y$ is $\cal F_0$ measurable and $\cal F_0$ is a sub $\sigma$-algebra of $\cal F$, then $\Bbb{E}(XY|\cal F_0)$$=Y\Bbb{E}(X|\cal F_0)$. The argument is that $Y$ is determined given $\cal F_0$, so it can be moved outside of the expectation.

I have to understand this clearly. Thank you!
 A: There are two conflicting meanings of "is determined by" in use in the question: Are we talking about knowing the function $Y:\Omega\rightarrow\mathbb{R}$, or are we assuming we already know the function and we want to know what particular value that function takes based on some additional side information?

*

*Clearly two different random variables $Y:\Omega\rightarrow\mathbb{R}$ and $W:\Omega\rightarrow\mathbb{R}$ can generate the same sigma algebra, so that $\sigma(Y)=\sigma(W)$. For example, we always have $\sigma(Y)=\sigma(2Y)$. Also, we always have $\sigma(Y)=\sigma(Y+1)$. The OP gives a better example by permuting the values the random variable can take. So if we only know the sigma algebra $\sigma(Y)$, we do not know what function $Y:\Omega\rightarrow\mathbb{R}$ was used to generate that sigma algebra. We cannot say that the entire function $Y:\Omega\rightarrow\mathbb{R}$ "is determined by" the sigma algebra $\sigma(Y)$.


*However, if we assume we already know the function $Y:\Omega\rightarrow\mathbb{R}$, then the phrase "is determined by" can  refer to what specific value this function takes. For example, we can say that $Y$ "is determined by the outcome $\omega \in \Omega$" because if we know $\omega$ then we know the value $Y(\omega)$.
Consider any probability space $(\Omega, \mathcal{F}, P)$. Let $\mathcal{G}$ be a subsigma algebra of $\mathcal{F}$. Suppose $Y:\Omega\rightarrow\mathbb{R}$ is a random variable that is $\mathcal{G}$-measurable. This means that
$$\{Y \in B\} \in \mathcal{G} \quad \forall B \in \mathcal{B}(\mathbb{R})$$
where $\mathcal{B}(\mathbb{R})$ is the standard Borel sigma algebra on $\mathbb{R}$. Since $(-\infty, y] \in \mathcal{B}(\mathbb{R})$ for every real number $y$, it means that
$$\boxed{\{Y \leq y\} \in \mathcal{G} \quad \forall y \in \mathbb{R}}$$
Intuitively we can interpret "knowing the sigma algebra $\mathcal{G}$" by knowing the truth/falsehood of every event in any countable collection of events that we choose from $\mathcal{G}$.  That is, imagine that we know the function $Y:\Omega\rightarrow\mathbb{R}$. Imagine that a friend randomly picks an outcome $\omega \in \Omega$. Our friend does not tell us the chosen $\omega$, but tells us, for each $y$ in the set of rational numbers $\mathbb{Q}$, whether or not $Y(\omega) \leq y$.  So we have this side information. From this side information we can find
$$\inf \{y \in \mathbb{Q}: Y(\omega)\leq y\}$$
This infimum is in fact the exact value of $Y(\omega)$.  [Notice that we can determine $Y(\omega)$ but we cannot necessarily determine $\omega$.]
