


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Abstract This document is an introduction to entropy and mutual information for discrete random variables. It gives their definitions in terms of prob- abilities, and a few simple examples.
The entropy of a random variable is a function which attempts to characterize the “unpredictability” of a random variable. Consider a random variable X rep- resenting the number that comes up on a roulette wheel and a random variable Y representing the number that comes up on a fair 6-sided die. The entropy of X is greater than the entropy of Y. In addition to the numbers 1 through 6, the values on the roulette wheel can take on the values 7 through 36. In some sense, it is less predictable. But entropy is not just about the number of possible outcomes. It is also about their frequency. For example, let Z be the outcome of a weighted six- sided die that comes up 90% of the time as a “2”. Z has lower entropy than Y representing a fair 6-sided die. The weighted die is less unpredictable, in some sense. But entropy is not a vague concept. It has a precise mathematical definition. In particular, if a random variable X takes on values in a set X = {x 1 , x 2 , ..., xn}, and is defined by a probability distribution P (X), then we will write the entropy of the random variable as
H(X) = −
x∈X
P (x) log P (x). (1)
We may also write this as
H(P (x)) ≡ H(P ) ≡ H(X).
If the log in the above equation is taken to be to the base 2, then the entropy is expressed in bits. If the log is taken to be the natural log, then the entropy is expressed in nats. More commonly, entropy is expressed in bits, and unless otherwise noted, we will assume a logarithm with base 2. Example 1. To compute the entropy of a fair coin, we first define its distribution:
P (X = heads) =
P (X = tails) =
Using Equation (1), we have:
H(P ) = −
x∈{heads,tails}
P (x) log P (x) (2)
log
log
Example 2. Let X be an unfair 6-sided die with probability distribution defined by P (X = 1) = 12 , P (X = 2) = 14 , P (X = 3) = 0, P (X = 4) = 0,
Mutual information is a quantity that measures a relationship between two random variables that are sampled simultaneously. In particular, it measures how much information is communicated, on average, in one random variable about another. Intuitively, one might ask, how much does one random variable tell me about another? For example, suppose X represents the roll of a fair 6-sided die, and Y represents whether the roll is even (0 if even, 1 if odd). Clearly, the value of Y tells us something about the value of X and vice versa. That is, these variables share mutual information. On the other hand, if X represents the roll of one fair die, and Z represents the roll of another fair die, then X and Z share no mutual information. The roll of one die does not contain any information about the outcome of the other die. An important theorem from information theory says that the mutual informa- tion between two variables is 0 if and only if the two variables are statistically independent. The formal definition of the mutual information of two random variables X and Y , whose joint distribution is defined by P (X, Y ) is given by
x∈X
y∈Y
P (x, y) log
P (x, y) P (x)P (y)
In this definition, P (X) and P (Y ) are the marginal distributions of X and Y obtained through the marginalization process described in the Probability Review document.