Search

Search papers and lessons

Channel Capacity

Level 3 · 14 min read

Channel capacity is the highest rate, in bits per use, at which information can cross a noisy channel with error as small as you like: the largest mutual information over all input choices.

On this page

  • Colour = topic mix
  • Probability
  • Discrete math
  • Information theory
  • Communications
  • Sign in to see your progress

TL;DR

Every channel, whether a phone line, a radio link or a disk, adds some noise, so the bits that come out are not always the bits that went in. Channel capacity is the largest rate at which you can send information through such a channel and still recover it with an error probability that can be made as small as you like. It is measured in bits per channel use (or bits per second when the channel is timed), and it is the largest Mutual Information between input and output over every way of choosing the input.

Where you'll see it: in deciding how fast a Wi-Fi link, a mobile network or a deep-space probe can possibly go, and in the target that modern error-correcting codes are designed to approach.

Intuition

Talking in a noisy room

Imagine talking to a friend across a loud room. If you speak slowly and clearly, almost every word gets through. If you speak very fast, the noise swallows syllables and your friend guesses wrong. Something in between is possible: you can speak fairly fast if you choose words that are hard to confuse with one another and repeat the important parts.

Channel capacity is the exact answer to "how fast can I speak so that, with the right choice of words, my friend still gets everything?" For the room, the answer depends on how loud you are compared with the noise and on how much the noise scrambles what you say.

Why engineers needed a limit

Before 1948, most engineers believed that noise put a hard limit on accuracy: the faster you sent, the more mistakes you made, and reducing mistakes meant slowing down. Claude Shannon showed something different. Below a certain rate, errors can be pushed as low as you want by coding over longer blocks. Above that rate, no code can work. The boundary between the two is the capacity. It turned "how good can a link be?" from a matter of opinion into a number you can compute from the channel alone.

The picture of the whole system is a pipeline. The message is encoded, sent through a noisy channel, and decoded. Capacity is the most information that can pass the middle step.

flowchart LR
  M[message] --> E[encoder]
  E --> X[input X]
  X --> C[noisy channel]
  C --> Y[output Y]
  Y --> D[decoder]
  D --> M2[estimated message]

The plot shows the answer for a simple channel that flips each bit with probability ff. When ff is small, almost all of the bit survives. When ff is one half, the output is pure noise and nothing gets through.

00.10.20.30.40.500.20.40.60.81flip probability fbits per use
  • C in bits per use
Capacity of the binary symmetric channel. At f = 0.2 the capacity is about 0.278 bits per use. At f = 0.5 the output is independent of the input and the capacity is zero.

The math

Definition

Let a channel be described by its input XX, its output YY, and the conditional probabilities p(y∣x)p(y \mid x) that the channel produces output yy when it is fed input xx. These probabilities are fixed by the physics of the channel and cannot be changed. What the sender can choose is the input distribution p(x)p(x).

The capacity is

C=max⁡p(x) I(X;Y),C = \max_{p(x)} \, I(X;Y),

where I(X;Y)I(X;Y) is the Mutual Information between input and output, computed with the chosen p(x)p(x) and the channel's fixed p(y∣x)p(y \mid x). The maximum is over all input distributions allowed by the channel's constraints, such as a limit on power or on the alphabet. The unit is bits per channel use when the logarithm is base 2.

The coding theorem

Shannon's noisy-channel coding theorem gives the meaning of CC. Let RR be the rate of a code, meaning the number of message bits carried per channel use.

  • If R<CR \lt C, there exist codes of block length nn whose probability of decoding error goes to zero as nn grows.
  • If R>CR \gt C, the probability of error stays bounded away from zero for every code, however long the block.

Capacity is therefore a sharp threshold. The proof of the first part uses random codes and a counting argument; the second part follows from an inequality on the information a decoder can extract. Neither is needed to use the formula, but both explain why the number matters.

The binary symmetric channel

Take the channel that flips each bit independently with probability ff. The conditional entropy of the output given the input is the entropy of the flip itself:

H(Y∣X)=Hb(f)=−flog⁡2f−(1−f)log⁡2(1−f).H(Y \mid X) = H_b(f) = -f\log_2 f - (1-f)\log_2(1-f).

Then

