conditional expectation of squared standard normal

Let $A,B$ independent standard normals. What is $E(A^2|A+B)$?

Is the following ok?

$A,B$ iid and hence $(A^2,A+B),(B^2,A+B)$ iid. Therefore we have $\int_M A^2 dP = \int_M B^2 dP$ for every $A+B$-measurable set $M$ and hence $E(A^2|A+B) = E(B^2|A+B)$.

We obtain $2 \cdot E(A^2|A+B) = E(A^2|A+B) + E(B^2|A+B) = E(A^2+B^2|A+B) = A^2+B^2$ where the last equation holds since $A^2+B^2$ is $A+B$-measurable.

Finally we have $E(A^2|A+B) = \frac{A^2+B^2}{2}$.

• Note that you don't actually know $A$ and $B$, only their sum, which isn't sufficient to calculate $A^2 + B^2$ in your last line. – jbowman Dec 16 '13 at 19:03
• Hint: $X=(A+B)$ and $Y=(A-B)$ are iid normals (each has variance $2$) and $A^2+B^2=(X^2+Y^2)/2.$ Can you find $\frac{1}{2}\mathbb{E}(X^2+Y^2|X)$? – whuber Dec 16 '13 at 22:00

There are similar questions on CV, but I haven't seen anyone give the details on the distribution of $A,$ so here goes.

Let $Z = A+B.$ Following the logic given by Xi'an here: Simulation involving conditioning on sum of random variables , the pdf for $A| Z$ is

$$f_{A|Z}(a|z)=\frac{f_B(z-a) f_A(a)}{f_Z(z)}=\frac{\frac{1}{\sqrt{2 \pi}}e^{-\left(z-a \right)^2 \over 2 } \frac{1}{\sqrt{2 \pi}}e^{-a^2 \over 2}}{\frac{1}{\sqrt {4 \pi}} e^{{-z^2 \over 4 }}}$$

This simplifies to $$f_{A|Z}(a|z) = \frac{1}{\sqrt{\pi}} \ e^{- \left( a-\frac{z}{2} \right)^2}$$

If we let $w=\frac{1}{\sqrt{2}}$ then we can write it as

$$f_{A|Z}(a|z) = \frac{1}{\sqrt{2 \pi w^2}} \ e^{- \left( a-\frac{z}{2} \right)^2 \over 2w^2} \$$

Now we can see the conditional distribution is normal with mean $z \over 2$ and variance $\frac{1}{2}.$

So to answer the question, since for any random variable $X$ with finite variance we know that $E[X^2]=\mu^2+\sigma^2,$ we have

$$E[A^2|A+B=z]=\left( \frac{z}{2} \right)^2 + \frac{1}{2}= \frac{z^2+2}{4} = \frac{\left( A + B \right)^2+2}{4}$$