Information entropy (source code)

= Information entropy
{title2=$H(X)$}

= Shannon entropy
{c}
{synonym}

For a discrete random variable with probabilities $p_i$, its Shannon information entropy is
$$
H=-\sum_i p_i\log p_i.
$$