# An Event with Unit Density Still Has Zero Information, Despite Not Being an Event That Is Guaranteed to Occur.

My textbook says the following in a section on information theory:

The basic intuition behind information theory is that learning that an unlikely event has occurred is more informative than learning that a likely event has occurred. A message saying “the sun rose this morning” is so uninformative as to be unnecessary to send, but a message saying “there was a solar eclipse this morning” is very informative.

We would like to quantify information in a way that formalizes this intuition.

• Likely events should have low information content, and in the extreme case, events that are guaranteed to happen should have no information content whatsoever.

• Less likely events should have higher information content.

• Independent events should have additive information. For example, finding out that a tossed coin has come up as heads twice should convey twice as much information as finding out that a tossed coin has come up as heads once. To satisfy all three of these properties, we define the self-information of an event $\mathrm{x} = x$ to be

$$I(x) = -\log(P(x))$$

In this book, we always use $\log$ to mean the natural logarithm, with base $e$. Our definition of $I(x)$ is therefore written in units of nats. One nat is the amount of information gained by observing an event of probability $\dfrac{1}{e}$. Other texts use base-$2$ logarithms and units called bits or shannons; information measured in bits is just a rescaling of information measured in nats.

When $\mathrm{x}$ is continuous, we use the same definition of information by analogy, but some of the properties from the discrete case are lost. For example, an event with unit density still has zero information, despite not being an event that is guaranteed to occur.

Goodfellow, Ian; Bengio, Yoshua; Courville, Aaron. Deep Learning (Page 71).

When $\mathrm{x}$ is continuous, we use the same definition of information by analogy, but some of the properties from the discrete case are lost. For example, an event with unit density still has zero information, despite not being an event that is guaranteed to occur.

1. What is meant by "unit density"?
2. What is meant by "an event with unit density"?
3. What is meant by "an event with unit density still has zero information, despite not being an event that is guaranteed to occur"?

I would greatly appreciate it if people could please take the time to clarify this.

• An event with probability 1 (aka. "almost sure"), for example "$X$ is irrational" for a uniformly distributed $X\in[0,1]$ – Hagen von Eitzen Sep 20 '18 at 3:11
• @HagenvonEitzen This is in the context of a continuous random variable. A density of $1$, $p(x) = 1$ (or $f_{\mathrm{x}}(x) = 1$), for a continuous random variable is not guaranteed to occur -- that is only true in the context of discrete random variables. I think you're confusing probability with density? – The Pointer Sep 20 '18 at 3:27
• And I think I might have just answered my own question in the above comment? – The Pointer Sep 20 '18 at 3:34
• $I(x) = -\log(1) \Rightarrow I(x) = 0$, and so it has zero information. And that answers 3. – The Pointer Sep 20 '18 at 3:35
• I should also note that $P(x)$ in the textbook denotes a probability mass function, whilst $p(x)$ denotes a probability density function. – The Pointer Sep 20 '18 at 4:47

1. Unit density means $$p(x) = 1$$, where $$p(\cdot)$$ is a probability density function and $$x$$ is a continuous random variable.
2. An event with unit density has zero information: \begin{align} I(x) &= -\log(p(x)) \\ &= -\log(1) \\ &= 0 \end{align}
3. This is despite it not being an even that is guaranteed to occur. In fact, it is an even that has $$0$$ probability of occurring, since the cumulative density function of such a PDF is zero: \begin{align} &p(x) = 1 \\ \therefore \ &P(x) = 0 \ , \end{align} where $$P(x)$$ here represents the cumulative density function, as opposed to in the textbook, where the author uses it to represent the probability mass function. This is because the probability of a continuous random variable being equal to any specific value (rather than a continuous range of real values) is zero.