Let us define
- $L_i\triangleq \log \left( \dfrac{Prob(x_i=+1) }{ Prob(x_i=-1)} \right)$
- $E\{x_i\} \triangleq Prob(x_i=+1)-Prob(x_i=-1)$
I need to show that
\begin{equation} E\{x_i\} = \tanh(L_i/2) \end{equation}
I can write
\begin{align} E\{x_i\} &= e^{log(Prob(x_i=+1)-Prob(x_i=-1))}\tag{1a}\\ &=e^{L_i} \tag{1b} \end{align}
if I use the following:
$\tanh(z)=\dfrac{\sinh(z)}{\cosh(z)}=\dfrac{e^z-e^{-z}}{e^z+e^{-z}}=\dfrac{e^{2z}-1}{e^{2z}+1}$
ref: http://mathworld.wolfram.com/HyperbolicTangent.html
and put $z=L_i/2$, then
\begin{equation} \tanh(L_i/2)=\dfrac{e^{L_i}-1}{e^{l_i}+1} \tag{2} \end{equation}
how do I arrive at (2) using (1a)
Where you went wrong is here:
$$\log(A/B)\neq \log (A-B).$$Observe that
$$L_i\triangleq \log \left( \dfrac{Prob(x_i=+1) }{ Prob(x_i=-1)} \right)$$ $$E\{x_i\} \triangleq Prob(x_i=+1)-Prob(x_i=-1)$$
$$\tanh\left(\frac{L_i}{2}\right) = \frac{e^{L_i}-1}{e^{L_i}+1} = \frac{\dfrac{Prob(x_i=+1) }{ Prob(x_i=-1)}-1}{\dfrac{Prob(x_i=+1) }{ Prob(x_i=-1)}+1} = \frac{Prob(x_i=+1)-Prob(x_i=-1)}{Prob(x_i=+1)+Prob(x_i=-1)}.$$
Assuming the only two events are $x_i=+1$ and $x_i=-1$, we have
$$Prob(x_i=+1)+Prob(x_i=-1) = 1.$$ Therefore,
$$\tanh\left(\frac{L_i}{2}\right) = E\{x_i\}.$$