Does $\mathbb E[f(X,Y)\mid X=x]=\mathbb E[f(x,Y)\mid X=x]$?

53 Views Asked by At

Does $$\mathbb E[f(X,Y)\mid X=x]=\mathbb E[f(x,Y)\mid X=x]\ \ ?$$

I know that if $X$ and $Y$ are independent, this hold, but does it still hold if they are not independent ?

I tried as follow :

suppose first $f(x,y)=h(x)g(y)$. Then $$\mathbb E[h(X)g(Y)\mid X]=h(X)\mathbb E[g(Y)\mid X]=h(X)\mathbb E[g(Y)\mid X]=h(X)\mathbb E[g(Y)]$$

So if $\varphi (x)=\mathbb E[h(X)g(Y)\mid X=x]$, then $$\varphi (X)=h(X)\mathbb E[g(Y)],$$ i.e. $$\mathbb E[h(X)g(Y)\mid X=x]=\varphi (x)=h(x)\mathbb E[g(Y)]=\mathbb E[h(x)g(Y)],$$ as wished. Now, can I do the same if $X$ and $Y$ are not independent ? (in this simple cas where $f(x,y)=h(x)g(y)$). If yes, does the general result hold whenever $f$ is bounded and measurable ?

1

There are 1 best solutions below

0
On

Yes. $\mathbb E[f(X,Y)]$ denotes the average value of $f(x, y)$ over infinite samples $(x, y)$ from $(X, Y)$ (from their respective distributions). Whereas $\mathbb E[f(X,Y)\mid X=x']$ means we find the average only over the $(x, y)$ points where $x=x'$. Note that while $X$ is still a r.v. its value is fixed as $x'$ and Hence, it makes no difference if we write $\mathbb E[f(X,Y) \mid X=x']$ or $\mathbb E[f(x',Y) \mid X=x']$.

You can also see this graphically, once we fix $X=x'$. The expectation is only over $Y$ and the function is along the line $X=x'$. Note distribution of $Y$ might change depending upon dependence of $X$ and $Y$. Hence, the formulae:

$$\ \mathbb E[f(X, Y) \mid X=x']=\sum_{y} f(x', y)Pr(Y=y \mid X=x') $$