advanced40 min studyLesson 749 in Mathematics

Hypothesis testing and error exponents

Separate fixed-type-I-error and Bayesian testing limits, with explicit hypothesis orientation and base-two exponents.

On this page

What you’ll understand

  • Define both testing errors with an unambiguous null and alternative.
  • Distinguish Stein's directed divergence exponent from the Bayesian Chernoff exponent.
  • Compare exact finite-sample errors with asymptotic exponential rates.

Two testing problems can use the same pair of distributions but optimize different errors. Holding the null-rejection probability below a fixed tolerance gives a directed divergence exponent. Minimizing a prior-weighted total error gives a symmetric Chernoff exponent instead. Neither limiting exponent is an exact finite-sample probability. Recording the decision event, the true law and the logarithm base avoids reversing the KL direction or interpreting a leading exponential rate as a complete performance guarantee.

State which error occurs under which law

Let H-zero assert law P and H-one assert law Q on a finite alphabet, with every probability strictly positive. Observe n iid samples under whichever hypothesis is true. We define alpha as P of rejecting H-zero and beta as Q of accepting H-zero. A randomized test is allowed at a likelihood-ratio threshold to meet an error constraint exactly. Different references sometimes use alpha for acceptance probability, so their symbols must be translated through the underlying event.

The Neyman–Pearson principle compares likelihood ratios: among rules with a fixed allowed alpha, reject P on observations with the largest Q-to-P ratio. These are the outcomes most favorable to Q relative to P. Randomization at a boundary can fill the remaining error budget. This finite-sample rule is separate from an asymptotic theorem; its threshold depends on the constraint and the actual product likelihood distribution.

αn=P⊗n(reject H0),βn=Q⊗n(accept H0),lim⁡n→∞−1nlog⁡2βn∗(ε)=D2(P∥Q)\alpha_n=P^{\otimes n}(\text{reject }H_0),\qquad\beta_n=Q^{\otimes n}(\text{accept }H_0),\qquad\lim_{n\to\infty}-\frac1n\log_2\beta_n^*(\varepsilon)=D_2(P\|Q)
Stein's limit fixes 0<ε<1 and minimizes β subject to α≤ε. The finite strictly positive iid laws give finite divergence; the orientation follows from the stated decision events.↔ Scroll wide equations horizontally.

Bayesian error has a different exponent

Now assign fixed positive prior probabilities to both hypotheses and minimize the weighted average of alpha and beta. The optimal decision compares the prior-weighted likelihoods. Its error exponent is Chernoff information, the negative logarithm of a minimized mixed power sum. With the displayed base-two convention, error has scale two to the minus n times the exponent, up to factors whose logarithms are smaller than n. The priors are fixed as n grows; exponentially changing priors define another regime.

Stein's asymmetric constraint allows the null rejection error to remain below a fixed positive tolerance while making the other error exponentially small. Bayesian optimization instead balances the two weighted errors, so its exponent generally differs from either directed divergence. Using natural logarithms multiplies both exponents by ln two and writes the exponential scale with e. Mixing a bits-valued divergence with exp of minus n times that number introduces a systematic conversion error.

C2(P,Q)=−min⁡0≤s≤1log⁡2∑xP(x)sQ(x)1−s,lim⁡n→∞−1nlog⁡2Pe,n∗=C2(P,Q)C_2(P,Q)=-\min_{0\le s\le1}\log_2\sum_xP(x)^sQ(x)^{1-s},\qquad\lim_{n\to\infty}-\frac1n\log_2P_{e,n}^*=C_2(P,Q)
This is the Bayesian Chernoff exponent for fixed positive priors and finite strictly positive iid laws. It is not Stein's fixed-type-I-error objective.↔ Scroll wide equations horizontally.

Exact probabilities retain finite-sample information

For symmetric binary models, the likelihood rule can reduce to majority voting, whose finite error is an exact binomial tail. A Chernoff or Bhattacharyya bound can upper-bound that error at finite n, but need not equal it. An exponent statement discards subexponential factors and therefore cannot specify a decimal error probability at a chosen short length. When that probability matters, calculate the tail or use a validated finite-sample bound.

Support and sampling assumptions also matter. If one law assigns zero probability where the other is positive, a single observation can sometimes settle a hypothesis and divergence can become infinite. With dependent observations, likelihoods need not factor and a one-sample exponent need not simply multiply by n. The strictly positive finite iid setting keeps these issues controlled, while making clear which changes require a new theorem rather than a symbolic substitution.

One pair of laws gives two distinct exponents

Take P=Bernoulli(0.8), Q=Bernoulli(0.2), and equal priors. Compute the one-sample and three-sample optimal Bayesian errors, then compare Chernoff and Stein exponents.

  1. For one sample, decide P on one and Q on zero. Each conditional error is 0.2, so Bayesian error is 0.2.

  2. For three samples, majority voting is the likelihood rule. Under P the error is 0.2³+3·0.8·0.2²=0.104; symmetry gives the same error under Q.

  3. The symmetric mixed-power sum is minimized at s=1/2 and equals two times sqrt(0.8·0.2)=0.8. Thus C₂=−log₂0.8≈0.321928 bits. In contrast D₂(P||Q)=0.8·2+0.2·(−2)=1.2 bits, the fixed-alpha Stein exponent.

The result

The exact finite errors are 0.2 and 0.104. Their values are not obtained by simply substituting n into either asymptotic exponent without further bounds.

Explore the model

Interactive lab

Interactive lab · probability

Sum the exact likelihood-rule tail

Pause and reset, then set both controls to p = 0.2 and n = 3. Interpret the count as observations favoring the wrong hypothesis under the symmetric model; sum bars from two upward and predict 0.104. For a fresh comparison, pause and reset, then set p = 0.2 and n = 5; sum bars from three upward and predict 0.05792. The instrument gives exact iid binomial probabilities, so the tail is a finite calculation. It does not display the entire family of likelihood tests or certify an asymptotic exponent by itself.

Sum the exact likelihood-rule tailThese are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Current readings: Mean · np: 5; Variance · np(1−p): 2.5; Total probability: 1. All parameters are adjustable with the labeled controls below.03581000.070.150.220.3Successes kP(X = k)k = 0 · P = 9.77e-4
Exact probabilityHighlighted outcomeMean np
Mean · np
5
Variance · np(1−p)
2.5
Total probability
1
t = 0 s

These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forA known finite likelihood rule can be checked exactly before taking an asymptotic exponent.

Check your understanding

With H₀=P and H₁=Q, which exponent belongs to minimizing Q(accept H₀) under fixed P(reject H₀)≤ε?

Try it yourself

Let P=Bernoulli(1/2), Q=Bernoulli(1/4), with H₀=P. For one observation and alpha≤0.05, construct the optimal randomized rejection rule and find beta. Then compute the asymptotic Stein exponent in bits.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

The Q/P ratio is larger at zero. Randomize rejection only there to spend the alpha budget.

Compare with the solution

At zero the ratio is (3/4)/(1/2)=1.5, while at one it is 0.5. Reject P with probability 0.1 after observing zero and never after one. Then alpha=(1/2)·0.1=0.05 and beta=1−(3/4)·0.1=0.925. The exponent is D₂(P||Q)=0.5log₂2+0.5log₂(2/3)≈0.207519 bits. This limiting exponent does not replace the one-observation value 0.925 or assert a finite-n inequality beta≤2^(−nD) without additional analysis.

Take it with you

  • Define both errors as events under their true hypotheses before choosing a KL direction.
  • Stein and Chernoff exponents optimize different asymptotic testing objectives.
  • Exact finite errors and exponent scales retain different amounts of performance information.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.