# What is the formula for this conditional joint expectation?

Given an arbitrary joint PMF $$p_{X,Y}(x, y)$$, we know that the expectation of some $$g(x)$$ or $$X$$ and $$Y$$ is:

$$\displaystyle{\mathbf E[g(X,Y)] = \sum\limits_{x}\sum\limits_{y} g(x,y)\cdot p_{X,Y}(x,y)}$$

If the formula of the conditional expectation of some $$f(X,Y\mid Y=y)$$ as follow?

$$\displaystyle{\mathbf E[f(X,Y\mid Y = y)] = \sum\limits_{x}\sum\limits_{y} f(x,y)\cdot p_{X,Y\,\mid\, Y=y}(x,y\,\mid\,Y=y)}$$

Thanks!!!

• Found something similar, but not sure how to relate $\displaystyle{\mathbf E[Z\mid Y = y] = \sum\limits_{z\in\,\textrm{range}\{Z\mid Y = y\}} z\cdot p_{Z\,\mid\, Y = y}(z\,\mid\,Y = y)}$. – muxo Feb 14 at 13:23