Algorithm Search⌘K

Theoremcore

Duality of tests and confidence sets

Also called test inversion, inverting a test.

The parameter values that a level-alpha test does not reject form a confidence set of level 1 - alpha, and every confidence set defines a test this way.

A confidence set and a family of hypothesis tests are the same object seen in two directions. If for every candidate value ψ0\psi_0 of a parameter there is a test of H0:ψ=ψ0H_0: \psi = \psi_0 at level α\alpha, then the set of values that the tests do not reject, after the data are seen, covers the true value with probability at least 1−α1 - \alpha. Conversely, a confidence set of level 1−α1 - \alpha gives, for every ψ0\psi_0, a level-α\alpha test: reject when ψ0\psi_0 is not in the set. Most intervals in this area are built this way, and the shape of the set, its coverage and its optimality are inherited from the tests.

Statement

Let XX take values in a sample space X\mathcal X with law PθP_\theta, θ∈Θ\theta \in \Theta, and let ψ=g(θ)\psi = g(\theta) be the parameter of interest, with values in a set Ψ\Psi. The rest of θ\theta is a nuisance parameter. For ψ0∈Ψ\psi_0 \in \Psi write Θψ0={θ:g(θ)=ψ0}\Theta_{\psi_0} = \{\theta : g(\theta) = \psi_0\} for the null set of H0:ψ=ψ0H_0: \psi = \psi_0.

A level-α\alpha acceptance region for ψ0\psi_0 is a measurable set A(ψ0)⊆XA(\psi_0) \subseteq \mathcal X with

Pθ(X∈A(ψ0))≥1−αfor every θ∈Θψ0,P_\theta(X \in A(\psi_0)) \ge 1 - \alpha \quad \text{for every } \theta \in \Theta_{\psi_0},

so that the test "reject H0H_0 when X∉A(ψ0)X \notin A(\psi_0)" has size at most α\alpha. A confidence set of level 1−α1 - \alpha is a map x↦C(x)⊆Ψx \mapsto C(x) \subseteq \Psi, with {x:ψ0∈C(x)}\{x : \psi_0 \in C(x)\} measurable for each ψ0\psi_0, such that

Pθ(g(θ)∈C(X))≥1−αfor every θ∈Θ.P_\theta(g(\theta) \in C(X)) \ge 1 - \alpha \quad \text{for every } \theta \in \Theta.

Theorem.

  1. Tests to sets. If A(ψ0)A(\psi_0) is a level-α\alpha acceptance region for each ψ0∈Ψ\psi_0 \in \Psi, then C(x)={ψ0∈Ψ:x∈A(ψ0)}C(x) = \{\psi_0 \in \Psi : x \in A(\psi_0)\} is a confidence set of level 1−α1 - \alpha.
  2. Sets to tests. If CC is a confidence set of level 1−α1 - \alpha, then A(ψ0)={x:ψ0∈C(x)}A(\psi_0) = \{x : \psi_0 \in C(x)\} is a level-α\alpha acceptance region for each ψ0\psi_0.
  3. Exact correspondence. The two maps are inverse to each other, and under them
inf⁡θ∈Θψ0Pθ(X∈A(ψ0))=inf⁡θ∈Θψ0Pθ(ψ0∈C(X)).\inf_{\theta \in \Theta_{\psi_0}} P_\theta(X \in A(\psi_0)) = \inf_{\theta \in \Theta_{\psi_0}} P_\theta(\psi_0 \in C(X)).

