# Law of Iterated Expectation with Probability?

I'm trying to follow a proof of the following proposition (source)

Let X and Y be two independent random variables and denote by $F_X(x)$ and $F_Y(y)$ their distribution functions. Let

$$Z=X+Y$$

and denote the distribution function of Z by $F_Z(z)$. The following holds:

$$F_Z(z)=E[F_X(z-Y)]$$ $$or$$ $$F_Z(z)=E[F_Y(z-X)]$$

Proof

$$F_Z(z)=P(Z\leq z)$$ $$\hspace{21mm } = P(X+Y \leq z)$$ $$\hspace{21mm } = P(X\leq z - Y)$$ $$\hspace{21mm } = E[P(X \leq z - Y | Y=y)] \hspace{5mm} \text{(by the law of iterated expectation)}$$ $$\hspace{21mm } = E[F_X(z-Y)]$$

The second formula is symmetric to the first

I tried my best with the formatting, but my question is about the step that requires the law of iteracted expectation. In all the explanations I've found online about this law its of the form $E[E[X|Y]]=E[X]$. I'm kind of lost as to how there using this law with probabilities and not expectations. Why is that step valid?

Any guidance would be much appreciated

• it's "they are"*. How much do you know about conditional expectation? – hHhh Jun 30 '15 at 21:15
• $E\{1\{X\le z-Y\}|Y=y\}=P\{X\le z-Y|Y=y\}$ – d.k.o. Jun 30 '15 at 21:15
• $P(X\leq z - Y)= E[P(X \leq z - Y | Y=y)]$ is incorrect (what would be this $y$ in the RHS), use instead $P(X\leq z - Y)= E[P(X \leq z - Y | Y)]$. – Did Jun 30 '15 at 23:46

I'm not sure I understand completely your question but did you notice that for any event $A$,
$$\mathbb{P}(A) = \mathbb{E}(\mathbb{1}\{A\}),$$
where $1$ is the indicator function ?