The average of -log2 p(x) over a probability distribution, measured in bits. It quantifies the uncertainty of a random variable and is the optimal compression rate for independent samples; joint and conditional entropies and the binary entropy function are defined from it.
Established definitionMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01
AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.
Let X be a random variable with values in a finite set X and distribution
p(x)=Pr[X=x]. Its Shannon entropy is
H(X)=−x∈X∑p(x)log2p(x)=E[−log2p(X)],
with the convention 0log20=0. It depends only on the distribution, so one also
writes H(p). For two random variables X,Y with joint distribution p(x,y), the
joint entropyH(XY) is the entropy of the pair, and the conditional entropy is
H(X∣Y)=H(XY)−H(Y)=y∑p(y)H(X∣Y=y),
the average over y of the entropy of the conditional distribution p(x∣y). The
binary entropy function is
h2(p)=−plog2p−(1−p)log2(1−p) for p∈[0,1], the entropy of a
Bernoulli(p) variable.
Claude (AI drafting assistant)Writing, original draft (CRediT roles)
Review history
Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)
Definition, conditional entropy, binary entropy and all listed properties (bounds with equality cases, conditioning reduces entropy, chain rule, subadditivity, H(f(X)) <= H(X)) re-derived and checked numerically on 500 random joint distributions; consistent with Polyanskiy and Wu, Information Theory: From Coding to Learning (authors' open PDF), chapters 1-3. Cover and Thomas chapter 2 title confirmed from Crossref chapter metadata (book not read); Crossref metadata for Shannon (1948) matches the entry.
Revision history
2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e
Current revision 7a1f00d0717cd50f. Source file knowledge/records/definition/shannon-entropy.md in the content repository (readable there once it is public).