I cannot figure out this simple entropy problem and it is driving me crazy!
From McElreath's Statistical Rethinking:
Imagine instead 5 buckets and a pile of 10 individually numbered pebbles. You stand and toss all 10 pebbles such that each pebble is equally likely to land in any of the 5 buckets.
Distribution & Entropy:
A <- (0,0,10,0,0) = 0
B <- (0,1,8,1,0) = 0.6390319
C <- (0,2,6,2,0) = 0.9502705
D <- (1,2,4,2,1) = 1.4708085
E <- (2,2,2,2,2) = 1.6094379
For "B" I did -1[(.1)log2(.1) + (.8)log2(.8) + (.1)log2(.1)] = 0.92
For "E" I did -1[(.2)log2(.2) + (.2)log2(.2) + (.2)log2(.2) + (.2)log2(.2) + (.2)log2(.2)] = 2.32
Where did I go wrong?!?!