Trouble understanding Iterated expection problem I'm having trouble understanding iterated expectations. Whenever I try to search for solid examples online, I get proofs or theoretical solutions. I found an example, but it doesn't have a solution or steps I can follow to understand the method. Here's the problem: $E(M) = \sum_{i=0}^{2} P(Z=i)(M|Z=i)$ The probabilities for $Z=0,1,$or $2$ are $0.1,0.2,0.7$. The range of values M can take on are $0,B,B+1,B+2$. So if $B = 0$ then $M$ can take on the values $0,1,2$, if $B = 1$, $M$ can take on the values $0,1,2,3$, etc. Can anyone help me solve something like this? I was thinking about brute force solving it by calculating every possibility, however is this how iterated expectations are suppose to be done because the few examples online seem to have short solutions and every possibility is not exhausted.

By the corresponding definitions:
$$E[M]=\sum_{j=0}^{4}jP(M=j)=\sum_{j=0}^{4}j\sum_{i=0}^{2} P(M=j,Z=i)=$$ $$\sum_{j=0}^{4}j\sum_{i=0}^{2} \frac{P(M=j,Z=i)}{P(Z=i)}P(Z=i)=$$
$$\sum_{i=0}^{2}\sum_{j=0}^{4} jP(M=j|Z=i)P(Z=i),$$
where
$$\sum_{j=0}^{4} jP(M=j|Z=i)=E[M|Z=i].$$
So
$$E[M]=\sum_{i=0}^{2}E[M|Z=i]P(Z=i).$$
But without knowing what the relationship is between $B$ and $Z$, and without knowing the probabilities that $M$ takes its values if $Z$ is given, I cannot proceed.
