# Conditional expectation of a product

I have an expression: $E[(b+X)^2|Y]$ where $X$ and $Y$ are normally distributed random variables, being two components of a final unknown outcome $Z$ ($Y$ is known, $X$ is the noise component):

$Y$ = $Z$ + $X$.

Their distributions are normal and independent: $X$ ~ $N(0,\sigma_x^2)$ and $Y$ ~ $N(0,\sigma_y^2)$.

Z and X are normally distributed and independent: $X$ ~ $N(0,\sigma_x^2)$ and $Z$ ~ $N(0,\sigma_z^2)$.

$b$ is just a linear function of, among other things, $Y$ : $b = \lambda_yY+\lambda_qQ+\delta$.

Sorry, I have no idea how to solve for the expectation...

-

## 1 Answer

Hi Apeirohedron,

your expectation is $\sigma_x^2 + b^2$, since $E[(b+X)^2|Y] = E[X^2|Y] + 2bE[X|Y] + b^2 = \sigma_x^2 + 2bE[X] + b^2 = \sigma_x^2 + b^2$. $E[X|Y] = E[X]$ holds since $X$ and $Y$ are independent.

In the general case: You know that $X$ and $Z$ are Gaussian. In particular, you know that $X\sim \mathcal N(0,\sigma_x^2)$ and $Y|X \sim \mathcal N(x,\sigma_z^2)$. Therefore, playing with conditional Gaussians, you get $X|Y \sim \mathcal N\left(\frac{y}{\sigma_z^2/\sigma_x^2 + 1},(\sigma_x^{-2}+\sigma_z^{-2})^{-1}\right)$. You can find the formulae for that in

Bishop CM. Pattern Recognition and Machine Learning (Information Science and Statistics). Springer; 2007.

on page 93. Your conditional expectation is, therefore, $E[X|Y] = \frac{y}{\sigma_z^2/\sigma_x^2 + 1}$.

-
What happens if the distributions are not independent? Sorry, I'm thinking through this again and I think I might have misunderstood. In fact, $Z$ and $X$ are unknown with distributions $Z$ ~ $N(0,\sigma_z^2)$ and $X$ ~ $N(0,\sigma_x^2)$. So Y is known but its components are not. I guess that means X and Y are not independent. – Apeirohedron Sep 12 '11 at 7:26
I updated the answer. If you know $\sigma_x$ and $\sigma_z$ then the above is your expectation (please double-check them before you use them for anything important). – fabee Sep 12 '11 at 12:49