Is there a way to write conditional expectation as an integral? Let $E[X|G]$ be a random variable that is G-measurable and satisfies the partial averaging property, then we know that $E[X|G]$ is a conditional expectation. This is the definition I saw from Shreve's Stochastic Calculus for finance. 
Is there a way to write $E[X|G]$  some sort of integral?
If there is, it might be possible to prove the following properties using the integral.
(i) E[XY|G] = XE[Y|G] is X is G-measurable
(ii) E[E[Y|G]|H] = E[Y|H] where H is a sub sigma-algebra of G.
 A: Conditional expectation is defiend as follow:
Conditional expectation of $X$ given $\mathcal{F}$, $\mathbb{E}[X|\mathcal{F}]$, to be any random variable $Z$ that has


*

*$Z\in\mathcal{F}$, i.e.,$Z$ is $\mathcal{F}$ measurable.

*For every $A\in\mathcal{F}$ $\int_A X d\mathbb{P}=\int_A Z d\mathbb{P}$


(i)
$X$ is $\mathcal{G}-$ measurable. By definition of conditional expectation $\mathbb{E}[Y|\mathcal{G}]$ is $\mathcal{G}-$ measurable, thus $X\,\mathbb{E}[Y|\mathcal{G}]$ is $\mathcal{G}-$ measurable.
Let $X=\mathbb{1}_{A_1}$ where $A_1\in\mathcal{G}$ and set $Z=\mathbb{E}[Y|\mathcal{G}]$. For every, $A\in\mathcal{G}$ we have
$$\int_{A}XYd\mathbb{P}=\int_{A}\mathbb{1}_{A_1}Yd\mathbb{P}=\int_{A\,\cap\, A_1}Y\,d\mathbb{P}=\int_{ A\cap A_1}Z\,d\mathbb{P}=\int_{A}\mathbb{1}_{A_1}Z\,d\mathbb{P}=\int_{A}XZ\,d\mathbb{P}$$
Now let $X=\sum\limits_{k=1}^{n}\mathbb{1}_{A_k}$, where $A_k\in\mathcal{G}$, for $k=1,\cdots ,n$, we have
$$\int_{A}XYd\mathbb{P}=\int_{A}\sum\limits_{k=1}^{n}\mathbb{1}_{A_k}Yd\mathbb{P}=\sum\limits_{k=1}^{n}\int_{A}\mathbb{1}_{A_k}Yd\mathbb{P}=\sum\limits_{k=1}^{n}\int_{A}\mathbb{1}_{A_k}Z\,d\mathbb{P}=\int_{A}\sum\limits_{k=1}^{n}\mathbb{1}_{A_k}Z\,d\mathbb{P}\\\int_{A}XYd\mathbb{P}=\int_{A} XZd\mathbb{P}$$
If $X\ge 0$ then there is a non-decreasing sequence like $\{X_n\}_{n=1}^{\infty}$ such that for every $n=1,2\cdots,$ $X_n$ is a simple random process and ${{X}_{n}}\uparrow \,{{X}}$.In this case, we should use Monotone convergence theorem. If $X$ is not positive random process then use $X=X^+-X^-$.
(ii)
$\mathbb{E}[Y|\mathcal{H}]$ is $\mathcal{H}-$ measurable . since $\mathcal{H}\subset\mathcal{G}$ therefore $\mathbb{E}[Y|\mathcal{H}]$ is $\mathcal{G}-$ measurable. Set $Z_1=\mathbb{E}[Y|\mathcal{H}]$ and $Z_2=\mathbb{E}[Y|\mathcal{G}]$ for every $A\in \mathcal{G}$, we have
$$\int_A Z_1d\mathbb{P}=\int_A Yd\mathbb{P}=\int_A Z_2d\mathbb{P}$$
