I'm quite new to statistics and I'm struggling with this problem.

Two random variables $X$ ~ Normal$(1, 2)$ and conditioning on $X = x$, $Y$ ~ Normal$(x + 2, 3)$. I want to find $\mathbb{E}[XY]$. This is what I've tried:

$$\begin{align}\mathbb{E}[XY] &= \mathbb{E}[\mathbb{E}[XY|X]]\\&=\mathbb{E}[X\mathbb{E}[Y|X]]\end{align}$$

I have two questions:

  1. Is moving $X$ from inside the inner expectation out to the outer expectation considered valid? And why is that?
  2. Suppose the answer to 1 is yes, how would I proceed from here? I'm thinking of replacing $\mathbb{E}[Y|X]$ with $X + 2$. Am I on the right track?

2 Answers 2


Yes, moving $X$ out of the conditional expectation is right. This is a general property of conditional expectations: $E(XY|\mathbb G)=XE(Y|\mathbb G)$ if $X$ is measurable w.r.t. $\mathbb G$.

By hypothesis the mean of $Y$ given $X$ is $X+2$. Hence $EXY=E(X(X+2))=EX^{2}+2EX =5$.

  • $\begingroup$ Thank you very much. Does that property have a name? Where can I read more about it? $\endgroup$
    – Mike Pham
    Sep 23, 2019 at 9:14
  • $\begingroup$ It doesn't have a name but many books on Probability Theory prove it. You can look at Billingsley, Breiman, Chung etc. $\endgroup$ Sep 23, 2019 at 9:16
  • $\begingroup$ @KaboMurphy I guess the answer will be $E[XY]=E[X^2 + 2X]=1^2+2+2\times1=5$. $\endgroup$
    – MUB
    Nov 12, 2019 at 17:22
  • $\begingroup$ @MUB Thank you for the correction. $\endgroup$ Nov 12, 2019 at 23:12

1) Yes, it is valid.

Let us work on probability space $(\Omega,\mathcal A,P)$ and let $\mathcal V$ denote a sub $\sigma$-algebra of $\mathcal A$.

By definition we have for suitable random variable $Y$ defined on that space: $$\mathbb E[\mathbf1_AY]=\mathbb E[\mathbf1_A\mathbb E[Y\mid \mathcal V]]\text{ for every }A\in\mathcal V\tag1$$

Now in the special case $\mathcal V=\sigma(X)$ where $X$ denotes a random variable on the space we have: $$\mathcal V=\{\{X\in B\}\mid B\in\mathcal B\}$$ where $\mathcal B$ denotes the Borel $\sigma$-algebra on $\mathbb R$.

That means that $(1)$ can be rewritten as:$$\mathbb E[\mathbf1_B(X)Y]=\mathbb E[\mathbf1_B(X)\mathbb E[Y\mid X]]\text{ for every }B\in\mathcal B\tag2$$

We recognize this as a statement about indicator functions $1_B:\mathbb R\to\mathbb R$ but fortunately it can be proved that this goes further. It can be proved (give it a try) that it works for any suitable Borel-measurable function $f:\mathbb R\to\mathbb R$ leading to:$$\mathbb E[f(X)Y]=\mathbb E[f(X)\mathbb E[Y\mid X]]\tag3$$

So put $(3)$ in your "probability-backpack".

A special case is then the application of this on the identity function, leading to:$$\mathbb E[XY]=\mathbb E[X\mathbb E[Y\mid X]]$$and this is applied in your question.

2) Yes, you are on the right track.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.