In information theory, the information content, self-information, surprisal, or Shannon information is a basic quantity derived from the probability of a particular event occurring from a random variable. It can be thought of as an alternative way of expressing probability, much like odds or log-odds, but which has particular mathematical advantages in the setting of information theory.
The Shannon information can be interpreted as quantifying the level of "surprise" of a particular outcome. As it is such a basic quantity, it also appears in several other settings, such as the length of a message needed to transmit the event given an optimal source coding of the random variable.
The Shannon information is closely related to information theoretic entropy, which is the expected value of the self-information of a random variable, quantifying how surprising the random variable is "on average." This is the average amount of self-information an observer would expect to gain about a random variable when measuring it.
The information content can be expressed in various units of information, of which the most common is the "bit" (sometimes also called the "shannon"), as explained below.
Claude Shannon's definition of self-information was chosen to meet several axioms:
An event with probability 100% is perfectly unsurprising and yields no information.
The less probable an event is, the more surprising it is and the more information it yields.
If two independent events are measured separately, the total amount of information is the sum of the self-informations of the individual events.
The detailed derivation is below, but it can be shown that there is a unique function of probability that meets these three axioms, up to a multiplicative scaling factor. Broadly, given a real number and an event with probability, the information content is defined as follows:
The base b corresponds to the scaling factor above. Different choices of b correspond to different units of information: if the b=2, then the unit is a bit or shannon; if b=e, then we're using the natural logarithm and the unit is the nat, short for "natural"; and if b=10, then the unit is a hartley, decimaldigit, or occasionally dit.
by definition equal to the expected information content of measurement of .: 11 : 19–20
The use of the notation for self-information above is not universal. Since the notation is also often used for the related quantity of mutual information, many authors use a lowercase for self-entropy instead, mirroring the use of the capital for the entropy.
While standard probabilities are represented by real numbers in the interval , self-informations are represented by extended real numbers in the interval . In particular, we have the following, for any choice of logarithmic base:
If a particular event has a 100% probability of occurring, then its self-information is : its occurrence is "perfectly non-surprising" and yields no information.
If a particular event has a 0% probability of occurring, then its self-information is : its occurrence is "infinitely surprising."
From this, we can get a few general properties:
Intuitively, more information is gained from observing an unexpected event—it is "surprising".
For example, if there is a one-in-a-million chance of Alice winning the lottery, her friend Bob will gain significantly more information from learning that she won than that she lost on a given day. (See also: Lottery mathematics.)
The Shannon information is closely related to the log-odds. In particular, given some event , suppose that is the probability of occurring, and that is the probability of not occurring. Then we have the following definition of the log-odds:
This can be expressed as a difference of two Shannon informations:
In other words, the log-odds can be interpreted as the level of surprise if the event 'doesn't' happen, minus the level of surprise if the event 'does' happen.
The corresponding property for likelihoods is that the log-likelihood of independent events is the sum of the log-likelihoods of each event. Interpreting log-likelihood as "support" or negative surprisal (the degree to which an event supports a given model: a model is supported by an event to the extent that the event is unsurprising, given the model), this states that independent events add support: the information that the two events together provide for statistical inference is the sum of their independent information.
This measure has also been called surprisal, as it represents the "surprise" of seeing the outcome (a highly improbable outcome is very surprising). This term (as a log-probability measure) was coined by Myron Tribus in his 1961 book Thermostatics and Thermodynamics.
When the event is a random realization (of a variable) the self-information of the variable is defined as the expected value of the self-information of the realization.
To verify this, the 6 outcomes correspond to the event and a total probability of 1/6. These are the only events that are faithfully preserved with identity of which dice rolled which outcome because the outcomes are the same. Without knowledge to distinguish the dice rolling the other numbers, the other combinations correspond to one die rolling one number and the other die rolling a different number, each having probability 1/18. Indeed, , as required.
Unsurprisingly, the information content of learning that both dice were rolled as the same particular number is more than the information content of learning that one dice was one number and the other was a different number. Take for examples the events and for . For example, and .
The information contents are
Let be the event that both dice rolled the same value and be the event that the dice differed. Then and . The information contents of the events are
By definition, information is transferred from an originating entity possessing the information to a receiving entity only when the receiver had not known the information a priori. If the receiving entity had previously known the content of a message with certainty before receiving the message, the amount of information of the message received is zero. Only when the advance knowledge of the content of the message by the receiver is less than 100% certain does the message actually convey information.
For example, quoting a character (the Hippy Dippy Weatherman) of comedian George Carlin, “Weather forecast for tonight: dark. Continued dark overnight, with widely scattered light by morning.” Assuming one does not reside near the Earth's poles or polar circles, the amount of information conveyed in that forecast is zero because it is known, in advance of receiving the forecast, that darkness always comes with the night.
Accordingly, the amount of self-information contained in a message conveying content informing an occurrence of event, , depends only on the probability of that event.
for some function to be determined below. If , then . If , then .
Further, by definition, the measure of self-information is nonnegative and additive. If a message informing of event is the intersection of two independent events and , then the information of event occurring is that of the compound message of both independent events and occurring. The quantity of information of compound message would be expected to equal the sum of the amounts of information of the individual component messages and respectively:
Because of the independence of events and , the probability of event is
are the logarithm functions . The only operational difference between logarithms of different bases is that of different scaling constants, so we may assume
where is the natural logarithm. Since the probabilities of events are always between 0 and 1 and the information associated with these events must be nonnegative, that requires that .
Taking into account these properties, the self-information associated with outcome with probability is defined as:
The smaller the probability of event , the larger the quantity of self-information associated with the message that the event indeed occurred. If the above logarithm is base 2, the unit of is bits. This is the most common practice. When using the natural logarithm of base , the unit will be the nat. For the base 10 logarithm, the unit of information is the hartley.
As a quick illustration, the information content associated with an outcome of 4 heads (or any specific outcome) in 4 consecutive tosses of a coin would be 4 bits (probability 1/16), and the information content associated with getting a result other than the one specified would be ~0.09 bits (probability 15/16). See above for detailed examples.
^R. B. Bernstein and R. D. Levine (1972) "Entropy and Chemical Change. I. Characterization of Product (and Reactant) Energy Distributions in Reactive Molecular Collisions: Information and Entropy Deficiency", The Journal of Chemical Physics57, 434-449 link.
^Myron Tribus (1961) Thermodynamics and Thermostatics:An Introduction to Energy, Information and States of Matter, with Engineering Applications (D. Van Nostrand, 24 West 40 Street, New York 18, New York, U.S.A) Tribus, Myron (1961), pp. 64-66 borrow.
^Thomas M. Cover, Joy A. Thomas; Elements of Information Theory; p. 20; 1991.