roughly speaking, this measures how evenly spread the probabilities are. a  will have the maximum entropy of 1:
-0.5 * log2(0.5) - 0.5 * log2(0.5) = 1

the less fair it is, the lower its entropy:
-p * log2(p) - (1-p) * log2(1-p) -&gt; 0 for p -&gt; 0

(4/9)