Shannon Information Theory Lab
Explore the mathematical foundations of information theory through interactive visualizations
1 Self-Information
The surprise, or information content, of a single event.
Self-information:
{{ selfInformation.toFixed(4) }} bits
Surprise level:
2 Information Entropy
The average uncertainty of a random variable.
Entropy $H(X)$:
{{ entropy.toFixed(4) }} bits
Maximum possible entropy:
{{ maxEntropy.toFixed(4) }} bits
Uncertainty level: {{ (entropy/maxEntropy*100).toFixed(1) }}%
3 Binary Entropy
A special case of the Bernoulli distribution.
$P(A)$
{{ pBinary.toFixed(3) }}
$P(\bar{A})$
{{ (1-pBinary).toFixed(3) }}
Binary entropy:
{{ binaryEntropy.toFixed(4) }} bits
4 Mutual Information
The amount of information shared by two random variables.
$H(X)$
{{ marginalEntropyX.toFixed(3) }}
$I(X;Y)$
{{ mutualInformation.toFixed(3) }}
$H(Y)$
{{ marginalEntropyY.toFixed(3) }}
5 Shannon-Hartley Theorem
The upper capacity limit of an AWGN channel.
Linear SNR
{{ snrLinear.toFixed(2) }}
Spectral efficiency
{{ spectralEfficiency.toFixed(2) }} bps/Hz
Channel capacity limit:
{{ channelCapacity.toFixed(2) }} Mbps
6 Text Entropy Analysis
Estimate the information density of natural-language text.
Characters
{{ textInput.length }}
Unique characters
{{ uniqueChars }}
Maximum entropy
{{ maxTextEntropy.toFixed(3) }}
Observed entropy:
{{ textEntropy.toFixed(4) }} bits/char
Compression efficiency:
{{ compressionEfficiency.toFixed(1) }}%
Built around Claude Shannon's 1948 paper 'A Mathematical Theory of Communication' • formulas rendered with MathJax
Interactive teaching tool for information theory • refresh formulas with MathJax.typeset()