# Joint 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, joint entropy is a measure of the uncertainty associated with a set of variables.

## Definition

The joint Shannon entropy (in bits) of two discrete random variables ${\displaystyle X}$ and ${\displaystyle Y}$ is defined as

${\displaystyle H(X,Y)=-\sum _{x}\sum _{y}P(x,y)\log _{2}[P(x,y)]\!}$

where ${\displaystyle x}$ and ${\displaystyle y}$ are particular values of ${\displaystyle X}$ and ${\displaystyle Y}$, respectively, ${\displaystyle P(x,y)}$ is the joint probability of these values occurring together, and ${\displaystyle P(x,y)\log _{2}[P(x,y)]}$ is defined to be 0 if ${\displaystyle P(x,y)=0}$.

For more than two random variables ${\displaystyle X_{1},...,X_{n}}$ this expands to

${\displaystyle H(X_{1},...,X_{n})=-\sum _{x_{1}}...\sum _{x_{n}}P(x_{1},...,x_{n})\log _{2}[P(x_{1},...,x_{n})]\!}$

where ${\displaystyle x_{1},...,x_{n}}$ are particular values of ${\displaystyle X_{1},...,X_{n}}$, respectively, ${\displaystyle P(x_{1},...,x_{n})}$ is the probability of these values occurring together, and ${\displaystyle P(x_{1},...,x_{n})\log _{2}[P(x_{1},...,x_{n})]}$ is defined to be 0 if ${\displaystyle P(x_{1},...,x_{n})=0}$.

## Properties

### Nonnegativity

The joint entropy of a set of random variables is a nonnegative number.

${\displaystyle H(X,Y)\geq 0}$
${\displaystyle H(X_{1},\ldots ,X_{n})\geq 0}$

### Greater than individual entropies

The joint entropy of a set of variables is greater than or equal to all of the individual entropies of the variables in the set.

${\displaystyle H(X,Y)\geq \max[H(X),H(Y)]}$
${\displaystyle H(X_{1},\ldots ,X_{n})\geq \max[H(X_{1}),\ldots ,H(X_{n})]}$

### Less than or equal to the sum of individual entropies

The joint entropy of a set of variables is less than or equal to the sum of the individual entropies of the variables in the set. This is an example of subadditivity. This inequality is an equality if and only if ${\displaystyle X}$ and ${\displaystyle Y}$ are statistically independent.

${\displaystyle H(X,Y)\leq H(X)+H(Y)}$
${\displaystyle H(X_{1},\ldots ,X_{n})\leq H(X_{1})+\ldots +H(X_{n})}$

## Relations to other entropy measures

Joint entropy is used in the definition of conditional entropy

${\displaystyle H(X|Y)=H(Y,X)-H(Y)\,}$,

and

${\displaystyle H(X_{1},\dots ,X_{n})=\sum _{k=1}^{n}H(X_{k}|X_{k-1},\dots ,X_{1})}$
It is also used in the definition of mutual information

${\displaystyle I(X;Y)=H(X)+H(Y)-H(X,Y)\,}$

In quantum information theory, the joint entropy is generalized into the joint quantum entropy.

## Joint differential entropy

### Definition

The above definition is for discrete random variables and no more valid in the case of continuous random variables. The continuous version of discrete joint entropy is called joint differential (or continuous) entropy. Let ${\displaystyle X}$ and ${\displaystyle Y}$ be a continuous random variables with a joint probability density function ${\displaystyle f(x,y)}$. The differential joint entropy ${\displaystyle h(X,Y)}$ is defined as

${\displaystyle h(X,Y)=-\int f(x,y)\log f(x,y)\,dxdy}$.

For more than two continuous random variables ${\displaystyle X_{1},...,X_{n}}$ the definition is generalized to:

${\displaystyle h(X_{1},\ldots ,X_{n})=-\int f(x_{1},\ldots ,x_{n})\log f(x_{1},\ldots ,x_{n})\,dx_{1}\ldots dx_{n}}$.

The integral is taken over the support of ${\displaystyle f}$. It is possible that the integral does not exist in which case we say that the differential entropy is not defined.

### Properties

As in the discrete case the joint differnential entropy of a set of random variables is smaller or equal than the sum of the entropies of the individual random variables:

${\displaystyle h(X_{1},X_{2},\ldots ,X_{n})\leq \sum _{i=1}^{n}h(X_{i})}$

The following chain rule holds for two random variables:

${\displaystyle h(X,Y)=h(X|Y)+h(Y)}$

In the case of more than two random variables this generalizes to:

${\displaystyle h(X_{1},X_{2},\ldots ,X_{n})=\sum _{i=1}^{n}h(X_{i}|X_{1},X_{2},\ldots ,X_{i-1})}$

Joint differential entropy is also used in the definition of the mutal information between continuous random variables:

${\displaystyle I(X,Y)=h(X)+h(Y)-h(X,Y)}$

## References

• Theresa M. Korn; Korn, Granino Arthur. Mathematical Handbook for Scientists and Engineers: Definitions, Theorems, and Formulas for Reference and Review. New York: Dover Publications. ISBN 0-486-41147-8.
• Thomas M. Cover; Joy A. Thomas. Elements of Information Theory. Hoboken, New Jersey: Wiley. pp. 613–614. ISBN 0-471-24195-4.