Bits

For p=(0.8,0.2)p=(0.8,0.2) and q=(0.5,0.5)q=(0.5,0.5), calculate D(p∥q)=∑ipilog⁡(pi/qi)D(p\Vert q)=\sum_i p_i\log(p_i/q_i) in nats. Divide the unrounded value by log⁡2\log 2 and report the divergence in bits to four decimals.

The unrounded divergence divided by log⁡2\log 2 equals 0.27810.2781 bits.