---
title: Error probability for binary signaling
heading: Deciding between two signals in Gaussian noise, the Q-function, antipodal, orthogonal and on–off signaling, the 3 dB gap between them, and thresholds for unequal probabilities
eyebrow: S8 · Lesson 14 · Error probability for binary signaling
xp: 50
---

::: hook
With the matched filter in place, a binary receiver sees one number per bit: the signal's contribution plus Gaussian noise. Deciding means comparing that number with a threshold, and the chance of being wrong follows from the Gaussian tail, the Q-function. The answer depends on only one thing about the two signals: how far apart they are in energy terms. Opposite pulses, antipodal signaling, are as far apart as two signals of a given energy can be, and they beat orthogonal signals by exactly 3 dB, a number that runs through all of digital communications.
:::

::: play
- Bit error probability against $E_b/N_0$ (log scale): antipodal signaling, such as BPSK, $Q(\sqrt{2E_b/N_0})$, and orthogonal signaling, such as coherent FSK or on–off keying with average energy $E_b$, $Q(\sqrt{E_b/N_0})$.
- The curves have the same shape, shifted by 3 dB. At $10^{-5}$ antipodal needs 9.6 dB and orthogonal 12.6 dB.
- Near the bottom, each extra dB cuts the error rate by a large factor: the waterfall that makes digital links either work well or not at all.
:::
:::

```sim plot
view: graph
x: E = 0..14 dB
y: P = 1e-8..0.5 log
plot: Q(sqrt(2*10^(E/10))) | samples: 400 | label: antipodal (BPSK)
plot: Q(sqrt(10^(E/10))) | samples: 400 | dashed | color: ch2 | label: orthogonal (FSK, OOK)
plot: 1e-5 | dashed | color: ch3 | label: 10⁻⁵
```

::: predict
## A BPSK link runs at 9.6 dB Eb/N0 and 10 Mb/s. Roughly how many bit errors does it make per second?

- [ ] None
- [ ] About 1
- [x] About 100
- [ ] About 100,000

::: reveal
At 9.6 dB, $P_b = Q(\sqrt{2 \times 9.12}) = Q(4.27) \approx 10^{-5}$, and 10⁷ bits per second × 10⁻⁵ is about 100 errors each second. Error rates that sound tiny add up quickly at high bit rates, which is why links add error-correcting codes (lessons 34 to 36).
:::
:::

::: nameit
## Binary detection

The matched-filter output is $z = a_i + n$, with $a_i$ the noise-free value for signal i and n Gaussian with variance σ². With equal priors, the best threshold is midway between $a_0$ and $a_1$, and

$$P_b = Q\left(\frac{a_1 - a_0}{2\sigma}\right), \qquad Q(x) = \frac{1}{\sqrt{2\pi}}\int_x^\infty e^{-u^2/2}\,du$$

In energy terms, with $E_d$ the energy of the difference between the two signals, $P_b = Q\left(\sqrt{\frac{E_d}{2N_0}}\right)$.

## Three classic cases

- **Antipodal** (s₁ = −s₀, BPSK, polar NRZ): $E_d = 4E_b$, so $P_b = Q\left(\sqrt{\frac{2E_b}{N_0}}\right)$.
- **Orthogonal** (coherent FSK): $E_d = 2E_b$, so $P_b = Q\left(\sqrt{\frac{E_b}{N_0}}\right)$, 3 dB worse.
- **On–off keying**: one signal is zero; with average energy $E_b$ (peak $2E_b$) it matches orthogonal signaling.

For $P_b = 10^{-5}$: 9.6 dB for antipodal, 12.6 dB for orthogonal.

## Unequal priors

If symbol 0 is sent with probability $p_0$ and 1 with $p_1$, the minimum-error threshold for antipodal levels ±A in noise σ shifts from 0 to

$$\lambda = \frac{\sigma^2}{2A}\ln\frac{p_0}{p_1}$$

toward the less likely symbol.
:::

::: example
## A BPSK link runs at 9.6 dB. What's its bit error probability, and what would on–off keying with the same average power give?

::: solution
1. **Linear Eb/N0.**
   $$10^{0.96} = 9.12$$
