Stuck with math proof (proving maximum and minimum entropy)

465 Views Asked by At

I am trying to prove that max. entropy is when p = 1/2 and p = 1 for minimum.

So this is the setup.

enter image description here

I cannot understand how they were able to derive from original function to another function so quickly, as shown there.

My calculus is rusty, but my understanding is...

$\log_2(p) = \frac{\log_e(p) }{ \log_e(2) }$ is strategic to get rid of ln function later

so later $\log_e(p)$ derived is $\frac{1}{p \ln e} = \frac1p$.

Basically I need much much slower step so I can understand sudden transition from $H(x) \to \frac{dH}{dp}$ :( Rip my math skillz.

I also could not fully understand how they checked if it was max or min they calculated. I sorta understand they did second derivative. My understanding is that since critical value is $\frac12$, they will test any number smaller and bigger than $\frac12$ to the second derivative function. If the answers are $+$ and $-$, respectively it's max (up and down) while if the answers are $-$ and $+$ respectively it must be min (down and up).

But I don't see that on the solution. I'm so slow it hurts.

As Timmy said in South Park, "Please help me" :(

1

There are 1 best solutions below

4
On

$$\frac{d}{dp} \ln p = \frac{1}{p}$$

Also by chain rule, $$\frac{d}{dp}\ln(1-p)=\frac{1}{1-p}\frac{d}{dp}(1-p)=-\frac{1}{1-p}$$

Now, let's look at $H(p)$:

$$H(p)=-\frac1{\ln2} \left(p\ln p + (1-p)\ln(1-p) \right)$$

Differentiating using product rule,

\begin{align}H'(p)&= -\frac{1}{\ln2} \left(\frac{d}{dp}p\ln p + \frac{d}{dp}(1-p)\ln(1-p) \right)\\ &=-\frac{1}{\ln2}\left(\left(\frac{d}{dp}p\right)\ln p+ p\left(\frac{d}{dp} \ln p\right) + \left(\frac{d}{dp}(1-p)\right)\ln (1-p)+ (1-p)\left(\frac{d}{dp} \ln (1-p)\right)\right) \\ &=-\frac{1}{\ln 2} \left( \ln p + 1 -\ln(1-p)-1 \right)\\ &=-\frac1{\ln2} (\ln p-\ln(1-p))\end{align}

To find the value when maximum and minimal is obtain, set $H'(p)=0$. Also, check the boundary values, that is $p=0$ and $p=1$. Hopefully you can take it from here.

For the second derivative test, if at the stationary point, the second derivative is positive, it is a local minimum. If it is negative, it is a local maximum.