Show that $\mathbb{E}[Xg(Y)|Y] = g(Y) \mathbb{E}[X|Y]$

960 Views Asked by At

This is a slightly modified question from Sheldon Ross 9th ed. Assume all RVs are discrete. I am asked to prove the following equality

$$\mathbb{E}[Xg(Y)|Y] = g(Y) \mathbb{E}[X|Y]$$ Here is my attempt:

\begin{align*} \mathbb{E}[Xg(Y)|Y = y] & = \sum\limits_x x g(y) \Pr[Xg(Y) = xg(y)|Y=y] \\ & = \sum\limits_x x g(y) \Pr[Xg(y) = xg(y)|Y=y] \\ & = g(y)\sum\limits_x x \Pr[X = x|Y=y] = g(y) \mathbb{E}[X|Y=y] \end{align*}

And hence $\mathbb{E}[Xg(Y)|Y] = g(Y) \mathbb{E}[X|Y]$.

Can anyone comment if this attempt is correct? I am primarily uncomfortable with the step $\Pr[Xg(Y) = xg(y)|Y=y] = \Pr[Xg(y) = xg(y)|Y=y] $. I don't have a good justification for this step except seeing some other examples.

1

There are 1 best solutions below

0
On BEST ANSWER

You are taking the weighted sum over all $x$ in the support for $X$ when given $Y=y$. Your weighting function is just the conditional probability for $X=x$ given $Y=y$.

Modifying your attempt:

$$\begin{align*} \mathbb{E}[Xg(Y)\mid Y = y] & = \sum\limits_x x g(y) \Pr[X=x\mid Y=y] \\ & = g(y)\sum\limits_x x \Pr[X = x\mid Y=y] \\ & = g(y) \mathbb{E}[X\mid Y=y] \end{align*}$$

Which is okay for discrete random variable $X$, and the more general result has an analogous form.