In coin toss $X$ -be the number of $H$s in $3$ tosses. $Y$ - random variable corresponding to the number of $H$s in first four tosses, $\mathcal{G}=σ(Y)$.
I need to $E[X\mid\mathcal{G}]$.
As I understand at first I need to construct -
For $\Omega = \{\sf TTT, TTH, HTT, THT, HTH, THH, HHT, HHH\}$ and $Y:\Omega\to \{0,1,2,3,4\}$, where $Y$ is the count of heads in the first four tosses, so:
$$\begin{align}Y^{-1}\{0\}=&~\{{\sf TTT}\} \\ Y^{-1}\{1\} = &~\{{\sf TTH,HTT,THT}\}\\ Y^{-1}\{2\}=&~\{{\sf THH, HHT, HTH}\}\\Y^{-1}\{3\}=&~\{{\sf HHH}\} \\Y^{-1}\{4\}=&~\{{\sf-}\}\end{align}$$
As $\mathcal G$ is the sigma algebra generated by random variable $Y$ : $$\mathcal G=\sigma( Y ) = \{\varnothing, Y^{-1}\{0\}, Y^{-1}\{1\}, Y^{-1}\{2\}, Y^{-1}\{3\}, Y^{-1}\{4\}, Y^{-1}\{0,1\}, Y^{-1}\{0,2\}, Y^{-1}\{0,3\}, Y^{-1}\{0,4\}, Y^{-1}\{1,2\}, Y^{-1}\{1,3\}, Y^{-1}\{1,4\}, Y^{-1}\{2,3\}, Y^{-1}\{2,4\}, Y^{-1}\{3,4\} \Omega\}$$
$$\mathsf E(X\mid \mathcal G)(\gamma)=\begin{cases} 0 & : \gamma= \varnothing\\ 0 & : \gamma= Y^{-1}\{0\}\\ 1 & : \gamma= Y^{-1}\{1\}\\ 2 & : \gamma= Y^{-1}\{2\}\\ 3 & : \gamma= Y^{-1}\{3\}\\ \text{undef} & : \gamma= Y^{-1}\{4\}\\ 3/4 & : \gamma= Y^{-1}\{0,1\}\\ 3/2 & : \gamma= Y^{-1}\{0,2\}\\ 3/2 & : \gamma= Y^{-1}\{0,3\}\\ 0 & : \gamma= Y^{-1}\{0,4\}\\ 4/3 & : \gamma= Y^{-1}\{1,2\}\\ 3/2 & : \gamma= Y^{-1}\{1,3\}\\ 1 & : \gamma = Y^{-1}\{1,4\}\\ 9/4 & : \gamma = Y^{-1}\{2,3\}\\ 2 & : \gamma= Y^{-1}\{2,4\}\\ 3 & : \gamma= Y^{-1}\{3,4\} \\ 3/2 & : \gamma= \Omega\\ \text{undef} & : \gamma\notin\mathcal G\end{cases}$$
It seems to be wrong, can somebody, please, show me right direction?