Parameter Estimation and Binary Hypothesis Testing
Maximum likelihood estimation for discrete observations (binomial, uniform, geometric, Poisson, capture–recapture); binary hypothesis testing with discrete observations: likelihood matrices, false alarms and misses, the ML rule and likelihood ratio tests, the MAP rule and its minimum-error optimality, with coin, photon-counting and sensor-fusion examples. Continuous-type estimation and testing are pending.
Two faces of the same likelihood machinery. Estimation picks the parameter value that makes the observed data most probable — once where the likelihood is a pmf (discrete-type observations) and once where it’s a pdf (continuous-type observations, e.g. a Gaussian’s mean/variance or an exponential’s rate). Testing asks a discrete question instead of a continuous one: given an observation generated under one of two competing hypotheses, decide which — via the ML rule (likelihood ratio vs. 1) or the MAP rule (likelihood ratio vs. a prior-odds threshold), again for both discrete- and continuous-type observations.
Maximum likelihood parameter estimation
DefinitionLikelihood and the ML estimate (Hajek §2.8)
Suppose has pmf with an unknown parameter , and we observe . The likelihood of is , viewed as a function of with fixed. The maximum likelihood estimate is the parameter value under which the observation is least surprising.
| Component | Detail |
|---|---|
| Fixed | the observation |
| Varied | the parameter |
| Maximized | , or equivalently |
| Not | a probability distribution over (no prior is involved) |
WarningMaximize over , not over
Maximizing over with known answers a different question: the best guess of the next observation. Estimation fixes the data and varies the parameter.
ExampleFour ML estimates (Hajek)
| Model | Observation | Likelihood | |
|---|---|---|---|
| binomial (a bent coin) | heads in flips | ||
| uniform on | |||
| geometric | |||
| Poisson |
DerivationWhere each maximum is
Binomial: , positive for and negative after. The endpoint cases and give and , also equal to .
Uniform: the likelihood is 0 for , jumps to at , and decreases after, so .
Geometric: , which changes sign at . For the likelihood peaks at .
Poisson: , which changes sign at . For the likelihood peaks at .
ExampleCapture–recapture
The hypergeometric ML estimate of a population size, , is worked out in discrete-random-variables-and-distributions.
Binary hypothesis testing (discrete-type observations)
DefinitionThe testing problem (Hajek §2.11)
Exactly one of two hypotheses is true, or . The observation has pmf under and under . A decision rule declares or for each possible value of .
graph LR H["Switch: H1 or H0 is true"] --> S["System generates X with pmf p1 or p0"] S --> D["Decision rule"] D --> O["Declare H1 or H0"]
DefinitionLikelihood matrix, false alarm, miss
The likelihood matrix has one row per hypothesis and one column per value of , with entries . Mark one entry per column to specify a rule. Then:
- is the sum of the unmarked entries (statistics: type I error);
- is the sum of the unmarked entries (type II error).
Both are conditional probabilities.
ExampleA running likelihood matrix (Hajek)
| 0.0 | 0.1 | 0.3 | 0.6 | |
| 0.4 | 0.3 | 0.2 | 0.1 |
Rule “declare iff ”: and . Switching the column to gives and .
ImportantEvery change trades one error for the other
Moving a column’s mark from one row to the other unmarks one entry and marks another, so one error probability rises as the other falls. In general no rule makes both small. Hajek’s advice: compute the pair for several rules, then choose.
Maximum likelihood (ML) decision rule
DefinitionML rule and the likelihood ratio test
Declare the hypothesis under which the observation is more likely: mark the larger entry in each column. Equivalently, with the likelihood ratio
A likelihood ratio test (LRT) with threshold declares iff . Raising lowers and raises . The ML rule is the LRT with .
ExampleML rule for the running matrix
Declare for and for : and .
Maximum a posteriori (MAP) decision rule
DefinitionPriors and the joint probability matrix
Assume priors . The joint probability matrix has entries : each likelihood row scaled by its prior. All its entries sum to 1.
DefinitionMAP rule
Declare the hypothesis with the larger posterior . Both posteriors share the denominator (Bayes’ formula), so this means marking the larger entry in each column of the joint matrix. Equivalently,
MAP is the LRT with . With a uniform prior it reduces to ML.
TheoremMAP minimizes the average error probability
For any rule, equals the sum of the unmarked entries of the joint matrix. MAP marks the larger entry in every column, so it leaves the smallest possible sum unmarked. Hajek calls it the minimum-probability-of-error rule.
IntuitionWhy a larger raises the threshold
If is a priori much likelier, it takes stronger evidence (a larger likelihood ratio) to declare .
ExampleMAP for the running matrix,
| .00 | .02 | .06 | .12 | |
| .32 | .24 | .16 | .08 |
MAP declares only for . That gives , and , versus for the ML rule. (These three numbers are computed here, not in Hajek.)
ExampleFair or biased coin, 5 flips (Hajek)
: heads with probability ; : fair. = heads in 5 flips. The binomial coefficients cancel in the ratio:
| Rule | Declares iff | with | ||
|---|---|---|---|---|
| ML () | .5 | .268 | ||
| MAP () | .197 |
ExamplePhoton counting (Hajek)
A laser sends a bit. The photon count is Poisson(6) for a one and Poisson(2) for a zero:
- ML: declare one iff , i.e. .
- MAP with zeros 5 times likelier (): declare one iff , i.e. .
On or the rules disagree: the evidence favors a one, but the prior favors a zero more.
ExampleSensor fusion (Hajek)
Two motion sensors report , and = a person is present. The readings are conditionally independent given the hypothesis, so the joint likelihoods multiply:
| =0 | 1 | 2 | =0 | 1 | 2 | ||
|---|---|---|---|---|---|---|---|
| .1 | .3 | .6 | .1 | .1 | .8 | ||
| .8 | .1 | .1 | .7 | .2 | .1 |
| 00 | 01 | 02 | 10 | 11 | 12 | 20 | 21 | 22 | |
|---|---|---|---|---|---|---|---|---|---|
| .01 | .01 | .08 | .03 | .03 | .24 | .06 | .06 | .48 | |
| .56 | .16 | .08 | .07 | .02 | .01 | .07 | .02 | .01 |
- ML (tie at (0,2) broken toward ): declare on . and .
- MAP with : declare iff , only on . , , and .
- ML’s average error under the same priors: , larger, as MAP optimality guarantees.
Still to write
NoteTODO — ML parameter estimation for continuous-type variables
Needs Hajek’s continuous-observation version (maximizing a pdf). Source
text not yet in sources/.
NoteTODO — Binary hypothesis testing with continuous-type observations
Needs Hajek’s continuous version (LRTs with pdfs). Source text not yet in
sources/.
Quick reference
| Object | Statement | Note |
|---|---|---|
| ML estimate | data fixed, parameter varied | |
| Standard ML estimates | binomial ; geometric ; Poisson ; uniform | |
| False alarm / miss | / | type I / type II |
| Likelihood ratio | LRT: declare iff | |
| ML rule | LRT with | larger entry per column |
| MAP rule | LRT with | minimizes |
Facts to keep to hand
- One likelihood, two uses. Estimation maximizes over a range of parameters. Testing compares it across two hypotheses.
- Every rule here is a likelihood ratio test. ML and MAP differ only in the threshold, and the threshold is the prior odds. Moving it trades false alarms for misses.
- MAP is optimal for the prior you assumed. It minimizes average error under that prior. Reporting both conditional error probabilities, as Hajek recommends, shows what the choice of rule costs.
References
- Hajek, Probability with Engineering Applications (ECE 313 notes) — chapter 2, §§2.8, 2.11 (continuous-type sections pending)