Skip to content
Science, DecodedContext Jamming

Equation Inspector

Shannon entropy

EstablishedMathematicsAI / MLBiologyPhysics
H=−∑ipi log⁡pi\htmlClass{sjt-H}{H} = \htmlClass{sjt-minus}{-}\htmlClass{sjt-sum}{\sum_{i}} \htmlClass{sjt-p}{p_i}\,\htmlClass{sjt-log}{\log p_i}

Tap a symbol above, or choose one here:

HHEntropy

Meaning

Average uncertainty, or average information gained when you learn the outcome, measured in bits (log base 2) or nats (natural log).

Its job in this equation

The output: a single number summarising how unpredictable a distribution is.

Picture it

The average number of yes/no questions needed to guess the outcome.

Read it, progressively

1. Gist

How unpredictable is this? Zero when one outcome is certain; maximum when all outcomes are equally likely.

What it does not establish

Entropy is a property of a probability distribution, not of an object by itself. "The entropy of a DNA sequence" means the entropy of some distribution estimated from it, under some model. It ignores meaning: a random string has high entropy and no message. Estimating it from finite data is biased.

Play with it

Loading interactive…