Expected value of X given X+Y=s? Question:
Given $X\sim N(\mu_X, \sigma_X^2)$ and $Y\sim N(\mu_Y, \sigma_Y^2)$ are independent, and you know $X+Y=s$. What is the expected value of $X$?
I encountered this during an interview. My thoughts were to use conditional expectation $E(X|Z=s)$ where $Z\sim N(\mu_X+\mu_Y, \sigma_X^2+\sigma_Y^2)$. However, it involves a lot of calculations, which I don't think would be an interview question. Could anyone suggest?

Since $X$ and $Y$ are both univariate normal and independent, we know that all linear combinations of $X$ and $X+Y$ are univariate normal. Thus, $\left(X,X+Y\right)^\top$ is bivariate normal and we have
$$
X+Y \sim \mathcal N\left(\mu_X+\mu_Y, \sigma_X^2+\sigma_Y^2\right), \\
\mathrm{Cov}\left(X,X+Y\right)=\mathrm{Cov}\left(X,X\right)+\mathrm{Cov}\left(X,Y\right)=\sigma_X^2, \\
\begin{pmatrix}
X\\
X+Y\\
\end{pmatrix} \sim \mathcal N\left(\begin{pmatrix}
                             \mu_X\\
                             \mu_X+\mu_Y
                             \end{pmatrix},
                        \begin{pmatrix}
                        \sigma_X^2 & \sigma_X^2\\
                        \sigma_X^2 & \sigma_X^2+\sigma_Y^2
                        \end{pmatrix}\right).
$$
The well-known formula for the conditional expectation in the bivariate normal case then yields
$$
\mathbb E\left(X|X+Y=s\right) = \mu_X+\frac{\sigma_X^2}{\sigma_X^2+\sigma_Y^2}\left(s-\left(\mu_X+\mu_Y\right)\right).
$$
