# Expectation/ independence of random variables

Let $X,Y$ be two correlated variables and $Z\sim N(0,1)$ independent of $X,Y$. Consider the expectation: $$E[f(X,Y)Z].$$ If $f(X,Y)$ and $Z$ are independent then clearly $E[f(X,Y)Z]=E[f(X,Y)]E[Z]=0$ but I guess this is not in general true. Nevertheless, I can argue as follows, by conditioning on $X$ and $Z$. \begin{align*} E[f(X,Y)Z]=& E[E[f(x,y)Z| X=x,Y=x]]\\ =&E\left[f(x,y)\frac{1}{\sqrt{2\pi}} \int_{-\infty}^\infty ze^{-z^2/2}dz \bigg|_{X=x,Y=y}\right]\\ =& 0. \end{align*}

I really wonder where the error is! Could anyone help me? :) Thank you very much!

• You can delete a question, not vandalize it. Oct 24, 2013 at 21:32
• @egreg Is that a fact, that anybody can delete a question? I haven't asked any questions, but I had an answer I wanted to delete, and wasn't able to because I had no "delete" button. I assumed that was because I'm an unregistered user, and I guessed that deleting answers must be a privilege of registered users.
– bof
Oct 24, 2013 at 21:57