Example of conditional expectation under finite probability space Let $\Omega$=$\{a,b,c,d\}$ and $\mathcal f$ be a collection of all subsets of $\Omega$.
If I wanted to list all the sets in $\Omega$, would I be right in writing:
$$f=\{\emptyset,a, b, c, d, ab, ac, ad, bc, bd, cd, abc, abd, bcd, acd, abcd\}$$
and there should be 16 sets because $2^4=16$.
Secondly, if I applied these probabilities to $\sigma(X)$: $$P(a)=1/6, P(b)=1/3, P(c)=1/4, P(d)=1/4,$$ and I define two random variables $X$ and $Y$ as:
$$X(a)=X(b)=1, X(c)=X(d)=-1$$
$$Y(a)=Y(c)=1, Y(b)=Y(d)=-1$$
$$Z=X+Y$$
How would I find these conditional expectations below for a,b,c, and d? $$E[Y|X]$$
$$E[Z|X]$$
$$E[Z|X] - E[Y|X]$$
For example for $E[Y|X]$, I have to find the expected value of $Y$ given $X$, but how do you calculate this in relation to the sigma algebra?
 A: I will do just one of the cases you ask about and leave the rest to you. 
The sigma-algebra generated by $X$ has as its atoms $ab$ and $cd$, because $X$ is constant on those sets. So, $\sigma(X) = \{\emptyset, ab, cd, abcd\}$.
By definition, the conditional expectation $E[Y \mid X]$ is a $\sigma(X)$-measurable random variable satisfying
$$\int_A E[Y \mid X] dP = \int_A Y dP, \ \ \forall A \in \sigma(X).$$
To say that $E[Y \mid X]$ is $\sigma(X)$-measurable in this context means simply that $E[Y \mid X]$ is constant on the atoms of $\sigma(X)$, which, as we saw above, are $ab$ and $cd$. So just from the $\sigma(X)$-measurability, we know we must have
$$E[Y \mid X](a) = E[Y \mid X](b) \,\ \text{and} \,\ E[Y \mid X](c) = E[Y \mid X](d).$$
By the integration property, we know that $E[Y \mid X]$ must preserve averages over $A \in \sigma(X)$. Take $A = ab$, for example. $Y$'s average over $ab$ is $0$, so $E[Y \mid X]$'s average over $ab$ must be $0$ as well. But, in view of $E[Y \mid X](a) = E[Y \mid X](b)$, this is possible only if $E[Y \mid X](a) = E[Y \mid X](b)=0$. The exact same reasoning applies to $cd$. Thus, we conclude that $E[Y \mid X]$ is everywhere equal to $0$.
