TOPICS
Search

Shannon Entropy


The Shannon entropy of a discrete random variable X taking values in a countable set X, with probability mass function p(x)=P(X=x), is

 H_b(X)=-sum_(x in X)p(x)log_bp(x),

where b>1 and 0log_b0 is defined to be 0 (Shannon 1948). Taking b=2 gives entropy in bits, while b=e gives entropy in nats. For a countably infinite X, the sum may be infinite.

Shannon entropy is nonnegative. If X has m elements, then 0<=H_b(X)<=log_bm. The lower bound is attained when X takes a single value with probability 1, and the upper bound is attained when X has the uniform distribution on X.

The joint Shannon entropy of discrete random variables X_1, ..., X_n, with joint probability mass function p(x_1,...,x_n)=P(X_1=x_1,...,X_n=x_n), is

 H_b(X_1,...,X_n)=-sum_(x_1,...,x_n)p(x_1,...,x_n)log_bp(x_1,...,x_n).

See also

Conditional Entropy, Cross Entropy, Differential Entropy, Entropy, Information Theory, Joint Entropy, Max-Entropy, Min-Entropy, Mutual Information, Nat, Relative Entropy, Rényi Entropy, Tsallis Entropy, von Neumann Entropy

Explore with Wolfram|Alpha

References

Cover, T. M. and Thomas, J. A. Elements of Information Theory. New York: Wiley, 1991.Havil, J. "A Measure of Uncertainty." §14.1 in Gamma: Exploring Euler's Constant. Princeton, NJ: Princeton University Press, pp. 139-145, 2003.Khinchin, A. I. Mathematical Foundations of Information Theory. New York: Dover, 1957.Shannon, C. E. "A Mathematical Theory of Communication." Bell System Technical J. 27, 379-423, 1948. https://doi.org/10.1002/j.1538-7305.1948.tb01338.x.Shannon, C. E. and Weaver, W. The Mathematical Theory of Communication. Urbana, IL: University of Illinois Press, 1963.

Referenced on Wolfram|Alpha

Shannon Entropy

Cite this as:

Weisstein, Eric W. "Shannon Entropy." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/ShannonEntropy.html

Subject classifications