I have seen two different entropy equations: 1. and 2. , where W is the multiplicity. I'm trying to calculate the entropy for an experiment where I sample the sock colors of 30 students and find the distribution of the colors of the socks they are wearing. I'm a little surprised to find that the two equations give me different entropy values. Why is that?
The former equation is the more general one; the latter is what it reduces to when all the 's are equal (uniform probability distribution). However, as you wrote them, there is a typo --- there should be no division sign in the first equation, i.e.