Conditional expectation of $X$ given $X+Y=5$ of a bivariate normal distribution

bivariate-distributionsconditional-expectationprobabilitystatistics

Random variables X and Y have a bivariate normal distribution. If the parameters are $\sigma_x,\sigma_y,\mu_x, \mu_y, \rho$, how do we express $E(X|X+Y=5)$ using those parameters?

The conditional expectation is given by $\mathbb{E}[X|Z=z]=\mu_X+\sigma_X\rho(\frac{\displaystyle z-\mu_Z}{\displaystyle \sigma_Z})$. Maybe we can let $Z=X+Y$ but then our expression would not have the parameters in terms of Y.

Best Answer

Using

$$f(X|X+Y=5)=\frac{f(X+Y=5|X)f(X)}{f(X+Y=5)}$$

The pieces are

$$\begin{split}Y|X&\sim\text{Normal}\left( \mu_2+\rho\sigma_2\left(\frac{x-\mu_1}{\sigma_1}\right), (1-\rho^2)\sigma_2^2\right)\\ X&\sim\text{Normal}\left(\mu_1, \sigma_1^2\right)\\ X+Y&\sim\text{Normal}\left(\mu_1+\mu_2, \sigma_1^2+\sigma_2^2+2\rho\sigma_1\sigma_2\right)\end{split}$$

The conditional density is $$f(X|X+Y=5)=\frac{\sqrt{\sigma_1^2+\sigma_2^2+2\rho\sigma_1\sigma_2}}{\sqrt{2\pi}(1-\rho^2)^{1/2}\sigma_1\sigma_2}\exp-\frac 1 2\left\{\frac{(5-x-\mu_2-\rho\sigma_2\left(\frac{x-\mu_1}{\sigma_1}\right)^2}{(1-\rho^2)\sigma_2^2}+\frac{(x-\mu_1)^2}{\sigma_1^2}-\frac{(5-\mu_1-\mu_2)^2}{\sigma_1^2+\sigma_2^2+2\rho\sigma_1\sigma_2}\right\}$$

Do a lot of algebra and even then focusing only on the terms involving $x$ to get a normal pdf with mean:

$$E(X|X+Y=5)=\frac{\left(5-\mu_2+\frac{\rho\sigma_2\mu_1}{\sigma_1}\right)\left(1+\frac{\rho\sigma_2}{\sigma_1}\right)\sigma_1^2+\mu_1(1-\rho^2)\sigma_2^2}{\left(1+\frac{\rho\sigma_2}{\sigma_1}\right)^2\sigma_1^2+(1-\rho^2)\sigma_2^2}$$

A brief simulation confirms the result for $\mu_1=2,\mu_2=2,\sigma_1=2,\sigma_2=2,\rho=.5$, we have an expectation of 2.5 and a simulation gives 2.51738.