informationcontent
Information content, also known as surprisal, quantifies the amount of information gained when observing a particular outcome. For a discrete random variable X with outcome x, it is defined as I(x) = -log_b P(X = x). The base b determines the units of the measure; base 2 yields bits. More surprising or unlikely outcomes have higher information content, reflecting greater surprise upon observation. The concept was developed within information theory, notably by Claude E. Shannon in the 1940s.
The average information content across all outcomes is the entropy of the source: H(X) = E[I(X)] = - sum_x
Applications of information content include data compression and coding, where code lengths are related to the