How to solve $\eta = \ln{\frac{\mu}{1-\mu}}$ for $\mu$?

91 Views Asked by At

In Pattern Recognition and Machine Learning by Christopher M. Bishop, he states that:

$$\begin{align} \eta =& \ln\left(\frac{\mu}{1-\mu}\right) & (2.198) \\ \mu =& \frac{1}{1 + e^{-\eta}} & (2.199) \end{align}$$

What are the steps to solve (2.198) for $\mu$ with the solution shown as (2.199)? Algebra is not my strongest skill and I clearly need more practice.

3

There are 3 best solutions below

2
On BEST ANSWER

$$\eta = \ln\left(\frac{\mu}{1-\mu} \right)$$

$$e^{\eta} = \frac{\mu}{1-\mu}$$

$$e^{\eta} - \mu e^{\eta} = \mu$$

$$e^{\eta} = (1+e^{\eta})\mu$$

$$u = \frac{e^{\eta}}{1+e^{\eta}} = \frac{1}{e^{-\eta}+1}$$

0
On

$$\eta = \ln{\frac{\mu}{1-\mu}}$$

$$e^{\eta} = e^{\ln{\frac{\mu}{1-\mu}}}$$

$$e^{\eta} = \frac{\mu}{1-\mu}$$

$$e^{\eta}(1-\mu) = \mu$$

$$e^{\eta}-e^{\eta}\mu = \mu$$

$$e^{\eta} = e^{\eta}\mu + \mu$$

$$e^{\eta} = (e^{\eta}+1) \mu$$

$$\mu = \frac{e^{\eta}}{e^{\eta}+1}$$

$$\mu = \frac{e^{\eta}}{e^{\eta}+1}\frac{\frac{1}{e^{\eta}}}{\frac{1}{e^{\eta}}}$$

$$\mu = \frac{1}{1+e^{-\eta}}$$

0
On

The natural logarithm and exponential functions are inverses of one another, which means that

  • $e^{\ln x} = x$ for $x > 0$, and
  • $\ln(e^{x}) = x$ for all $x \in \mathbb{R}$.

So if we want to isolate $\mu$ we need to get it outside of the logarithm; we can do this by exponentiating both sides:

$$ \eta = \ln \left ( \frac{\mu}{1-\mu} \right ) \\ \Rightarrow e^\eta = e^{\ln \left ( \frac{\mu}{1-\mu} \right )} \\ \Rightarrow e^\eta = \frac{\mu}{1-\mu} \\ \Rightarrow (1-\mu)e^{\eta} = \mu \\ \Rightarrow e^{\eta} - \mu e^{\eta} = \mu \\ \Rightarrow e^{\eta} = \mu + \mu e^{\eta} \\ \Rightarrow e^{\eta} = \mu(1 + e^{\eta}) \\ \Rightarrow \frac{e^{\eta}}{1 + e^{\eta}} = \mu $$ The final step is multiplying the numerator and denominator by $e^{-\eta}$ (this is the same as multiplying by 1 which doesn't change the value of the expression) $$ \mu = \frac{e^{\eta}}{1 + e^{\eta}} \\ \Rightarrow \mu = \frac{e^{-\eta}\cdot e^{\eta}}{e^{-\eta}(1 + e^{\eta})} \\ \Rightarrow \mu = \frac{1}{e^{-\eta} + 1}. $$