Example for $E[E(X\mid\mathcal{G_1})\mid\mathcal{G_2}] \ne E[E(X\mid\mathcal{G_2})\mid\mathcal{G_1}]$ If $X$ is an integrable random variable on probability space $(\Omega, \mathcal{F}, \mathbb{P})$ and $\mathcal{G_1}, \mathcal{G_2}$ sub sigma fields of $\mathcal{F}$ then how can we find an example where  $\Omega = \{a, b, c\}$ in which
$$E[E(X\mid\mathcal{G_1})\mid\mathcal{G_2}] \ne E[E(X\mid\mathcal{G_2})\mid\mathcal{G_1}].$$
I would really appreciate if you could analytically show the steps of conclusion. I am self learning.
 A: $\def\Ω{{\mit Ω}}\def\F{\mathscr{F}}\def\G{\mathscr{G}}\def\emptyset{\varnothing}$Take $\F = 2^\Ω$ and denote $p(ω) = P(\{ω\})$ for $ω \in \Ω = \{a, b, c\}$. If$$
\G_1 = \{\Ω, \emptyset, \{a\}, \{b, c\}\},\ \G_2 = \{\Ω, \emptyset, \{b\}, \{a, c\}\},$$
then for any random variable $X$ on $(Ω, \F)$,\begin{gather*}
E(X \mid \G_1)(ω) = \begin{cases}
X(a); & ω \in \{a\}\\
\dfrac{p(b) X(b) + p(c) X(c)}{p(b) + p(c)}; & ω \in \{b, c\}
\end{cases},\\
E(X \mid \G_2)(ω) = \begin{cases}
X(b); & ω \in \{b\}\\
\dfrac{p(a) X(a) + p(c) X(c)}{p(a) + p(c)}; & ω \in \{a, c\}
\end{cases},
\end{gather*}
which implies\begin{gather*}
E(E(X \mid \G_1) \mid \G_2)(ω) = \begin{cases}
\dfrac{p(b) X(b) + p(c) X(c)}{p(b) + p(c)}; & ω \in \{b\}\\
\small\dfrac{p(a)(p(b) + p(c)) X(a) + p(b)p(c) X(b) + (p(c))^2 X(c)}{(p(a) + p(c))(p(b) + p(c))}; & ω \in \{a, c\}
\end{cases},\\
E(E(X \mid \G_2) \mid \G_1)(ω) = \begin{cases}
\dfrac{p(a) X(a) + p(c) X(c)}{p(a) + p(c)}; & ω \in \{a\}\\
\small\dfrac{p(a)p(c) X(a) + p(b)(p(a) + p(c)) X(b) + (p(c))^2 X(c)}{(p(a) + p(c))(p(b) + p(c))}; & ω \in \{a, c\}
\end{cases}.
\end{gather*}
In order to have $E(E(X \mid \G_1) \mid \G_2) ≠ E(E(X \mid \G_2) \mid \G_1)$, it suffices to make$$
E(E(X \mid \G_1) \mid \G_2)(a) ≠ E(E(X \mid \G_2) \mid \G_1)(a),$$
i.e.$$
\frac{p(a)(p(b) + p(c)) X(a) + p(b)p(c) X(b) + (p(c))^2 X(c)}{(p(a) + p(c))(p(b) + p(c))} ≠ \frac{p(a) X(a) + p(c) X(c)}{p(a) + p(c)},
$$
which can be simplified as $X(b) ≠ X(c)$ assuming $p(ω) > 0$ for $ω \in \Ω$.
To summarize, it suffices to take $p(a) = p(b) = p(c) = \dfrac{1}{3}$ and $X = I_{\{c\}}$.