2. **BPSK.**
   $$\begin{aligned} P_b &= Q(\sqrt{18.24}) \\ &= Q(4.27) \\ &= 9.7 \times 10^{-6} \end{aligned}$$
3. **OOK.**
   $$\begin{aligned} P_b &= Q(\sqrt{9.12}) \\ &= Q(3.02) \\ &= 1.3 \times 10^{-3} \end{aligned}$$
   That's a hundred times worse; OOK needs 12.6 dB to reach 10⁻⁵.

**Answer:** BPSK gives 9.7 × 10⁻⁶, and OOK 1.3 × 10⁻³.
:::
:::

::: example
## Antipodal levels ±1 V sit in Gaussian noise with σ = 0.5 V, and 1s are sent 70% of the time. Where should the threshold be?

::: solution
1. **Levels and priors.** Send 1 as +1 V with $p_1$ = 0.7 and 0 as −1 V with $p_0$ = 0.3.
2. **Threshold.**
   $$\begin{aligned} \lambda &= \frac{0.25}{2}\ln\frac{0.3}{0.7} \\ &= -0.106\ \text{V} \end{aligned}$$
3. **Which way it moves.** Toward the less likely −1 V, so that more of the ambiguous region is decided in favor of the likelier symbol.

**Answer:** the threshold belongs at −0.106 V.
:::
:::

::: example
## What Eb/N0 does BPSK need for a bit error probability of 10⁻⁶, and orthogonal signaling?

::: solution
1. **Argument for 10⁻⁶.** Q(x) = 10⁻⁶ at x = 4.753.
2. **BPSK.**
   $$\begin{aligned} \sqrt{2E_b/N_0} &= 4.753 \\ E_b/N_0 &= 11.30 \\ &= 10.5\ \text{dB} \end{aligned}$$
3. **Orthogonal signaling.**
   $$\begin{aligned} \sqrt{E_b/N_0} &= 4.753 \\ E_b/N_0 &= 22.6 \\ &= 13.5\ \text{dB} \end{aligned}$$
4. **How steep Q is.** Each tenfold reduction in error rate near here costs less than a decibel: the Q function falls steeply.

**Answer:** BPSK needs 10.5 dB and orthogonal signaling 13.5 dB.
:::
:::

::: check
given: E = 4 | 7 | 9.6 | 11
answer: Q(sqrt(2*10^(E/10)))
tolerance: 1%

## A BPSK link runs at Eb/N0 = {E} dB. What's its bit error probability?

::: right
Right. $Q(\sqrt{2E_b/N_0})$ = {answer}.
:::

::: misses
- [Q(sqrt(10^(E/10)))] That's orthogonal signaling; antipodal signals are twice as far apart in energy.
- [Q(sqrt(2*E))] Convert Eb/N0 from dB to a ratio first.
- [any] Not yet. $P_b = Q(\sqrt{2E_b/N_0})$.
:::
:::

::: check
given: E = 7 | 10 | 12.6 | 14
answer: Q(sqrt(10^(E/10)))
tolerance: 1%

## Coherent binary FSK runs at Eb/N0 = {E} dB. What's its bit error probability?

::: right
Right. $Q(\sqrt{E_b/N_0})$ = {answer}.
:::

::: misses
- [Q(sqrt(2*10^(E/10)))] That's antipodal; orthogonal signals are only $\sqrt{2E_b}$ apart.
- [any] Not yet. $P_b = Q(\sqrt{E_b/N_0})$.
:::
:::

::: check
given: R = 1 | 10 | 1000; P = 1e-6 | 1e-9
answer: R*1e6*P
tolerance: 0.5%

## A link at {R} Mb/s has a bit error probability of {P}. How many errors does it make per second, on average?

::: right
Right. $R_bP_b$ = {answer}.
:::

::: misses
- [R*P] Use bits per second: {R} Mb/s is {R} × 10⁶ b/s.
- [any] Not yet. Errors per second = bit rate × error probability.
:::
:::

::: check
given: A = 1 | 2; s = 0.3 | 0.6; p = 0.6 | 0.8 | 0.9
answer: s^2/(2*A)*ln((1 - p)/p)
unit: V
tolerance: 0.5%

## Antipodal levels ±{A} V in Gaussian noise of σ = {s} V; the positive level is sent with probability {p}. Where's the minimum-error threshold?

