I need to check if the following formula is correct.
$$ \mathrm{E}(Z \vert X=x)=\sum_{y} \mathrm{E}(Z \vert X=x,Y=y)\mathrm{P}(Y=y \vert X=x) $$
Just as a reference, Law of total expectation states that $\mathrm{E}(Z)= \sum_{x} \mathrm{E}[Z \vert X=x]\mathrm{P}(X=x)$
Any help would be much appreciated :)