Hypothesis Testing and MAP/ML Detection
Why Detection Theory?
Chapter 8 introduced the ML detector as the minimum-distance rule. Now we develop the rigorous statistical framework behind that result. Detection theory answers the question: given a noisy observation , which of possible messages was transmitted? The answer depends on whether we have prior knowledge (MAP) or not (ML), and the mathematical structure of the optimal detector reveals when and why the minimum-distance rule is optimal.
Definition: Binary Hypothesis Test
Binary Hypothesis Test
A binary hypothesis test is a decision between two hypotheses based on an observation :
where and are known signals and is noise with known distribution (typically ).
A decision rule partitions the observation space into two regions:
- : decide (the acceptance region)
- : decide (the rejection region)
Two types of errors arise:
-
Type I error (false alarm): deciding when is true, with probability
-
Type II error (miss): deciding when is true, with probability
The detection probability is .
In digital communications, and correspond to the two transmitted symbols. The false alarm and miss probabilities are the conditional error probabilities and .
Definition: Likelihood Ratio Test (LRT)
Likelihood Ratio Test (LRT)
The likelihood ratio for observation is
A likelihood ratio test (LRT) takes the form
where is a threshold that depends on the optimality criterion. Equivalently, using the log-likelihood ratio:
The LRT is the most general form of an optimal binary detector; every optimal decision rule can be expressed as an LRT with an appropriate choice of threshold .
Theorem: Neyman-Pearson Lemma
Among all decision rules with false alarm probability (for a given ), the likelihood ratio test
with threshold chosen so that maximises the detection probability .
That is, the LRT is the most powerful test at level : no other test with can achieve a higher .
The LRT decides for observations where is much more likely than (large ). The threshold controls the trade-off between false alarms and detection: lowering increases both and .
Sufficiency of the LRT
Let be the LRT with , and let be any other test with . Define the difference in detection probabilities:
On , we have by construction, so .
Optimality
It can be shown that
since and . Therefore for all tests with .
Definition: MAP Detection Rule
MAP Detection Rule
The maximum a-posteriori (MAP) detection rule minimises the total probability of error by choosing the hypothesis with the largest posterior probability:
By Bayes' theorem, , so the MAP rule is equivalent to the LRT with threshold
That is:
For the M-ary case with hypotheses:
The MAP rule uses prior probabilities as side information. When the priors are unequal, the decision boundary shifts toward the less likely hypothesis, reducing the overall error probability.
Definition: ML Detection Rule
ML Detection Rule
The maximum-likelihood (ML) detection rule is the MAP rule with uniform priors :
The ML threshold is , so the LRT becomes
For the AWGN channel with , the ML rule reduces to the minimum-distance rule:
which is the result derived geometrically in Chapter 8.
The ML detector is optimal (in the sense of minimising ) only when all hypotheses are equally likely. In practice, source coding typically makes all bit patterns approximately equally likely, so the ML detector is widely used.
Theorem: Union Bound on Error Probability
For M-ary detection in AWGN with signal set , the symbol error probability of the ML detector is upper bounded by
where is the Euclidean distance between signals and , and .
At high SNR, the bound is dominated by the nearest-neighbour terms:
where is the average number of nearest neighbours at minimum distance .
The probability of confusing with in a pairwise test is . The union bound sums these pairwise error probabilities. It overestimates because error events can overlap (one noise realisation might cause confusion with multiple symbols), but at high SNR, the dominant error event is a single nearest-neighbour confusion.
Pairwise error probability
The probability that is mistaken for (ignoring all other signals) is
This follows from the AWGN noise projecting onto the line between and .
Union bound application
The event "error given was sent" is a subset of the union of events " confused with " for :
Averaging over the transmitted signal:
Example: Binary Detection in AWGN (BPSK)
A BPSK system transmits (for bit 0) and (for bit 1) over an AWGN channel with noise variance . The received signal is where .
(a) Derive the ML decision rule.
(b) Compute the bit error probability.
(c) Find the MAP decision rule when .
ML decision rule
The likelihood ratio is
The ML test simplifies to .
Bit error probability
By symmetry, :
MAP decision rule
The MAP threshold is . The decision rule becomes
The threshold shifts left (toward ) because is more likely, expanding the decision region for .
Example: M-ary Detection (QPSK Decision Regions)
A QPSK constellation has signal points
(a) Find the ML decision regions.
(b) Compute the symbol error probability.
(c) Show that with Gray mapping.
Decision regions
By symmetry of the square constellation, the ML decision regions are the four quadrants:
: and
: and
: and
: and
Symbol error probability
A symbol is correct iff both the I and Q components are decoded correctly. Each component is an independent BPSK decision with energy :
at high SNR (neglecting the term).
BER with Gray mapping
With Gray mapping, each symbol error causes exactly one bit error out of bits. Therefore
This is identical to BPSK, confirming that QPSK achieves the same as BPSK while transmitting twice the bits per symbol.
ML vs MAP Decision Regions
Explore how prior probabilities shift the decision boundaries. With equal priors (ML), boundaries are perpendicular bisectors of the segment between signal points. As the prior probability of increases, the MAP boundary shifts toward (expanding the region). Observe how the overall error probability changes with the prior.
Parameters
MAP vs ML Decision Boundary Animation
Quick Check
A binary communication system has and . Compared to the ML detector, the MAP detector will:
Shift the decision boundary toward , reducing overall
Keep the same decision boundary as ML
Shift the decision boundary toward , reducing overall
Always achieve lower than ML regardless of the priors
The MAP threshold is . Since is much more likely, the MAP detector expands by shifting the boundary toward . This increases but greatly decreases , and since dominates, the overall decreases.
Common Mistake: Forgetting Prior Probabilities in MAP Detection
Mistake:
Using the ML decision rule (minimum distance) when the transmitted symbols have significantly unequal prior probabilities, and expecting minimum overall error probability.
Correction:
The ML detector is optimal only for uniform priors. When priors are unequal, the MAP detector shifts the decision boundary toward the less likely symbol and achieves strictly lower total .
In practice, source coding and scrambling make the bit probabilities approximately , so ML is usually a good approximation. However, in systems with unequal symbol probabilities (e.g., probabilistic constellation shaping), using ML instead of MAP wastes the shaping gain.
Historical Note: Neyman and Pearson
1933Jerzy Neyman and Egon Pearson published their fundamental lemma on optimal hypothesis testing in 1933, establishing that the likelihood ratio test is the most powerful test at any given significance level. Their work, originally motivated by problems in biological statistics, became the foundation of statistical decision theory and was later adopted by the radar and communications communities in the 1940s-50s. The Neyman-Pearson framework directly influenced the development of optimal receiver design by Woodward, Middleton, and Van Trees.
Historical Note: From Bayes to MAP Detection
1763-1961Thomas Bayes' posthumously published theorem (1763) on inverse probability lay dormant for nearly two centuries before becoming central to statistical decision theory in the 1950s. The MAP detection rule — choose the hypothesis with the largest posterior probability — is a direct application of Bayes' theorem. Abraham Wald's sequential analysis (1947) and the subsequent development of Bayesian decision theory by Raiffa and Schlaifer (1961) established the framework used in modern communications.
Hypothesis Test
A statistical decision procedure that selects one of two or more hypotheses based on observed data. In digital communications, each hypothesis corresponds to a possible transmitted symbol, and the test determines the detected symbol.
Related: Likelihood Ratio Test (LRT), Map Detection, Ml Detection
Likelihood Ratio
The ratio of the conditional densities of the observation under the two hypotheses. Every optimal detection rule can be expressed as a comparison of the likelihood ratio against a threshold.
Related: Binary Hypothesis Test, Neyman-Pearson Lemma, Map Detection