::: right
Right. $\frac{\sigma^2}{2A}\ln\frac{p_0}{p_1}$ = {answer} V.
:::

::: misses
- [s^2/(2*A)*ln(p/(1 - p))] The threshold moves toward the less likely symbol, here the negative one.
- [0] With unequal priors the midpoint isn't optimal.
- [any] Not yet. Equate the weighted likelihoods $p_0f(z|0) = p_1f(z|1)$.
:::
:::

::: check
given: A = 0.5 | 1 | 2; s = 0.2 | 0.4 | 0.8
answer: Q(A/s)
tolerance: 1%

## Antipodal levels ±{A} V with noise σ = {s} V and a threshold at zero. What's the error probability?

::: right
Right. $Q(A/\sigma)$ = {answer}.
:::

::: misses
- [Q(2*A/s)] The distance to the threshold is A, not 2A.
- [any] Not yet. An error needs noise beyond A in the wrong direction.
:::
:::

::: check
given: E = 6 | 9 | 12
answer: Q(sqrt(10^(E/10)))/Q(sqrt(2*10^(E/10)))
tolerance: 1%

## At Eb/N0 = {E} dB, how many times more errors does orthogonal signaling make than antipodal?

::: right
Right. $Q(\sqrt{E_b/N_0})/Q(\sqrt{2E_b/N_0})$ = {answer}.
:::

::: misses
- [2] The 3 dB gap in Eb/N0 becomes a large ratio in error rate, growing with Eb/N0.
- [any] Not yet. Compute both and divide.
:::
:::

::: check
kind: parts
given: E = 4 | 7 | 9.6 | 12

## A link runs at Eb/N0 = {E} dB.

::: part
answer: Q(sqrt(2*10^(E/10)))
tolerance: 1%

### What bit error probability does BPSK give?

::: misses
- [any] $Q(\sqrt{2E_b/N_0})$.
:::
:::

::: part
answer: Q(sqrt(10^(E/10)))/Q(sqrt(2*10^(E/10)))
tolerance: 1%

### How many times more errors does coherent orthogonal FSK make?

::: misses
- [any] $Q(\sqrt{E_b/N_0})/Q(\sqrt{2E_b/N_0})$.
:::
:::
:::

::: check
kind: derivation
vars: A = 0.1..5, s = 0.05..2, p = 0.05..0.95

## Antipodal levels ±A sit in noise σ = s; the positive level has prior p.

::: step
answer: s^2/(2*A)*ln((1 - p)/p)

### Where is the minimum-error threshold?
:::

::: step
answer: Q(A/s)

### What error probability does a threshold at zero give?
:::

::: right
Right. The shift is small when the levels are far apart relative to the noise: priors matter most at low SNR.
:::
:::

::: explain
## Why do antipodal signals beat orthogonal signals by exactly 3 dB?

::: model
A detector's errors are set by how far apart the two possible matched-filter outputs are compared with the noise, which in signal terms is the energy of the difference between the two signals. With each signal of energy $E_b$, antipodal signals are exact opposites, so their difference is twice either one and has energy $4E_b$. Orthogonal signals point in perpendicular directions, so their difference has energy $E_b + E_b = 2E_b$, half as much. The error probability depends only on that difference energy relative to the noise density, so orthogonal signaling needs twice the energy per bit, 3 dB more, to match antipodal.
:::
:::

::: practice

::: check
given: E = 0 | 2 | 4 | 5 | 6 | 8 | 9.6
answer: Q(sqrt(2*10^(E/10)))
tolerance: 1%

## BPSK error probability at {E} dB?

::: misses
- [any] $Q(\sqrt{2E_b/N_0})$.
:::
:::

::: check
given: E = 6 | 8 | 9 | 10 | 11 | 12 | 13
answer: Q(sqrt(10^(E/10)))
tolerance: 1%

## Coherent FSK error probability at {E} dB?

::: misses
- [any] $Q(\sqrt{E_b/N_0})$.
:::
:::

::: check
given: R = 5 | 100; P = 1e-5 | 1e-7
answer: R*1e6*P
tolerance: 0.5%

## Errors per second at {R} Mb/s, $P_b$ = {P}?

::: misses
- [any] $R_bP_b$.
:::
:::
:::
