Shannon entropy
A measure of uncertainty of a discrete random variable, defined from its probability mass function.
The Shannon entropy of a discrete random variable with probability mass function is
with the convention . The value may be . Unless stated otherwise, denotes the natural logarithm; changing its base rescales by a constant factor.
Equivalent characterizations
Equivalently, is the expectation of under the distribution of .
Remarks
Shannon entropy is closely related to relative entropy (KL divergence) and is a central quantity in information theory.
Examples
- If , then .
- If is uniform on , then .