World Library  
Flag as Inappropriate
Email this Article

Conditional entropy

Venn diagram for various information measures associated with correlated variables X and Y. The area contained by both circles is the joint entropy H(X,Y). The circle on the left (red and violet) is the individual entropy H(X), with the red being the conditional entropy H(X|Y). The circle on the right (blue and violet) is H(Y), with the blue being H(Y|X). The violet is the mutual information I(X;Y).

In information theory, the conditional entropy (or equivocation) quantifies the amount of information needed to describe the outcome of a random variable Y given that the value of another random variable X is known. Here, information is measured in shannons, nats, or hartleys. The entropy of Y conditioned on X is written as H(Y|X).


  • Definition 1
  • Chain rule 2
  • Bayes' rule 3
  • Generalization to quantum theory 4
  • Other properties 5
  • References 6
  • See also 7


If H(Y|X=x) is the entropy of the variable Y conditioned on the variable X taking a certain value x, then H(Y|X) is the result of averaging H(Y|X=x) over all possible values x that X may take.

Given discrete random variables X with domain \mathcal X and Y with domain \mathcal Y, the conditional entropy of Y given X is defined as:[1]

\begin{align} H(Y|X)\ &\equiv \sum_{x\in\mathcal X}\,p(x)\,H(Y|X=x)\\ & =-\sum_{x\in\mathcal X} p(x)\sum_{y\in\mathcal Y}\,p(y|x)\,\log\, p(y|x)\\ & =-\sum_{x\in\mathcal X}\sum_{y\in\mathcal Y}\,p(x,y)\,\log\,p(y|x)\\ & =-\sum_{x\in\mathcal X, y\in\mathcal Y}p(x,y)\log\,p(y|x)\\ & =-\sum_{x\in\mathcal X, y\in\mathcal Y}p(x,y)\log \frac {p(x,y)} {p(x)}. \\ & = \sum_{x\in\mathcal X, y\in\mathcal Y}p(x,y)\log \frac {p(x)} {p(x,y)}. \\ \end{align}

Note: It is understood that the expressions 0 log 0 and 0 log (c/0) for fixed c>0 should be treated as being equal to zero.

H(Y|X)=0 if and only if the value of Y is completely determined by the value of X. Conversely, H(Y|X) = H(Y) if and only if Y and X are independent random variables.

Chain rule

Assume that the combined system determined by two random variables X and Y has joint entropy H(X,Y), that is, we need H(X,Y) bits of information to describe its exact state. Now if we first learn the value of X, we have gained H(X) bits of information. Once X is known, we only need H(X,Y)-H(X) bits to describe the state of the whole system. This quantity is exactly H(Y|X), which gives the chain rule of conditional entropy:

H(Y|X)\,=\,H(X,Y)-H(X) \, .

The chain rule follows from the above definition of conditional entropy:

H(Y|X)= \sum_{x\in\mathcal X, y\in\mathcal Y}p(x,y)\log \frac {p(x)} {p(x,y)}
= -\sum_{x\in\mathcal X, y\in\mathcal Y}p(x,y)\log\,p(x,y) + \sum_{x\in\mathcal X, y\in\mathcal Y}p(x,y)\log\,p(x)
= H(X,Y) + \sum_{x \in \mathcal X} p(x)\log\,p(x)
= H(X,Y) - H(X).

Bayes' rule

Bayes' rule for conditional entropy states

H(Y|X) \,=\, H(X|Y) - H(X) + H(Y) \,.

Proof. H(Y|X) = H(X,Y) - H(X) and H(X|Y) = H(Y,X) - H(Y). Symmetry implies H(X,Y) = H(Y,X). Subtracting the two equations implies Bayes' rule.

Generalization to quantum theory

In quantum information theory, the conditional entropy is generalized to the conditional quantum entropy. The latter can take negative values, unlike its classical counterpart. Bayes' rule does not hold for conditional quantum entropy, since H(X,Y) \ne H(Y,X).

Other properties

For any X and Y:

H(Y|X) \le H(Y) \,
H(X,Y) = H(X|Y) + H(Y|X) + I(X;Y),\qquad
H(X,Y) = H(X) + H(Y) - I(X;Y),\,
I(X;Y) \le H(X),\,

where I(X;Y) is the mutual information between X and Y.

For independent X and Y:

H(Y|X) = H(Y)\text{ and }H(X|Y) = H(X) \,

Although the specific-conditional entropy, H(X|Y=y), can be either less or greater than H(X), H(X|Y) can never exceed H(X).


  1. ^ Cover, Thomas M.; Thomas, Joy A. (1991). Elements of information theory (1st ed.). New York: Wiley.  

See also

This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.