I(X;Y)=H(Y)−H(Y∣X)=H(Y)−Hb(f).I(X;Y) = H(Y) - H(Y \mid X) = H(Y) - H_b(f).

The output is one bit at most, H(Y)≤1H(Y) \le 1, and equality holds when the output is a fair coin. That happens when the input is also a fair coin, because the flip probability does not change a fair coin's odds. So the maximum is

C=1−Hb(f).C = 1 - H_b(f).

The Gaussian channel

Many real channels add continuous noise. Let the output be Y=X+ZY = X + Z, where the noise ZZ is Gaussian, Z∼N(0,N)Z \sim \mathcal{N}(0, N), and the sender must keep its average power E[X2]\mathbb{E}[X^2] at most PP. The capacity is

C=12log⁡2 ⁣(1+PN)bits per channel use.C = \tfrac{1}{2}\log_2\!\left(1 + \frac{P}{N}\right) \quad \text{bits per channel use.}

The ratio P/NP/N is the signal-to-noise ratio. Sketch of the argument: I(X;Y)=h(Y)−h(Z)I(X;Y) = h(Y) - h(Z), where hh is differential entropy. Among all distributions with a given variance, the Gaussian has the largest differential entropy. The output variance is at most P+NP + N, so h(Y)h(Y) is at most the entropy of a Gaussian with variance P+NP+N, and subtracting h(Z)h(Z) leaves the formula above.

When the channel has bandwidth WW hertz and the signal and noise powers are SS and N0WN_0 W, the Shannon–Hartley form gives the capacity in bits per second:

C=Wlog⁡2 ⁣(1+SN0W).C = W\log_2\!\left(1 + \frac{S}{N_0 W}\right).

Both forms say the same thing. More bandwidth or more signal power raises capacity, but the logarithm means each extra unit of power buys less and less.

Worked examples

Example
The binary symmetric channel with flip probability 0.2
  1. Use the formula C=1−Hb(f)C = 1 - H_b(f) with f=0.2f = 0.2.
  2. Compute the two terms of the binary entropy. −0.2log⁡20.2=0.2×2.3219=0.4644-0.2 \log_2 0.2 = 0.2 \times 2.3219 = 0.4644.
  3. −0.8log⁡20.8=0.8×0.3219=0.2575-0.8 \log_2 0.8 = 0.8 \times 0.3219 = 0.2575.
  4. Add them: Hb(0.2)=0.4644+0.2575=0.7219H_b(0.2) = 0.4644 + 0.2575 = 0.7219 bits.
  5. Subtract from one: C=1−0.7219=0.2781C = 1 - 0.7219 = 0.2781 bits per use.

Interpretation: no matter how cleverly you code, a long message over this channel can carry at most about 0.28 bits of information for every bit you send. Sending 1,000 channel bits could in principle deliver about 278 bits of message with vanishing error, and never more. Sending raw bits delivers 80% of them correctly, but you do not know which 80%. The gap between that and the 0.28 bits of true information per use is the price of that uncertainty, and coding is how you approach the limit despite it.

Example
A telephone line with 30 dB signal-to-noise ratio

Take a voice channel with bandwidth W=3000W = 3000 hertz and a signal-to-noise ratio of 30 dB.

  1. Convert 30 dB to a power ratio: S/N0W=1030/10=103=1000S/N_0 W = 10^{30/10} = 10^3 = 1000.
  2. Compute the logarithm: log⁡2(1+1000)=log⁡21001≈9.9658\log_2(1 + 1000) = \log_2 1001 \approx 9.9658.
  3. Multiply by the bandwidth: C=3000×9.9658≈29,897C = 3000 \times 9.9658 \approx 29{,}897 bits per second.

Interpretation: about 30 kilobits per second is the most this line can carry reliably, whatever the modem. The same back-of-envelope limit explains why voice-band dial-up modems stalled in the tens of kilobits per second, and why the gains after that came from changing the channel, not from better modulation alone.

Example
A small signal-to-noise ratio, by hand

Suppose a Gaussian channel has signal power three times the noise power, so P/N=3P/N = 3. Then C=12log⁡2(1+3)=12log⁡24=12×2=1C = \tfrac{1}{2}\log_2(1 + 3) = \tfrac{1}{2}\log_2 4 = \tfrac{1}{2} \times 2 = 1 bit per use. Cutting the power to a third, P/N=1P/N = 1, gives 12log⁡22=0.5\tfrac{1}{2}\log_2 2 = 0.5 bits per use. Going from ratio 1 to ratio 3 tripled the signal but only doubled the capacity, which is the logarithm at work.