So the confidence coefficient inf⁡θPθ(g(θ)∈C(X))\inf_\theta P_\theta(g(\theta) \in C(X)) equals 1−sup⁡ψ0size(ψ0)1 - \sup_{\psi_0} \text{size}(\psi_0). In particular, if every test has size exactly α\alpha, the coverage is exactly 1−α1 - \alpha at its worst θ\theta. Conversely, a confidence coefficient of exactly 1−α1 - \alpha only means that the largest size, sup⁡ψ0size(ψ0)\sup_{\psi_0} \text{size}(\psi_0), equals α\alpha; every test has size exactly α\alpha when the infimum of the coverage over each Θψ0\Theta_{\psi_0} is 1−α1 - \alpha. 4. Optimality carries over. Let A∗(ψ)A^*(\psi) be a level-α\alpha acceptance region for every ψ∈Ψ\psi \in \Psi, with dual set C∗C^*. Let ψ′≠ψ0\psi' \neq \psi_0, and fix θ\theta with g(θ)=ψ0g(\theta) = \psi_0. Suppose the region A∗(ψ′)A^*(\psi') maximizes Pθ(X∉A(ψ′))P_\theta(X \notin A(\psi')) among all level-α\alpha acceptance regions A(ψ′)A(\psi') for ψ′\psi'. Then C∗C^* has level 1−α1 - \alpha and minimizes Pθ(ψ′∈C(X))P_\theta(\psi' \in C(X)), the probability of covering the false value ψ′\psi', among all confidence sets of level 1−α1 - \alpha. 5. p-values. If p(x;ψ0)p(x; \psi_0) is a valid p-value for each ψ0\psi_0, that is Pθ(p(X;ψ0)≤u)≤uP_\theta(p(X; \psi_0) \le u) \le u for u∈[0,1]u \in [0, 1] and θ∈Θψ0\theta \in \Theta_{\psi_0}, then C(x)={ψ0:p(x;ψ0)>α}C(x) = \{\psi_0 : p(x; \psi_0) > \alpha\} is a confidence set of level 1−α1 - \alpha for every α\alpha at once.

In plain words

Fix the data. Go through every value the parameter could have and ask the test "would you reject this value?". Keep the values that survive. Before the data are seen, the true value survives with probability at least 1−α1 - \alpha, because surviving is exactly the event that the test for the true value accepts. So the coverage of the set is the acceptance probability of one test, the one at the truth, and nothing else is needed. Read the other way, a confidence set is a test for every value at once: a value outside the set is rejected.

Proof

Part 1. Fix θ∈Θ\theta \in \Theta and put ψ0=g(θ)\psi_0 = g(\theta), so θ∈Θψ0\theta \in \Theta_{\psi_0}. By the definition of CC, for every xx,

g(θ)∈C(x)  ⟺  ψ0∈C(x)  ⟺  x∈A(ψ0).g(\theta) \in C(x) \iff \psi_0 \in C(x) \iff x \in A(\psi_0).

So the events {g(θ)∈C(X)}\{g(\theta) \in C(X)\} and {X∈A(ψ0)}\{X \in A(\psi_0)\} are the same event, and

Pθ(g(θ)∈C(X))=Pθ(X∈A(ψ0))≥1−α,P_\theta(g(\theta) \in C(X)) = P_\theta(X \in A(\psi_0)) \ge 1 - \alpha,

where the inequality is the level of the test for ψ0\psi_0, used at a θ\theta in its null set. Measurability of {x:ψ0∈C(x)}=A(ψ0)\{x : \psi_0 \in C(x)\} = A(\psi_0) holds by assumption. Since θ\theta was arbitrary, CC has level 1−α1 - \alpha. □\square

Part 2. Fix ψ0\psi_0 and θ∈Θψ0\theta \in \Theta_{\psi_0}. Then g(θ)=ψ0g(\theta) = \psi_0, and X∈A(ψ0)X \in A(\psi_0) if and only if ψ0∈C(X)\psi_0 \in C(X), that is, if and only if g(θ)∈C(X)g(\theta) \in C(X). So

Pθ(X∈A(ψ0))=Pθ(g(θ)∈C(X))≥1−α,P_\theta(X \in A(\psi_0)) = P_\theta(g(\theta) \in C(X)) \ge 1 - \alpha,

by the level of CC at this θ\theta. The set A(ψ0)A(\psi_0) is measurable by the assumption on CC. □\square

