Entropy: Measuring Uncertainty
At its heart, information theory deals with randomness. Entropy (often denoted as *H*) measures the average amount of uncertainty associated with a random variable. A highly unpredictable event – like flipping a fair coin – has high entropy.
Formally, for a discrete random variable X taking values {x₁, x₂, ..., xₘ} with probabilities {p₁, p₂, ..., pₘ}, the entropy is defined as: H(X) = - Σᵢ pᵢ * log₂(pᵢ). The logarithm base 2 is crucial because it’s directly related to bits.
H(X) = - Σᵢ pᵢ * log₂(pᵢ)
Bits and Binary Representation
The fundamental unit of information is the bit. A bit can be either 0 or 1, representing two distinct states. This binary representation is crucial for digital communication.
Shannon’s work established a direct link between entropy and the number of bits needed to represent information. Higher entropy implies more bits are required on average to encode the data.
Channel Capacity
A communication channel (e.g., a wire, radio wave) is subject to noise and distortion. Channel capacity (C) represents the maximum rate at which information can be reliably transmitted over that channel.
The channel capacity depends on the bandwidth of the channel and its signal-to-noise ratio (SNR). A higher SNR allows for greater capacity – more bits per second – without errors.
C = B * log₂(1 + SNR)
Redundancy and Compression
Because entropy represents the *average* uncertainty, real-world data often contains redundancy – patterns or repetitions that don’t contribute to information. This is where compression algorithms come in.
Compression techniques exploit redundancy to reduce the number of bits needed to represent a message without losing essential information. Examples include Huffman coding and Lempel-Ziv.
Frequently asked questions
What is Shannon’s theorem?
Shannon's theorem states that the rate at which reliable communication is possible over a channel is limited by the channel capacity, which depends on the bandwidth and signal-to-noise ratio.
Why do we use base 2 for logarithms in information theory?
Base 2 is used because bits are the fundamental unit of information – representing either 0 or 1.
How does entropy relate to data storage?
Entropy dictates the minimum number of bits required to represent a dataset, influencing storage efficiency and compression strategies.
Try it live
Everything above runs in your browser — open SPH Fluid and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open SPH Fluid simulation