Английская Википедия:Conditional entropy
Шаблон:Short description Шаблон:Information theory
In information theory, the conditional entropy quantifies the amount of information needed to describe the outcome of a random variable <math>Y</math> given that the value of another random variable <math>X</math> is known. Here, information is measured in shannons, nats, or hartleys. The entropy of <math>Y</math> conditioned on <math>X</math> is written as <math>\Eta(Y|X)</math>.
Definition
The conditional entropy of <math>Y</math> given <math>X</math> is defined as
where <math>\mathcal X</math> and <math>\mathcal Y</math> denote the support sets of <math>X</math> and <math>Y</math>.
Note: Here, the convention is that the expression <math>0 \log 0</math> should be treated as being equal to zero. This is because <math>\lim_{\theta\to0^+} \theta\, \log \theta = 0</math>.[1]
Intuitively, notice that by definition of expected value and of conditional probability, <math>\displaystyle H(Y|X) </math> can be written as <math> H(Y|X) = \mathbb{E}[f(X,Y)]</math>, where <math> f </math> is defined as <math>\displaystyle f(x,y) := -\log\left(\frac{p(x, y)}{p(x)}\right) = -\log(p(y|x))</math>. One can think of <math>\displaystyle f</math> as associating each pair <math>\displaystyle (x, y)</math> with a quantity measuring the information content of <math>\displaystyle (Y=y)</math> given <math>\displaystyle (X=x)</math>. This quantity is directly related to the amount of information needed to describe the event <math>\displaystyle (Y=y)</math> given <math>(X=x)</math>. Hence by computing the expected value of <math>\displaystyle f </math> over all pairs of values <math>(x, y) \in \mathcal{X} \times \mathcal{Y}</math>, the conditional entropy <math>\displaystyle H(Y|X)</math> measures how much information, on average, the variable <math> X </math> encodes about <math> Y </math>.
Motivation
Let <math>\Eta(Y|X=x)</math> be the entropy of the discrete random variable <math>Y</math> conditioned on the discrete random variable <math>X</math> taking a certain value <math>x</math>. Denote the support sets of <math>X</math> and <math>Y</math> by <math>\mathcal X</math> and <math>\mathcal Y</math>. Let <math>Y</math> have probability mass function <math>p_Y{(y)}</math>. The unconditional entropy of <math>Y</math> is calculated as <math>\Eta(Y) := \mathbb{E}[\operatorname{I}(Y)]</math>, i.e.
- <math>\Eta(Y) = \sum_{y\in\mathcal Y} {\mathrm{Pr}(Y=y)\,\mathrm{I}(y)}
= -\sum_{y\in\mathcal Y} {p_Y(y) \log_2{p_Y(y)}},</math>
where <math>\operatorname{I}(y_i)</math> is the information content of the outcome of <math>Y</math> taking the value <math>y_i</math>. The entropy of <math>Y</math> conditioned on <math>X</math> taking the value <math>x</math> is defined analogously by conditional expectation:
- <math>\Eta(Y|X=x)
= -\sum_{y\in\mathcal Y} {\Pr(Y = y|X=x) \log_2{\Pr(Y = y|X=x)}}.</math> Note that <math>\Eta(Y|X)</math> is the result of averaging <math>\Eta(Y|X=x)</math> over all possible values <math>x</math> that <math>X</math> may take. Also, if the above sum is taken over a sample <math>y_1, \dots, y_n</math>, the expected value <math>E_X[ \Eta(y_1, \dots, y_n \mid X = x)]</math> is known in some domains as Шаблон:Visible anchor.[2]
Given discrete random variables <math>X</math> with image <math>\mathcal X</math> and <math>Y</math> with image <math>\mathcal Y</math>, the conditional entropy of <math>Y</math> given <math>X</math> is defined as the weighted sum of <math>\Eta(Y|X=x)</math> for each possible value of <math>x</math>, using <math>p(x)</math> as the weights:[3]Шаблон:Rp
- <math>
\begin{align} \Eta(Y|X)\ &\equiv \sum_{x\in\mathcal X}\,p(x)\,\Eta(Y|X=x)\\ & =-\sum_{x\in\mathcal X} p(x)\sum_{y\in\mathcal Y}\,p(y|x)\,\log_2\, p(y|x)\\ & =-\sum_{x\in\mathcal X, y\in\mathcal Y}\,p(x)p(y|x)\,\log_2\,p(y|x)\\ & =-\sum_{x\in\mathcal X, y\in\mathcal Y}p(x,y)\log_2 \frac {p(x,y)} {p(x)}. \end{align} </math>
Properties
Conditional entropy equals zero
<math>\Eta(Y|X)=0</math> if and only if the value of <math>Y</math> is completely determined by the value of <math>X</math>.
Conditional entropy of independent random variables
Conversely, <math>\Eta(Y|X) = \Eta(Y)</math> if and only if <math>Y</math> and <math>X</math> are independent random variables.
Chain rule
Assume that the combined system determined by two random variables <math>X</math> and <math>Y</math> has joint entropy <math>\Eta(X,Y)</math>, that is, we need <math>\Eta(X,Y)</math> bits of information on average to describe its exact state. Now if we first learn the value of <math>X</math>, we have gained <math>\Eta(X)</math> bits of information. Once <math>X</math> is known, we only need <math>\Eta(X,Y)-\Eta(X)</math> bits to describe the state of the whole system. This quantity is exactly <math>\Eta(Y|X)</math>, which gives the chain rule of conditional entropy:
The chain rule follows from the above definition of conditional entropy:
- <math>\begin{align}
\Eta(Y|X) &= \sum_{x\in\mathcal X, y\in\mathcal Y}p(x,y)\log \left(\frac{p(x)}{p(x,y)} \right) \\[4pt]
&= \sum_{x\in\mathcal X, y\in\mathcal Y}p(x,y)(\log (p(x)) - \log (p(x,y))) \\[4pt] &= -\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))} \\[4pt] & = \Eta(X,Y) + \sum_{x \in \mathcal X} p(x)\log (p(x) ) \\[4pt] & = \Eta(X,Y) - \Eta(X).
\end{align}</math>
In general, a chain rule for multiple random variables holds:
- <math> \Eta(X_1,X_2,\ldots,X_n) =
\sum_{i=1}^n \Eta(X_i | X_1, \ldots, X_{i-1}) </math>[3]Шаблон:Rp
It has a similar form to chain rule in probability theory, except that addition instead of multiplication is used.
Bayes' rule
Bayes' rule for conditional entropy states
- <math>\Eta(Y|X) \,=\, \Eta(X|Y) - \Eta(X) + \Eta(Y).</math>
Proof. <math>\Eta(Y|X) = \Eta(X,Y) - \Eta(X)</math> and <math>\Eta(X|Y) = \Eta(Y,X) - \Eta(Y)</math>. Symmetry entails <math>\Eta(X,Y) = \Eta(Y,X)</math>. Subtracting the two equations implies Bayes' rule.
If <math>Y</math> is conditionally independent of <math>Z</math> given <math>X</math> we have:
- <math>\Eta(Y|X,Z) \,=\, \Eta(Y|X).</math>
Other properties
For any <math>X</math> and <math>Y</math>:
- <math>\begin{align}
\Eta(Y|X) &\le \Eta(Y) \, \\ \Eta(X,Y) &= \Eta(X|Y) + \Eta(Y|X) + \operatorname{I}(X;Y),\qquad \\ \Eta(X,Y) &= \Eta(X) + \Eta(Y) - \operatorname{I}(X;Y),\, \\ \operatorname{I}(X;Y) &\le \Eta(X),\,
\end{align}</math>
where <math>\operatorname{I}(X;Y)</math> is the mutual information between <math>X</math> and <math>Y</math>.
For independent <math>X</math> and <math>Y</math>:
- <math>\Eta(Y|X) = \Eta(Y) </math> and <math>\Eta(X|Y) = \Eta(X) \, </math>
Although the specific-conditional entropy <math>\Eta(X|Y=y)</math> can be either less or greater than <math>\Eta(X)</math> for a given random variate <math>y</math> of <math>Y</math>, <math>\Eta(X|Y)</math> can never exceed <math>\Eta(X)</math>.
Conditional differential entropy
Definition
The above definition is for discrete random variables. The continuous version of discrete conditional entropy is called conditional differential (or continuous) entropy. Let <math>X</math> and <math>Y</math> be a continuous random variables with a joint probability density function <math>f(x,y)</math>. The differential conditional entropy <math>h(X|Y)</math> is defined as[3]Шаблон:Rp
Properties
In contrast to the conditional entropy for discrete random variables, the conditional differential entropy may be negative.
As in the discrete case there is a chain rule for differential entropy:
Notice however that this rule may not be true if the involved differential entropies do not exist or are infinite.
Joint differential entropy is also used in the definition of the mutual information between continuous random variables:
- <math>\operatorname{I}(X,Y)=h(X)-h(X|Y)=h(Y)-h(Y|X)</math>
<math>h(X|Y) \le h(X)</math> with equality if and only if <math>X</math> and <math>Y</math> are independent.[3]Шаблон:Rp
Relation to estimator error
The conditional differential entropy yields a lower bound on the expected squared error of an estimator. For any random variable <math>X</math>, observation <math>Y</math> and estimator <math>\widehat{X}</math> the following holds:[3]Шаблон:Rp
- <math display="block">\mathbb{E}\left[\bigl(X - \widehat{X}{(Y)}\bigr)^2\right]
\ge \frac{1}{2\pi e}e^{2h(X|Y)}</math>
This is related to the uncertainty principle from quantum mechanics.
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.
See also
- Entropy (information theory)
- Mutual information
- Conditional quantum entropy
- Variation of information
- Entropy power inequality
- Likelihood function
References