Part 3. Starting from a family AA, forming CC and then forming the regions of CC gives {x:ψ0∈C(x)}={x:x∈A(ψ0)}=A(ψ0)\{x : \psi_0 \in C(x)\} = \{x : x \in A(\psi_0)\} = A(\psi_0). Starting from CC gives {ψ0:x∈A(ψ0)}={ψ0:ψ0∈C(x)}=C(x)\{\psi_0 : x \in A(\psi_0)\} = \{\psi_0 : \psi_0 \in C(x)\} = C(x). So the maps are inverse to each other. The proof of Part 1 showed that Pθ(X∈A(ψ0))=Pθ(ψ0∈C(X))P_\theta(X \in A(\psi_0)) = P_\theta(\psi_0 \in C(X)) for every θ∈Θψ0\theta \in \Theta_{\psi_0}, as an equality of probabilities of one event. Taking the infimum over θ∈Θψ0\theta \in \Theta_{\psi_0} gives the displayed equality. Because the sets Θψ0\Theta_{\psi_0}, ψ0∈Ψ\psi_0 \in \Psi, partition Θ\Theta,

inf⁡θ∈ΘPθ(g(θ)∈C(X))=inf⁡ψ0inf⁡θ∈Θψ0Pθ(X∈A(ψ0))=1−sup⁡ψ0sup⁡θ∈Θψ0Pθ(X∉A(ψ0)),\inf_{\theta \in \Theta} P_\theta(g(\theta) \in C(X)) = \inf_{\psi_0} \inf_{\theta \in \Theta_{\psi_0}} P_\theta(X \in A(\psi_0)) = 1 - \sup_{\psi_0} \sup_{\theta \in \Theta_{\psi_0}} P_\theta(X \notin A(\psi_0)),

and the inner supremum is the size of the test for ψ0\psi_0. □\square

Part 4. Let CC be any confidence set of level 1−α1 - \alpha, and let A(ψ′)={x:ψ′∈C(x)}A(\psi') = \{x : \psi' \in C(x)\}. By Part 2 this is a level-α\alpha acceptance region for ψ′\psi'. By the optimality of A∗(ψ′)A^*(\psi') at θ\theta,

Pθ(X∉A∗(ψ′))≥Pθ(X∉A(ψ′)),soPθ(X∈A∗(ψ′))≤Pθ(X∈A(ψ′)).P_\theta(X \notin A^*(\psi')) \ge P_\theta(X \notin A(\psi')), \quad\text{so}\quad P_\theta(X \in A^*(\psi')) \le P_\theta(X \in A(\psi')).

By the definitions of the dual sets, the left side is Pθ(ψ′∈C∗(X))P_\theta(\psi' \in C^*(X)) and the right side is Pθ(ψ′∈C(X))P_\theta(\psi' \in C(X)). C∗C^* itself has level 1−α1 - \alpha by Part 1, because every A∗(ψ)A^*(\psi) has level α\alpha. □\square

Part 5. Put A(ψ0)={x:p(x;ψ0)>α}A(\psi_0) = \{x : p(x; \psi_0) > \alpha\}. For θ∈Θψ0\theta \in \Theta_{\psi_0}, Pθ(X∉A(ψ0))=Pθ(p(X;ψ0)≤α)≤αP_\theta(X \notin A(\psi_0)) = P_\theta(p(X; \psi_0) \le \alpha) \le \alpha, so A(ψ0)A(\psi_0) is a level-α\alpha acceptance region, and Part 1 applies for each α\alpha. □\square

The proof uses no property of Ψ\Psi and no continuity. In particular it holds for discrete data, vector parameters and nuisance parameters, and it says nothing about the shape of C(x)C(x).

Consequences

  • Named intervals are inverted tests. The t interval is the set of μ0\mu_0 that the two-sided t-test accepts. The Clopper-Pearson interval is the set of p0p_0 for which both one-sided exact binomial tests have p-value above α/2\alpha/2; for x=3x = 3, n=10n = 10 and α=0.05\alpha = 0.05 it is (0.06674,0.65245)(0.06674, 0.65245). The Wilson interval inverts the score test and gives (0.10779,0.60322)(0.10779, 0.60322) for the same data. Fieller's theorem inverts a t-test for a ratio. Every pivotal quantity gives a family of tests and so fits the same scheme.
  • Coverage is inherited from size. By Part 3, a conservative test gives a conservative set and an exact test an exact one. The Clopper-Pearson interval has coverage strictly above 1−α1 - \alpha at every pp, because the binomial tail tests it inverts are not randomized and accept the true pp with probability above 1−α1 - \alpha. A test that only holds its level asymptotically, such as the Wald test or the score test, gives a set whose coverage is only asymptotic.
  • Uniformly most accurate bounds. By Part 4, inverting the uniformly most powerful one-sided tests of a monotone likelihood ratio family (from the Karlin-Rubin theorem) gives a lower confidence bound that is least likely, among all lower bounds of the same level, to lie below any given false value. Unbiased tests give unbiased confidence sets in the same way: if every test rejects each alternative with probability at least α\alpha, then every false value is covered with probability at most 1−α1 - \alpha.
  • Reporting. Since C(x)C(x) holds every value that the tests accept, a confidence set reports the result of a test for every null value at once. A test of ψ0\psi_0 rejects at level α\alpha exactly when ψ0∉C(x)\psi_0 \notin C(x), which is the reading used in the z-test and t-test pages.

