Steps to show: $\mu^x (1-\mu)^{1-x} = (1 -\mu) \exp \left[ \ln \left(\frac{\mu}{1-u} \right)x \right]$

67 Views Asked by At

In Pattern Recognition and Machine Learning by Christopher M. Bishop

Equation (2.196) refers to the Bernoulli distribution:

$$\mu^x (1-\mu)^{1-x}$$

And Bishop says that expressing this as the exponential of the logarithm becomes (2.197): $$\begin{align} \mu^x (1-\mu)^{1-x} &= \exp \left[ x\ln{\mu} + (1-x)\ln{(1-\mu)} \right] \\ &= (1 -\mu) \exp{ \left[ \ln \left(\frac{\mu}{1-u} \right)x \right] } \end{align}$$

I understand what he’s doing in the first shown step of (2.197). However, how does he get to the last step shown?

2

There are 2 best solutions below

3
On

I figured it out:

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

0
On

An even easier approach is to skip the middle step. $$\mu^x (1-\mu)^{1-x} = (1-\mu) \cdot \left(\frac{\mu}{1-\mu}\right)^x.$$ Then apply the fact $a^x = e^{x \ln a}$ for any $a > 0$ to $a=\frac{\mu}{1-\mu}$.