Surprisal
The surprisal of a positive-probability event is the negative logarithm of its probability.
On this page 8 sections
- Overview
- Surprisal measures how unexpected an outcome is under a probability forecast
- When an event contains several equally likely outcomes, find its total probability first
- A certain event has probability 1 and surprisal 0 because log_2 1=0
- A closer look
- Key takeaway
- Sources & further reading
- Concept connections
01Surprisal measures how unexpected an outcome is under a probability forecast#
Surprisal measures how unexpected an outcome is under a probability forecast. A high-probability outcome carries little surprise; an outcome assigned a tiny probability carries much more. Using a logarithm makes surprises add when independent event probabilities multiply.
Surprisal assigns more information to a less likely event. For a positive event probability p, measured in bits:
An event with probability has surprisal 7 bits. The logarithm reads its exponent; the minus sign makes the result positive.
In bits, probability gives , and probability gives 3. Two independent half-probability outcomes have joint probability and total surprise 2 bits. The minus sign makes these values nonnegative because logarithms of probabilities below 1 are negative.
An event has probability . Find its surprisal in bits.
Show answer and explanation
bits. The negative sign makes this nonnegative.
02When an event contains several equally likely outcomes, find its total probability first#
When an event contains several equally likely outcomes, find its total probability first. Counting outcomes alone is not the information value.
The log base fixes the unit. Base 2 gives bits; a natural logarithm would give nats.
Of equally likely labeled tickets, are marked. Find the marked event’s surprisal in bits.
Show answer and explanation
bits. The negative sign makes this nonnegative.
03A certain event has probability 1 and surprisal 0 because log_2 1=0#
A certain event has probability 1 and surprisal 0 because . Positive probabilities below 1 have positive surprisal.
This measures surprise relative to a probability model. A surprising observation does not by itself prove a model is wrong.
Probability is . A draft uses as surprisal. Give the corrected bit value.
Show answer and explanation
bits. The negative sign makes this nonnegative.
04A closer look#
A probabilistic model’s log loss uses this same idea: confidently assigning tiny probability to the observed outcome is costly. State the logarithm base, since base 2 gives bits while natural logarithms give nats. The numerical units change, though forecast ranking does not.
Use −log₂p for bits: rarer events carry more surprisal; a certain event carries zero.
- Compute the information associated with a positive-probability event.
Sources & further reading
- [1]Dive into Deep Learning §22.11.1.1 ↗Dive into Deep Learning §22.11.1.1 · Article