Tightness

  • The set need not be an interval. The theorem gives a set, not an interval. Inverting the two-sided binomial test with the "minimum likelihood" p-value (the default of the binomial test page) for x=1x = 1, n=30n = 30 and α=0.05\alpha = 0.05 gives, on a grid of step 5×10−65 \times 10^{-6}, the acceptance set
(0.00171,0.16323)∪(0.17506,0.17723),(0.00171, 0.16323) \cup (0.17506, 0.17723),

with p-values 0.04910.0491 at p0=0.17p_0 = 0.17 and 0.05030.0503 at p0=0.176p_0 = 0.176. The cause is that this p-value is not monotone in p0p_0 above x/nx/n. The doubled-tail test gives the interval (0.00084,0.17217)(0.00084, 0.17217) instead. Fieller's set can be two rays or the whole line. An interval is guaranteed when, for each xx, the acceptance set in ψ0\psi_0 is convex, for example when the p-value is unimodal in ψ0\psi_0.

  • One test is not enough. The set needs a level-α\alpha test for every ψ0\psi_0. A test of a single null value says nothing about the other values.
  • Coverage is marginal. The probability 1−α1 - \alpha is over repeated samples at a fixed θ\theta. After the data are seen, ψ∈C(x)\psi \in C(x) is true or false, and the theorem gives no probability for it. With nuisance parameters, the guarantee is the infimum over the null set, so the coverage can be well above 1−α1 - \alpha at most θ\theta.
  • The inequality in Part 1 can be strict everywhere. For a discrete XX without randomization the tests cannot have size exactly α\alpha, and the coverage then exceeds 1−α1 - \alpha for every θ\theta. Randomized tests ϕ(x,ψ0)∈[0,1]\phi(x, \psi_0) \in [0, 1] correspond in the same way to randomized sets, with P(ψ0∈C(x))=1−ϕ(x,ψ0)P(\psi_0 \in C(x)) = 1 - \phi(x, \psi_0), and can make both exact; the proof is the same with probabilities of events replaced by expectations of 1−ϕ1 - \phi.
  • The family must be fixed before the data. If the test for each ψ0\psi_0 is chosen after looking at xx, the events in Part 1 are no longer the acceptance events of fixed tests, and the bound fails.

History

Clopper and Pearson (1934) built their binomial interval from the two tails of the test, and Neyman (1937) gave the general construction of confidence intervals from regions of acceptance, one region for each parameter value, in the paper that set out the theory of confidence intervals. The statement as a correspondence between families of tests and confidence sets, with the transfer of optimality, is the form given in Lehmann's book on testing (first edition 1959); the third edition with Romano has it in Section 3.5 and Chapter 5. Sterne (1954) proposed the minimum-likelihood binomial test, whose inversion gives the non-interval sets shown above.

References

  1. E. L. Lehmann and Joseph P. Romano, Testing Statistical Hypotheses, third edition, Springer, 2005, Section 3.5 (confidence bounds, with uniformly most accurate bounds) and Chapter 5 (confidence intervals and families of tests)
  2. George Casella and Roger L. Berger, Statistical Inference, second edition, Duxbury, 2002, Section 9.2.1 (inverting a test statistic) and Section 9.3 (methods of evaluating interval estimators)
  3. Jerzy Neyman, Outline of a theory of statistical estimation based on the classical theory of probability, Philosophical Transactions of the Royal Society A 236, 1937, pp. 333 to 380 (confidence intervals from regions of acceptance)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/F421N6/text.yaml