Simple conditional expectation on sigma algebra question

Let's say we are tossing two fair coins. Let $$X$$ be the random variable representing the number of heads.

$$X$$ is defined on $$(\Omega, F, P)$$ where $$\Omega = \{HH,HT,TH,TT\}$$.

Say if we want to find $$E[X|G]$$ where $$G$$ is a $$\sigma$$-algebra which contains the information about the first coin toss. It is clear $$G=\{\emptyset, \Omega,\{HH,HT\},\{TT,TH\} \}$$, where $$G \subset F$$. By definition, we know that $$E[X|G]$$ is a random variable mapping $$\Omega \rightarrow \mathbb{R}$$

Intuitively we know that the conditional expectation of X given the first toss is a $$H$$ is $$1.5$$, and the conditional expection of X given the first toss is a $$T$$ is $$0.5$$

However, when we are evaluating this quantity formally, using $$E[X|G](\omega)$$, wouldn't this mean we already know $$\omega$$? Why isn't $$E[X|G](HH)$$ simply $$2$$?

I do not understand why $$E[X|G]$$ takes the input $$\omega \in \Omega$$, instead of a set $$s \in G$$?

Any help is greatly appreaciated!

Just a thought (can someone confirm if this is correct?): By evaluating $$E[X|G](HH)$$ we do not actually know $$\omega = HH$$, but simply that $$\omega \in \{HH,HT\}$$ since all we are given is $$G$$

Let $$Y$$ denote the number of heads thrown at the first toss.

$$\mathbb E[X\mid G]:\Omega\to\mathbb R$$ has the following properties:

• it is measurable wrt $$G$$ or equivalently some $$f:\mathbb R\to\mathbb R$$ exists with $$\mathbb E[X\mid G]=f(Y)$$
• for every $$B\in G$$ we have: $$\mathbb E[\mathbb E[X\mid G]\mathbf1_B]=\mathbb EX\mathbf1_B$$

Combining the bullets we find that $$\mathbb Ef(Y)\mathbf1_B=\mathbb EX\mathbf1_B\text{ for every }B\in G$$

Substituting $$B=\{HH,HT\}$$ in the second bullet we find:$$\frac14f(1)+\frac14f(1)+\frac140+\frac140=\frac142+\frac141+\frac140+\frac140$$ telling us that $$f(1)=\frac32$$.

Substituting $$B=\{TT,TH\}$$ in the second bullet we find:$$\frac140+\frac140+\frac14f(0)+\frac14f(0)=\frac140+\frac140+\frac140+\frac141$$ telling us that $$f(0)=\frac12$$.

$$\mathbb E[X\mid G]$$ is defined for every $$\omega\in\Omega$$ and is prescribed as follows:

• $$HH\stackrel{Y}{\to}1\stackrel{f}{\to}\frac32$$
• $$HT\stackrel{Y}{\to}1\stackrel{f}{\to}\frac32$$
• $$TT\stackrel{Y}{\to}0\stackrel{f}{\to}\frac12$$
• $$TH\stackrel{Y}{\to}0\stackrel{f}{\to}\frac12$$
• Thanks a lot for the answer, this was very helpful! I have a quick question regarding $f(Y)$. Is there a way to evaluate this quality without setting $E[X|G] = f(Y)$? – Putter Lertplakorn Oct 17 '18 at 15:59
• The essence is that $\mathbb E[X|G]$ is constant on the sets $\{HH,HT\}$ and $\{TT,TH\}$. That comes to same as that it factors through $Y$. I used that in my answer but you can also focus on "being constant on..." itself. – drhab Oct 18 '18 at 8:51