Tradeoffs and failure modes

Capacity is an upper bound, and it assumes a model that is correct and stable. It helps to know where that assumption breaks.

SituationWhat goes wrongBetter choice
Sending above CCError probability stays bounded away from zero, however good the codeLower the rate, or improve the channel
Sending just below CC with short blocksLong blocks are needed for the error to vanish, so latency growsUse a long modern code such as LDPC, turbo or polar codes, sized to the latency budget
Assuming the best input distribution is always easyThe optimal p(x)p(x) may be unusual, such as water-filling power across frequenciesCompute the optimal input for the channel instead of assuming a uniform or Gaussian one
Channel quality changes over time, as in fadingA single number misleads, because the capacity itself variesUse outage or average capacity over the fading states
The noise model is wrongThe formula is correct for the model but the link performs differentlyMeasure the channel and refit the model before trusting the bound

The theorem is asymptotic: it describes what happens as the block length goes to infinity. Real systems have finite delay and finite computation, so achievable rates sit below capacity. The gap is small for good codes, and closing it was one of the central engineering projects of coding theory.

History

Ralph Hartley, in a 1928 paper, measured information as the logarithm of the number of distinguishable messages, which gave the first rule for how much a channel could carry. Claude Shannon extended that idea in "A Mathematical Theory of Communication," published in the Bell System Technical Journal in 1948. In it he defined entropy as a measure of information, introduced mutual information, and proved the noisy-channel coding theorem. The formula for the Gaussian channel in that paper is the one later named the Shannon–Hartley theorem.

Shannon's proof used random codes, which showed that good codes exist without giving a way to build them. For decades, practical codes fell well short of the bound. The gap began to close in the early 1990s, when turbo codes came close to capacity, and it closed further with the rediscovery of low-density parity-check codes and, in 2009, polar codes, which were proved to reach capacity for many channels. Those codes now run in mobile networks and storage devices, which is why the bound still guides design.

Check yourself

QuestionIn one sentence, what does channel capacity measure, and what quantity is maximized to compute it?Show answer

Channel capacity is the highest rate, in bits per channel use, at which information can be sent through a noisy channel with error probability that can be made arbitrarily small. It is computed by maximizing the mutual information I(X;Y)I(X;Y) over all input distributions p(x)p(x) the channel allows, while the channel's own transition probabilities stay fixed.

QuestionA binary symmetric channel flips each bit with probability 0.1. What is its capacity in bits per use?Show answer

Compute Hb(0.1)=−0.1log⁡20.1−0.9log⁡20.9=0.3322+0.1368=0.4690H_b(0.1) = -0.1\log_2 0.1 - 0.9\log_2 0.9 = 0.3322 + 0.1368 = 0.4690 bits. Then C=1−0.4690=0.5310C = 1 - 0.4690 = 0.5310 bits per use. So a long code can deliver about 531 message bits per 1,000 channel bits, and no code can do better.

QuestionWhy can a code with rate above capacity not reach an arbitrarily small error, even with a very long block?Show answer

Rate above capacity means the decoder must distinguish more messages than the channel output can separate reliably. The output carries at most CC bits per use about the input, so the remaining uncertainty about the message cannot be resolved by a decoder, however long the block. Shannon's converse makes this precise: the error probability is bounded away from zero for every code whose rate exceeds CC.

QuestionA Wi-Fi style link has 20 MHz of bandwidth and a signal-to-noise ratio of 20 dB. What is its Shannon capacity in bits per second, and what does the number mean in practice?Show answer

A 20 dB ratio is 102=10010^{2} = 100. Then C=20×106×log⁡2(1+100)=20×106×log⁡2101≈20×106×6.658≈133C = 20 \times 10^6 \times \log_2(1 + 100) = 20 \times 10^6 \times \log_2 101 \approx 20 \times 10^6 \times 6.658 \approx 133 million bits per second. This is an upper bound for a single link with Gaussian noise. Real links are lower because of protocol overhead, interference, and imperfect codes, but the number shows the ceiling that engineers are working under.

Sources