# Can you simplify this expression?

This is a Bayes formula incorporating 2 random variables. The final expression seems a bit tricky to simplify the exponents and I'm still not so confident with my algebra (pardon me ;)). Can you have a go ?

From here :

$\frac{\frac{1}{2}\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(y-1)^2}}{\frac{1}{2}\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(y+1)^2} + \frac{1}{2}\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(y-1)^2}}$

To there :

$\frac{1}{1 + e^{-2y}}$

Hint

Multiply by

\begin{equation} \frac{2\sqrt{2\pi}}{2\sqrt{2\pi}} \frac{\mathrm{e}^{\frac{1}{2}(y-1)^2}}{\mathrm{e}^{\frac{1}{2}(y-1)^2}}. \end{equation}

• Thx, gonna toy with it a bit :) Jul 1, 2015 at 9:07

Note that $\exp\{x\} = e^x$.

$$\frac{\frac{1}{2}\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(y-1)^2}}{\frac{1}{2}\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(y+1)^2} + \frac{1}{2}\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(y-1)^2}}$$ $$= \frac{\frac{1}{2}\frac{1}{\sqrt{2\pi}}\ \cdot\ e^{-\frac{1}{2}(y-1)^2}}{\frac{1}{2}\frac{1}{\sqrt{2\pi}}\ \cdot\ \left(e^{-\frac{1}{2}(y+1)^2} + e^{-\frac{1}{2}(y-1)^2}\right)}$$ $$= \frac{e^{-\frac{1}{2}(y-1)^2}}{e^{-\frac{1}{2}(y+1)^2} + e^{-\frac{1}{2}(y-1)^2}}$$ $$= \frac{e^{-\frac{1}{2}(y-1)^2}}{e^{-\frac{1}{2}(y+1)^2} + e^{-\frac{1}{2}(y-1)^2}}\cdot\frac{e^{\frac{1}{2}(y-1)^2}}{e^{\frac{1}{2}(y-1)^2}}$$ $$= \frac{1}{e^{-\frac{1}{2}(y+1)^2}e^{\frac{1}{2}(y-1)^2} + 1}$$ $$= \frac{1}{e^{\frac{1}{2}((y-1)^2-(y+1)^2)} + 1}$$ $$= \frac{1}{e^{\frac{1}{2}(-4y)} + 1}$$ $$= \frac{1}{e^{-2y} + 1}$$ Done.