# conditional expectation $E[{X_1}^2+{X_2}^2|X_1+X_2=t]$ of normal distributed variables

to find the conditional expectation $$E[{X_1}^2+{X_2}^2|X_1+X_2=t]$$

if $$X_i$$'s are independent and both are std. normal distributed.

My attempt: as given is $$X_1+X_2=t$$ , take $$X_2= t-X_1$$ and calculate

$$E[{X_1}^2+(t-X_1)^2]$$

$$=E[2{X_1}^2-2tX_1+t^2]=2E[{X_1}^2]-2tE[X_1]+t^2$$

$$=2+t^2$$

this gives a multiple of correct answer $$(=1+\frac{t^2}{2})$$ altough I'm not sure what is wrong in this method. Can smn point out mistakes if present?

Edit: I got a correct and easier solution other than the one mentioned so now I am just looking for a mistake in the one suggested Please.

• If there is an assumption of independence here that should be mentioned. – StubbornAtom Mar 24 at 13:37
• The mistake is that $\operatorname{E}(X_1^2 + (t - X_1)^2 \mid X_1 + X_2 = t) \neq \operatorname{E}(X_1^2 + (t - X_1)^2)$. – Maxim Mar 24 at 17:53
• is there a relation between the two? – Sri Krishna Sahoo Mar 25 at 11:24
• Not a direct relation, since you can add an arbitrary multiple of $X_1 + X_2 - t$ to $X_1^2 + X_2^2$, making the unconditional expectation of the result take any value. – Maxim Mar 27 at 20:59

One possible way is to note that for $$T=X_1+X_2$$, both $$(X_1,T)$$ and $$(X_2,T)$$ have the same bivariate normal distribution. In fact, $$(X_1,T)\sim N_2\left[ 0, \begin{pmatrix} 1& 1/\sqrt 2 \\ 1/\sqrt 2 & 2 \end{pmatrix}\right ]$$

This gives the conditional distribution $$X_1\mid T\sim N\left(\frac{T}{2},\frac{1}{2}\right)$$

Now use linearity of expectation to find $$E\left[X_1^2+X_2^2\mid T\right]=E\left[X_1^2\mid T\right]+E\left[X_2^2\mid T\right]$$

Another approach to find the conditional mean is shown in this answer.

And @Maxim points out your mistake correctly.

You cannot simply say that $$E\left[X_1^2+(t-X_1)^2\mid X_1+X_2=t\right]=E\left[X_1^2+(t-X_1)^2\right]$$. This is not true because $$X_1^2+(t-X_1)^2$$ is not independent of $$\{X_1+X_2=t\}$$. When you use linearity of expectation in the next step, the condition $$\{X_1+X_2=t\}$$ should remain.

• I don't quite understand the $X_1 \mid T \sim N(1/2, 1/2)$ notation. Do you mean $X_1 \mid (T = t) \sim N(t/2, 1/2)$? – Maxim Mar 24 at 17:48
• @Maxim Yes, corrected. Thank you. – StubbornAtom Mar 24 at 19:14

Let $$H = (X_1 + X_2 = t)$$. $$X_1 - X_2$$ and $$X_1 + X_2$$ are independent as uncorrelated components of a jointly normal distribution, therefore $$\operatorname{E}((X_1 - X_2)^2 \mid H) = \operatorname{E}((X_1 - X_2)^2), \\ 2 \operatorname{E}(X_1^2 + X_2^2 \mid H) = \operatorname{E}((X_1 + X_2)^2 \mid H) + \operatorname{E}((X_1 - X_2)^2 \mid H) = t^2 + 2.$$