Ask your own question, for FREE!
Mathematics 21 Online
OpenStudy (anonymous):

How do to find the values of p and q so that we get the maximum entropy if I have this equation?

OpenStudy (anonymous):

\[X = -p*\log_2 (p)-q \log_2{q} - (1-p-q) \log_2 (1-p-q)\]

OpenStudy (anonymous):

that's the expression for the first order base 2 entropy

OpenStudy (amistre64):

well, i know a derivative is useful to find min/max points

OpenStudy (anonymous):

With respect to what variable though?

OpenStudy (amistre64):

p and q, unless otherwise noted, assume multivariate \[X = -p*\log_2 (p)-q \log_2{q} - (1-p-q) \log_2 (1-p-q)\] \[X_p = -2\log_2 (p)+2\log_2 (1-p-q)\] hard to see thru the logs

OpenStudy (anonymous):

so I take partial derivative for p then for q and equate them to 0?

OpenStudy (anonymous):

and then solve for q and p with the two equations.. Can I do that?

OpenStudy (amistre64):

yes, essentially; and there is a formula to determine if its a saddle point as well; but its essentially the partials set to zero

OpenStudy (anonymous):

how would I know that I didn't get a minimum?

OpenStudy (amistre64):

i also recall that the gradF points to the highest point ...

OpenStudy (amistre64):

if the second partials are signed; they follow the same rule for single variable stuff

OpenStudy (anonymous):

Ah okay this is not a calculus course lol so I just know the basics.. if I get a positive value for both p and q then it's the highest point?

OpenStudy (amistre64):

F(x,y), gradient F is the vector <Fx,Fy> when the gradient is equal to zero, we are either at a min/max or a saddle point

OpenStudy (amistre64):

i believe the test is: D = FxxFyy - (Fxy)^2 but i forget the "rules" for distinguishing the Ds

OpenStudy (anonymous):

Oh okay but to solve for p and q would I do Fx =0 then Fy=0

OpenStudy (amistre64):

\[X_p = \log_2 (1-p-q)-\log_2 (p)\] i think i had a spurious little 2 in there at first Xp = 0 when (1-p-q)/p = 1 right?

OpenStudy (amistre64):

yes

OpenStudy (anonymous):

Xp = 0 when (1-p-q)/p = 1 ; how did you get this?

OpenStudy (anonymous):

ahh sorry for the questions I'm jsut trying to find the max value of that equation

OpenStudy (amistre64):

partial with respect to p; and the fact that ln(a)-ln(b) = ln(a/b)

OpenStudy (amistre64):

and since ln(1) = 0, then a/b = 1

OpenStudy (amistre64):

it looks like you end up with 2 equations in 2 unknowns .... if i see it right

OpenStudy (amistre64):

i know if i try to latex this im gonna get a snap page just about the end of it :/

OpenStudy (anonymous):

sorry I tried it but why doesn't the partial of p for (-(1-p-q)*log2(1-p-q) ) give you zero?

OpenStudy (amistre64):

\[X = -p\frac{\ln(p)}{\ln2}-q \frac{\ln{q}}{\ln2} - (1-p-q) \frac{\ln (1-p-q)}{\ln2}\] \[X_p = -\frac{\ln(p)}{\ln2}-\frac{1}{\ln2} + \frac{\ln (1-p-q)}{\ln2}+\frac{1}{\ln2}\] \[X_p = \frac{1}{\ln2}\left( \ln (1-p-q)-\ln(p)\right)\] \[X_p = \frac{1}{\ln2} \ln (\frac{1-p-q}{p})=0\] when equal to ln(1)

OpenStudy (amistre64):

Xq has a similar setup

OpenStudy (anonymous):

Ohhhhhhhhh I see where I went wrong

OpenStudy (amistre64):

1-p-q = p 1= 2p + q q = 1-2p 1-p-q = q 1 = p + 2q 1 = p + 2(1-2p) 1 = p + 2 - 4p 1 = 2 - 3p -1 = - 3p 1/3 = p ------------------- 1-1/3 - q = 1/3 2/3 - 1/3 = q = 1/3

OpenStudy (anonymous):

whoa thanks so much for your help!!! I need to freshen up on my calculus and derivatives

OpenStudy (amistre64):

good luck :)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!