statable Statistics for study and research

Shannon index (entropy)

A measure of diversity across categories: H = -Σ p · ln(p). It is 0 when everything is in one category and largest when all categories are equally frequent. It takes number and evenness into account together.

Example: Shares of 0.5, 0.3 and 0.2 give H = 1.03. With three equally frequent categories, H would be ln 3 = 1.10.

Caution: The value depends on the base of the logarithm. With the base-2 logarithm the same example gives 1.49 bits.

Related

Open in Statable