Converting between bits, nats and dits

  • Context: Graduate 
  • Thread starter Thread starter Rasalhague
  • Start date Start date
  • Tags Tags
    Bits
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 18K views
Rasalhague
Messages
1,383
Reaction score
2
Given a number representing information entropy in some base, is there a well-defined way to convert this to the number which would represent the same entropy according to another base? Most of the definitions I've read so far use bits, but Mathematic uses nats, and Wolfram Alpha says "nats and bits are not compatible" in response to the input "convert nats to bits". But don't the two units measure the same quality? Perhaps, by not compatible, it means only there isn't an affine relationship between them, as between, say celsius and Fahrenheit.

It seems like there would usually be more than one way to express given number as a sum or integral. Suppose I found one way of expressing an entropy in nats as a sum or integral, then replaced the natural logarithms with base 2 logarithms, would the result be the same whichever way I found of expressing the original number of bits as a sum or integral?
 
Physics news on Phys.org
Just a simple conversion factor:

http://en.wikipedia.org/wiki/Bit#Other_information_units

Because

[tex]\log_e(x)=\frac{\log_2(x)}{\log_2(e)},[/tex]

so

[tex]- \sum_{x \in A_X} \log_2(P_X(\left \{ x \right \}))\cdot P_X(\left \{ x \right \})=-\log_2(e)\sum_{x \in A_X}\log_e(P_X(\left \{ x \right \}))\cdot P_X(\left \{ x \right \}).[/tex]
 
Last edited: