Probability of $X$ given $Z = x$ with $Z = X + Y$ and both $X$ and $Y$ normal Let $X$ and $Y$ be independent random normal variables such that $X\sim N(\mu _{X},\sigma _{X}^{2})$ and $Y\sim N(\mu _{Y},\sigma _{Y}^{2})$. Let $Z = X + Y$, so that $Z\sim N(\mu _{X}+\mu _{Y},\sigma _{X}^{2}+\sigma _{Y}^{2})$.
I'm wondering what is $f_X(x \mid Z = z)$, i. e. the probability distribution of X given Z.
I'm guessing that I can use the fact that $f_{X}(x\mid Z=z)f_{Z}(z)=f_{X,Z}(x,z)=f_{Z}(z\mid X=x)f_{X}(x)$, since I know $f_X$ and $f_Z$, and my intuition is that $f_{Z}(z\mid X=x)$ is just the probability distribution of a normal random variable with mean $x+\mu_Y$ and variance $\sigma _{Y}^{2}$, but I don't actually know the latter fact since I haven't proved it and so I'm not sure it's correct.
Another possibility I have considered is to calculate $f_{X,Z}$ (and use that to derive $f_X(x \mid Z = z)$ by using $f_{X}(y\mid Z=z)={\frac {f_{X,Z}(x,z)}{f_{Z}(z)}}$), but I need $Cov(X,Z)$ for that, and I don't know what it is.
I hope that this isn't too confused and that what I'm asking is clear enough!
Philippe
 A: Let $A= \begin{pmatrix} 1 & 0 \\ 0 & 1 \\ 1& 1\end{pmatrix}$.
\begin{align*}
\begin{pmatrix} X\\Y\end{pmatrix} &\sim N\left(\begin{pmatrix}\mu_X \\ \mu_Y\end{pmatrix},\begin{pmatrix}\sigma^2_X & 0 \\ 0 & \sigma^2_Y\end{pmatrix}\right)\\
\begin{pmatrix} X\\Y\\Z\end{pmatrix} &= A\begin{pmatrix} X\\Y\end{pmatrix}\\
&\sim N\left(A\begin{pmatrix}\mu_X \\ \mu_Y\end{pmatrix},A\begin{pmatrix}\sigma^2_X & 0 \\ 0 & \sigma^2_Y\end{pmatrix}A^T\right)\\
&= N\left(\begin{pmatrix}\mu_X \\ \mu_Y \\ \mu_X+\mu_Y\end{pmatrix},\begin{pmatrix}\sigma^2_X & 0 & \sigma^2_X \\ 0 & \sigma^2_Y & \sigma^2_Y\\ \sigma^2_X & \sigma^2_Y & \sigma^2_X+\sigma^2_Y\end{pmatrix}\right)\\
\end{align*}
So $X|Z$ is normally distributed with mean
$$\mu_{X|Z} = \mu_X + \frac{\sigma^2_X}{\sigma^2_X+\sigma^2_Y}\{Z-(\mu_X+\mu_Y)\}$$
and variance
$$\sigma^2_{X|Z} = \sigma^2_X-\frac{\sigma^4_X}{\sigma^2_X+\sigma^2_Y}$$
https://en.wikipedia.org/wiki/Multivariate_normal_distribution#Conditional_distributions
A: Let $X\sim N(0,1)$ and $Y\sim N(0,1)$, independent.
Consider the transformation: $(X,Y)\rightarrow (X,Z)$, $Z=X+Y$
Jacobian matrix is $\mid \det J\Big(\dfrac{(X,Y)}{(X,Z)}\Big)\mid=\mid 1/\det J\Big(\dfrac{(X,Z)}{(X,Y)}\Big)\mid=1$
Hence $f_{(X,Z)}(x,z)=\dfrac{1}{2\pi}e^{-\dfrac{x^2+(z-x)^2}{2}}\cdot\mid \det J\Big(\dfrac{(X,Y)}{(X,Z)}\Big)\mid=\dfrac{1}{2\pi}e^{-\dfrac{x^2+(z-x)^2}{2}}$
Now use $f_{X}(x\mid Z=z)f_{Z}(z)=f_{X,Z}(x,z)$.
Note: I used normalized version here. You can easily transform that into your version by just using $x\rightarrow \dfrac{x-\mu_X}{\sigma_X}$ and $y\rightarrow \dfrac{y-\mu_Y}{\sigma_Y}$ (Constant term will change too.)
Here: $J\Big(\dfrac{(f,g)}{(h.k)}\Big)=\begin{bmatrix}\frac{\partial f}{\partial h}&\frac{\partial g}{\partial h}\\\frac{\partial f}{\partial k}&\frac{\partial g}{\partial k}\end{bmatrix}$
