Week 4 — Confidence-test duality, pivots, and exact procedures

Where this week starts

Weeks 2 and 3 built tests and asked how well they perform. A test settles one question at a time: is this value of θ\theta consistent with the data at level α\alpha? What a reader of a scientific report wants instead is the whole collection of values that survive, and whether it reaches past whatever value the argument turns on. You already own the machinery for that. A confidence set is not a second theory bolted on beside testing; it is one family of tests, run at every candidate value at once and reported by listing which candidates survived.

Week 3 left something this reframing settles. Karlin-Rubin gave a uniformly most powerful one-sided test under monotone likelihood ratio, and the two-sided normal-mean problem had no such test at all. Both facts transfer intact, because an interval inherits the optimality of the tests you invert: the one-sided case yields a best interval and the two-sided case does not, for the same reason it failed there.

The week’s second job is to take the word exact seriously. In the normal model with unknown variance you can build an interval whose coverage is 0.950.95 for every mean and variance at every sample size. In a binomial model you cannot, because a non-randomized test’s size moves in jumps, and the best guarantee available is that coverage is at least nominal. What should feel different by the end is your reading of “a 95 percent confidence interval”: you should hear a claim about a procedure over repetitions, name the family of tests it inverts, and be able to compute its actual coverage.

Why this matters beyond the theorem

Here is the stake, in the smallest honest example available. Ten units go on a reliability test and three fail. The reflex procedure reports 0.30.3 plus or minus 1.961.96 estimated standard errors, the interval from 0.0160.016 to 0.5840.584. Run that procedure across all values of the true failure probability at twenty units and its actual coverage averages 0.8980.898, sinking to 0.6390.639 where the failure probability is small — precisely where a reliability study lives. Had zero units failed, the same recipe would return the interval from 00 to 00: certainty that the failure probability is exactly zero, from ten observations.

The opposite failure is quieter. The exact binomial interval never undercovers, but at ten trials its coverage averages 0.9840.984, so it is wider than the advertised level requires and the test it inverts has less power than level 0.050.05 entitles it to. Both failures share one missing habit: quoting a nominal level without asking what the procedure actually does.

What you will be able to do

  • State and prove the duality between a family of level-α\alpha acceptance regions and a 1α1 - \alpha confidence set, and name every condition the proof uses.
  • Construct a confidence set by inverting a stated test family, showing the algebra that turns the acceptance inequality into endpoints, and say what makes the set an interval.
  • Verify that a proposed quantity is pivotal, and explain why a pivot permits exact inversion while an approximate pivot does not.
  • Derive the exact interval for a binomial proportion by inverting exact tests, and compute its actual coverage by enumeration rather than simulation.
  • Diagnose whether a procedure is conservative, anti-conservative, or calibrated, and say what each behaviour costs.
  • Distinguish coverage as a repeated-sampling property from the decision a single realized interval supports.

Terms and notation worth fixing

Symbol or term What it means on this page
A(θ0)A(\theta_0) Acceptance region: the data values for which the test of H0:θ=θ0H_0 : \theta = \theta_0 does not reject
C(x)C(x) Confidence set, a subset of Θ\Theta determined by the data value xx and random only through xx
Coverage at θ\theta Pθ{θC(X)}P_\theta\{\theta \in C(X)\}, the chance under θ\theta that the random set contains that same θ\theta
Nominal, actual Nominal is the coverage requested; actual is what the procedure delivers
Conservative Actual coverage at least nominal everywhere; anti-conservative means below nominal somewhere
Q(X,θ)Q(X, \theta) A pivotal quantity: a function of data and parameter whose law is the same for every θ\theta
βθ(θ)\beta_{\theta'}(\theta) Power at θ\theta of the test whose null value is θ\theta'; the family is indexed by its null value

From acceptance regions to confidence sets

Fix a model {Pθ:θΘ}\{P_\theta : \theta \in \Theta\} and let XX be the data, in a sample space 𝒳\mathcal{X}. A map CC from 𝒳\mathcal{X} to subsets of Θ\Theta is a 1α1 - \alpha confidence set when Pθ{θC(X)}1αP_\theta\{\theta \in C(X)\} \ge 1 - \alpha for every θΘ\theta \in \Theta. Read that slowly: θ\theta appears three times and is a fixed constant in all three, the only random object is C(X)C(X), and the requirement is imposed at each θ\theta separately, so it is a family of statements.

The correspondence, stated and proved

Theorem (duality). Suppose for every θ0Θ\theta_0 \in \Theta a set A(θ0)𝒳A(\theta_0) \subseteq \mathcal{X} satisfies Pθ0{XA(θ0)}1αP_{\theta_0}\{X \in A(\theta_0)\} \ge 1 - \alpha, so the non-randomized test rejecting H0:θ=θ0H_0 : \theta = \theta_0 when XA(θ0)X \notin A(\theta_0) has level α\alpha. Define C(x)={θΘ:xA(θ)}. C(x) = \{\theta \in \Theta : x \in A(\theta)\} . Then CC is a 1α1 - \alpha confidence set. Conversely, if CC has coverage at least 1α1 - \alpha and A(θ0)={x:θ0C(x)}A(\theta_0) = \{x : \theta_0 \in C(x)\}, then rejecting when XA(θ0)X \notin A(\theta_0) is a level-α\alpha test of H0:θ=θ0H_0 : \theta = \theta_0.

Working. Fix any θ\theta and compare two subsets of 𝒳\mathcal{X}: {x:θC(x)}={x:xA(θ)}=A(θ). \{x : \theta \in C(x)\} = \{x : x \in A(\theta)\} = A(\theta) . The first equality is the definition of CC read backwards: membership of θ\theta in C(x)C(x) was defined to mean membership of xx in A(θ)A(\theta). Identical events have identical probabilities, so Pθ{θC(X)}=Pθ{XA(θ)}1αP_\theta\{\theta \in C(X)\} = P_\theta\{X \in A(\theta)\} \ge 1 - \alpha, and θ\theta was arbitrary. The converse reverses the same two lines.

The proof is bookkeeping about one subset of 𝒳×Θ\mathcal{X} \times \Theta, namely S={(x,θ):xA(θ)}S = \{(x, \theta) : x \in A(\theta)\}: slice SS at fixed θ\theta for an acceptance region, at fixed xx for a confidence set.

A diagonal shaded band of accepted data-and-parameter pairs. A horizontal slice at mu equal to 22 runs from 19.69 to 24.31, and the vertical slice at the observed mean 24.6 runs from 22.29 to 26.91 and is the confidence interval.

One shaded set in the plane, sliced horizontally into acceptance regions and vertically into a confidence interval.

A short proof hides its conditions, so list them. A test must be supplied for every θ0\theta_0; one test gives one point, not an interval. The level requirement is evaluated at the null value itself, which is what makes the slice at θ\theta carry probability 1α1 - \alpha under PθP_\theta and not under some other measure. And the tests must be non-randomized, so A(θ0)A(\theta_0) is a genuine set. Nothing else enters, measurability aside: no independence, no identical distribution, no exponential family, no smoothness, no large sample size, no assumption about the shape of Θ\Theta.

The third condition repays attention, because Week 2 showed a discrete model often needs a randomized test to attain size α\alpha exactly. Such a test has no acceptance region — it rejects with probability φ(x)\varphi(x) strictly between zero and one at some xx — so what inverts is a random set depending on an auxiliary uniform draw, whose coverage holds only averaged over that draw. Almost nobody reports endpoints that depend on a coin flip, and that refusal is what makes exact discrete intervals conservative below.

One consequence imports Week 3 wholesale. For θθ\theta \ne \theta', Pθ{θC(X)}=Pθ{XA(θ)}=1βθ(θ), P_\theta\{\theta' \in C(X)\} = P_\theta\{X \in A(\theta')\} = 1 - \beta_{\theta'}(\theta) , so the probability of covering a false value is one minus the power of that value’s own test. Making a set rarely cover wrong values and making its tests powerful are one problem stated twice. Inverting uniformly most powerful tests therefore minimizes the probability of covering each false value, over the alternatives those tests are most powerful against — the uniformly most accurate set — and where Week 3 found no such test, there is no such set either, with unbiasedness the same repair.

Pivots, and why inversion is easy when you have one

Inversion is solvable in principle and unpleasant in practice: you must generally work out A(θ)A(\theta) separately for every θ\theta. A pivot collapses that to one calculation. A pivotal quantity is a function Q(X,θ)Q(X, \theta) of data and parameter whose distribution under PθP_\theta is the same for every θ\theta, nuisance components included. It is not a statistic — you cannot compute it without knowing θ\theta — and that is the point: it carries θ\theta inside it, so a probability statement about QQ rearranges into one about θ\theta.

Two panels. On the left, three normal curves for three parameter pairs sit at different centres with different widths. On the right the same three parameter pairs give one t curve, with the central area between minus 2.31 and 2.31 shaded.

Three parameter pairs give three different sampling distributions but one distribution for the t ratio.

The left panel shows the sampling distribution of X\bar{X} from nine normal observations under three parameter pairs: it moves and changes width, so no fixed cutoffs serve all of them. The right panel shows T=n(Xμ)/ST = \sqrt{n}(\bar{X} - \mu)/S under those same three pairs. All three curves are drawn there; you see one, because they coincide. That is why a single number, 2.3062.306, serves the whole family.

Such coincidences come from group structure. Write Xi=μ+σZiX_i = \mu + \sigma Z_i with Z1,,ZnZ_1, \dots, Z_n independent standard normal. Then Xμ=σZ\bar{X} - \mu = \sigma \bar{Z} and S=σSZS = \sigma S_Z, so T=nZ/SZT = \sqrt{n}\,\bar{Z}/S_Z, in which no parameter appears. The argument needs the location-scale form and the normality of ZZ, never the values of μ\mu and σ\sigma.

Given a pivot, choose q1q2q_1 \le q_2 with P{q1Qq2}=1αP\{q_1 \le Q \le q_2\} = 1 - \alpha under that common law. Then A(θ)={x:q1Q(x,θ)q2}A(\theta) = \{x : q_1 \le Q(x, \theta) \le q_2\} has probability exactly 1α1 - \alpha under every PθP_\theta, and duality hands you C(x)={θ:q1Q(x,θ)q2}C(x) = \{\theta : q_1 \le Q(x, \theta) \le q_2\}. Two choices stay open. The pair (q1,q2)(q_1, q_2) is not determined: equal tails give the shortest interval when the pivot’s density is symmetric and unimodal, and generally not otherwise — the chi-square pivot below is a case in point. And whether C(x)C(x) is an interval depends on θQ(x,θ)\theta \mapsto Q(x, \theta) being continuous and strictly monotone for each xx; when it is, the endpoints solve the two boundary equations, and when it is not, the set can be disconnected or unbounded. Fieller’s construction for a ratio of two normal means is the classical instance, where the set is sometimes the whole real line — an honest report that a small denominator leaves the ratio unconstrained.

What the correspondence does not promise

Duality is exact about level and silent about everything else. Four silences matter.

It does not promise that C(x)C(x) is an interval, is bounded, or is non-empty. An empty confidence set is not a contradiction: the requirement constrains how often the set misses the true θ\theta, so a procedure may return nothing for some data provided that happens with probability at most α\alpha under every θ\theta. Nor does it say anything about width or power — the family that never rejects has level α\alpha for any α\alpha and inverts to C(x)=ΘC(x) = \Theta, coverage one and no content.

It does not turn coverage into a statement about θ\theta: the probability lives on the data at a fixed parameter value and does not become a distribution over parameter values. And it preserves what the tests actually have, not what they were asked for. If discreteness forces true size 0.0210.021 when you asked for 0.050.05, the inverted set has coverage 0.9790.979. Duality is faithful; it was the family that was approximate.

Exactness in a discrete model and the price of it

That last point deserves an identity rather than a sentence. Let size(θ)\text{size}(\theta) be the actual rejection probability, under PθP_\theta, of the family member whose null value is θ\theta. Failing to cover θ\theta and rejecting that member are the same event, so coverage(θ)=1size(θ)for every θΘ. \text{coverage}(\theta) = 1 - \text{size}(\theta) \quad \text{for every } \theta \in \Theta . Everything Week 2 established about attainable sizes reappears here as coverage sitting above nominal.

Why a lattice-valued statistic cannot attain the level

Take XBinomial(n,θ0)X \sim \text{Binomial}(n, \theta_0) and a non-randomized test. Its rejection probability is a sum of finitely many binomial point masses, so as the critical count moves by one the size jumps by a whole mass rather than sliding. Hitting α\alpha exactly would be a coincidence. Make that concrete with n=10n = 10, θ0=0.5\theta_0 = 0.5, tested two-sidedly with equal tails. Under the null XX is symmetric about five and 210=10242^{10} = 1024, so the attainable two-sided sizes are 2P(X0)=21024=0.00195,2P(X1)=221024=0.02148,2P(X2)=1121024=0.10938, 2P(X \le 0) = \frac{2}{1024} = 0.00195, \qquad 2P(X \le 1) = \frac{22}{1024} = 0.02148, \qquad 2P(X \le 2) = \frac{112}{1024} = 0.10938 , using (100)=1\binom{10}{0} = 1, (101)=10\binom{10}{1} = 10, (102)=45\binom{10}{2} = 45. The largest not exceeding 0.050.05 is 0.021480.02148, so the level-0.050.05 test of θ=0.5\theta = 0.5 at ten trials really has size 0.0210.021, and by the identity the inverted interval covers 0.50.5 with probability 0.9790.979. A randomized test would close the gap exactly, rejecting at x=2x = 2 and x=8x = 8 with a probability chosen to reach 0.050.05, at the cost of endpoints depending on an auxiliary draw. Conservatism is what you pay for endpoints that are a function of the data alone.

What conservatism buys and what it costs

It buys a guarantee with no fine print: coverage at least 1α1 - \alpha at every θ\theta and every nn, with no approximation and no sample size below which the claim quietly fails. It costs width, and with it power.

Two stacked coverage panels for twenty trials. The exact interval oscillates between 0.958 and one, above the dashed 0.95 line; the Wald interval sits mostly below it, averaging 0.898 and falling to 0.639 at small proportions.

Actual coverage of an exact and a Wald interval at twenty trials, against the true proportion.

Both curves come from enumerating all twenty-one outcomes at each θ\theta, so they carry no Monte Carlo error. Over true proportions from 0.050.05 to 0.950.95 the exact interval averages 0.9760.976 coverage and never drops below 0.9580.958, while the Wald interval averages 0.8980.898 and reaches down to 0.6390.639. Neither is the flat line at 0.950.95 that a nominal level suggests. A third construction sits between them: the score interval, obtained by inverting the score test, averages 0.9540.954 over that range with a low of 0.9170.917. It is far better calibrated than either and gives up the guarantee, dipping below 0.950.95 in places.

Two cautions before concluding that conservative means safe. At twenty trials and a true proportion of 0.30.3 the expected width is 0.4130.413 for the exact interval against 0.3640.364 for the score interval, so the guarantee costs about 0.050.05 of expected width and the dual test loses the matching power. And a procedure delivering 0.980.98 is not usable inside a calculation that assumes 0.950.95: wrong operating characteristics propagate whichever way they point.

Worked example — inverting the t test for a normal mean

The model and the question. A clinical laboratory measures a calibration standard nine times. Model the measurements as X1,,X9X_1, \dots, X_9 independent N(μ,σ2)N(\mu, \sigma^2) with both parameters unknown, and suppose the sample mean is x=24.6\bar{x} = 24.6 and the sample standard deviation is s=3.0s = 3.0; these numbers are illustrative. Which values of μ\mu are consistent with the data at level 0.050.05, reached by inversion rather than by quoting a formula?

Step 1, the family of tests. For each candidate μ0\mu_0 use T(μ0)=n(Xμ0)/ST(\mu_0) = \sqrt{n}(\bar{X} - \mu_0)/S and reject H0:μ=μ0H_0 : \mu = \mu_0 when |T(μ0)|>t8,0.975=2.306|T(\mu_0)| > t_{8, 0.975} = 2.306. That test needs three facts: independence and normality give XN(μ,σ2/n)\bar{X} \sim N(\mu, \sigma^2/n) exactly, (n1)S2/σ2χn12(n-1)S^2/\sigma^2 \sim \chi^2_{n-1} exactly, and X\bar{X} independent of S2S^2. Together they make T(μ0)T(\mu_0) a tt variable on n1=8n - 1 = 8 degrees of freedom under the null, and all three need normality, not merely finite variance.

Step 2, the level is exact and uniform. Because T(μ)T(\mu) is pivotal, Pμ,σ{|T(μ)|2.306}=0.95P_{\mu, \sigma}\{|T(\mu)| \le 2.306\} = 0.95 for every pair (μ,σ)(\mu, \sigma), so every member of the family has size exactly 0.050.05 and duality delivers coverage exactly 0.950.95, not merely at least.

Step 3, invert. The acceptance region for μ0\mu_0, and the set it inverts to, are A(μ0)={x:|n(xμ0)s|2.306},C(x)={μ:|xμ|2.306sn}. A(\mu_0) = \left\{ x : \left| \frac{\sqrt{n}(\bar{x} - \mu_0)}{s} \right| \le 2.306 \right\} , \qquad C(x) = \left\{ \mu : |\bar{x} - \mu| \le 2.306 \, \frac{s}{\sqrt{n}} \right\} . The set is an interval because μT(x,μ)\mu \mapsto T(x, \mu) is continuous and strictly decreasing, so |T|2.306|T| \le 2.306 carves out one connected stretch whose endpoints are where TT equals ±2.306\pm 2.306.

Step 4, the numbers. Here s/n=3.0/3=1.0s/\sqrt{n} = 3.0/3 = 1.0 exactly, so the half-width is 2.3062.306 and C(x)=(24.62.306,24.6+2.306)=(22.294,26.906). C(x) = (24.6 - 2.306,\; 24.6 + 2.306) = (22.294,\; 26.906) .

Step 5, interval and tests agree. They must, being one procedure, but look at how narrowly.

An interval from 22.29 to 26.91 on the mu axis with four null values marked, beside a table of t ratios 2.600, minus 0.400, minus 2.300 and minus 2.400 whose verdicts match whether each value lies inside the interval.

An interval, four candidate null values, and four test verdicts that match interval membership exactly.

At μ0=22\mu_0 = 22 the ratio is (24.622)/1.0=2.600(24.6 - 22)/1.0 = 2.600, exceeding 2.3062.306, so the test rejects and 2222 sits outside. At μ0=25\mu_0 = 25 the ratio is 0.400-0.400 and 2525 sits inside. The interesting pair is 26.926.9 and 27.027.0, with ratios 2.300-2.300 and 2.400-2.400: the first accepted, the second rejected, and the endpoint 26.90626.906 falls between them, as it must.

xbar <- 24.6; s <- 3.0; n <- 9
tcrit <- qt(0.975, df = n - 1)                 # 2.306004
xbar + c(-1, 1) * tcrit * s / sqrt(n)          # 22.294  26.906
abs((xbar - c(22, 25, 26.9, 27)) / (s / sqrt(n))) > tcrit

What this licenses, and what it does not. You may say the procedure producing (22.294,26.906)(22.294, 26.906) covers the true mean in 9595 percent of repetitions of this experiment, whatever μ\mu and σ\sigma are, and that every μ0\mu_0 outside those endpoints would have been rejected at level 0.050.05. You may not say the probability that μ\mu lies between 22.29422.294 and 26.90626.906 is 0.950.95: both endpoints and μ\mu are now numbers, and the statement is true or false. It does not hold 9595 percent of measurements either; a prediction interval for one future measurement is far wider. And the coverage is exactly 0.950.95 only under normality; with heavy-tailed measurement error at nine observations it is something else, which is Week 13’s subject.

The same reasoning, transferred

Change the model, keep the structure. Ten units in a reliability test have independent exponential lifetimes with rate λ\lambda, totalling xi=15.0\sum x_i = 15.0 time units. The pivot is Q=2λiXiQ = 2\lambda\sum_i X_i: each λXi\lambda X_i is exponential with rate one, the sum has the gamma law with shape ten and rate one, and doubling a gamma variable with shape kk and rate one gives a chi-square variable on 2k2k degrees of freedom, so Qχ202Q \sim \chi^2_{20} whatever λ\lambda is. With equal tails, χ20,0.0252=9.591\chi^2_{20, 0.025} = 9.591 and χ20,0.9752=34.170\chi^2_{20, 0.975} = 34.170, so C(x)={λ:9.5912λ(15.0)34.170}=(9.59130,34.17030)=(0.3197,1.139). C(x) = \{\lambda : 9.591 \le 2\lambda(15.0) \le 34.170\} = \left( \frac{9.591}{30}, \; \frac{34.170}{30} \right) = (0.3197, \; 1.139) .

What stayed the same: a pivot, a probability statement free of the parameter, and an inversion that yields an interval because λ2λxi\lambda \mapsto 2\lambda \sum x_i is continuous and strictly increasing. What changed is instructive: the chi-square law is skewed, so the interval is not symmetric about λ̂=10/15=0.667\hat\lambda = 10/15 = 0.667 — it reaches 0.3470.347 below and 0.4720.472 above — and equal tails no longer give the shortest interval. And because confidence sets are exactly equivariant under a monotone reparameterization, the interval for the mean lifetime μ=1/λ\mu = 1/\lambda comes from transforming the endpoints and swapping them, (1/1.139,1/0.3197)=(0.878,3.128)(1/1.139, 1/0.3197) = (0.878, 3.128), coverage still exactly 0.950.95. That equivariance is free here and is not free for the Wald intervals of Week 5.

Second worked example — the exact interval for a binomial proportion

The model and the question. Ten independent units go on test and three fail, so model the count as XBinomial(10,θ)X \sim \text{Binomial}(10, \theta) with θ\theta the failure probability. There is no pivot: XX is discrete and its law depends on θ\theta in a way no transformation removes. Inversion still works, value by value, but its coverage will be conservative rather than exact, and this example is about what that costs.

Step 1, the test family. For each candidate θ0\theta_0, reject H0:θ=θ0H_0 : \theta = \theta_0 when either tail probability at the observed count is small: Pθ0(Xx)0.025orPθ0(Xx)0.025. P_{\theta_0}(X \ge x) \le 0.025 \qquad \text{or} \qquad P_{\theta_0}(X \le x) \le 0.025 . The two conditions cannot both hold, since Pθ0(Xx)+Pθ0(Xx)1P_{\theta_0}(X \ge x) + P_{\theta_0}(X \le x) \ge 1, so the size is a sum of two disjoint tail probabilities each at most 0.0250.025 and the test has level 0.050.05 — with actual size usually strictly less, by the counting above.

Step 2, invert, and check the set is an interval. Duality gives C(x)={θ:Pθ(Xx)>0.025 and Pθ(Xx)>0.025}C(x) = \{\theta : P_\theta(X \ge x) > 0.025 \text{ and } P_\theta(X \le x) > 0.025\}. For fixed xx with 1xn1 \le x \le n the map θPθ(Xx)\theta \mapsto P_\theta(X \ge x) is continuous and strictly increasing on (0,1)(0,1), and for 0xn10 \le x \le n-1 the map θPθ(Xx)\theta \mapsto P_\theta(X \le x) is continuous and strictly decreasing. That monotonicity is Week 3’s monotone likelihood ratio structure reappearing; it makes C(x)C(x) an interval whose endpoints solve the two boundary equations.

Step 3, solve for the endpoints. With n=10n = 10 and x=3x = 3, k=310(10k)θLk(1θL)10k=0.025,k=03(10k)θUk(1θU)10k=0.025, \sum_{k=3}^{10} \binom{10}{k} \theta_L^k (1 - \theta_L)^{10-k} = 0.025 , \qquad \sum_{k=0}^{3} \binom{10}{k} \theta_U^k (1 - \theta_U)^{10-k} = 0.025 , solved numerically to give θL=0.0667\theta_L = 0.0667 and θU=0.6525\theta_U = 0.6525; substituting them back reproduces 0.0250.025. This construction is the Clopper-Pearson interval, and it is what binom.test reports in R. For comparison the Wald interval on the same data is (0.016,0.584)(0.016, 0.584) and the score interval is (0.108,0.603)(0.108, 0.603), of widths 0.5680.568 and 0.4950.495 against the exact interval’s 0.5860.586.

Step 4, the actual coverage. With eleven possible counts, coverage can be enumerated exactly: at a given θ\theta, add the binomial probabilities of the counts whose interval contains θ\theta.

A sawtooth coverage curve for ten trials that never dips below 0.961 and reaches 0.999, staying above the dashed nominal 0.95 line everywhere, averaging 0.984, with the value 0.979 marked at a proportion of one half.

Exact coverage of the exact binomial interval at ten trials, a sawtooth everywhere above nominal.

The curve never falls below nominal, averages 0.9840.984, and sits above 0.990.99 over wide stretches. The jumps are not noise — there is none here — but the moments when θ\theta crosses an endpoint of one of the eleven possible intervals, so an outcome joins or leaves the covering set at once. At θ=0.5\theta = 0.5 the coverage is 0.9790.979, matching the hand calculation above: 10.02148=0.978521 - 0.02148 = 0.97852.

Step 5, the degenerate case that makes the argument. Suppose zero of the ten units fail. The lower endpoint is 00 by convention and the upper solves (1θU)10=0.025(1 - \theta_U)^{10} = 0.025, giving θU=10.0251/10=0.3085\theta_U = 1 - 0.025^{1/10} = 0.3085. The Wald recipe returns 0±1.960×1/10=(0,0)0 \pm 1.96\sqrt{0 \times 1/10} = (0, 0), an interval of zero width asserting the failure probability is exactly zero. Inversion cannot do this, because a whole range of θ\theta makes zero failures unsurprising and it keeps every one of them.

What this licenses, and what it does not. You may report that the procedure covers the true failure probability with probability at least 0.950.95 at every θ\theta and every sample size, and that every θ0\theta_0 outside (0.0667,0.6525)(0.0667, 0.6525) would have been rejected by its exact test. You may not report the coverage as 0.950.95: at ten trials it averages 0.9840.984, and when methods are compared that difference is the comparison. Nor may you conclude much from three failures in ten units — an interval from 0.0670.067 to 0.6530.653 fits a very reliable process and a badly broken one alike.

The misreading to avoid

The misreading is one confident sentence: “the interval is (22.294,26.906)(22.294, 26.906), so there is a 9595 percent probability that μ\mu lies between 22.29422.294 and 26.90626.906 — and since the interval is exact, that probability is exact too.” The second clause makes matters worse: exactness is a property of long-run behaviour, and the sentence has left the procedure behind.

Take the arithmetic first. After the data are observed, 22.29422.294 and 26.90626.906 are numbers and μ\mu is a number, so 22.294<μ<26.90622.294 < \mu < 26.906 is true or false and its probability under PμP_\mu is one or zero. The 0.950.95 attached to the random set C(X)C(X) before the data arrived. Nothing here converts it into a probability about μ\mu; that needs a prior, and produces a posterior credible set, which Week 14 treats and which is not what was computed above.

The deeper objection is that the long-run figure need not describe your particular data. Let X1,X2X_1, X_2 be independent and uniform on (θ1/2,θ+1/2)(\theta - 1/2, \theta + 1/2), and report C(X)=[min(X1,X2),max(X1,X2)]C(X) = [\min(X_1, X_2), \max(X_1, X_2)]. Writing Xi=θ+UiX_i = \theta + U_i with UiU_i uniform on (1/2,1/2)(-1/2, 1/2), the interval covers θ\theta exactly when U1U_1 and U2U_2 have opposite signs, which has probability 1/21/2: a genuine 5050 percent confidence interval whose coverage statement is exactly true.

Now look at the data. Since |Xiθ|1/2|X_i - \theta| \le 1/2 always, you know max1/2θmin+1/2\max - 1/2 \le \theta \le \min + 1/2. If the observed spread R=|X1X2|R = |X_1 - X_2| is at least 1/21/2 then max1/2min\max - 1/2 \ge \min and min+1/2max\min + 1/2 \le \max, so θ\theta lies inside the reported interval with certainty; and R1/2R \ge 1/2 happens with probability 1/41/4, since RR has density 2(1r)2(1-r) on (0,1)(0,1). Conditionally on R=rR = r with r<1/2r < 1/2, the smaller of U1,U2U_1, U_2 is uniform on an interval of length 1r1 - r and the interval covers exactly when that minimum lands in a stretch of length rr, so the conditional coverage is r/(1r)r/(1-r), near zero when the observations nearly coincide. The average is honest, 01/2r1r2(1r)dr+1/212(1r)dr=1/4+1/4=1/2\int_0^{1/2} \frac{r}{1-r} 2(1-r)\, dr + \int_{1/2}^1 2(1-r)\, dr = 1/4 + 1/4 = 1/2, but half the time you should be far more confident than 5050 percent and half the time far less.

Two smaller misreadings travel with the large one. The first is that “conservative” means “careful”: it means actual coverage exceeding nominal, and the price is width, a weaker conclusion than the study paid for. The second is that an interval and a test can disagree on the same data. Two dual procedures cannot. If your software’s interval excludes a value its test does not reject, the two are not dual — they are computed on different scales or from different approximations, which is exactly the Wald behaviour Week 5 dissects.

Practice on your own

These are for self-checking, best attempted before the calibration lab rather than after.

  1. One-sided inversion. With X1,,XnX_1, \dots, X_n independent N(μ,σ02)N(\mu, \sigma_0^2) and σ0\sigma_0 known, invert the level-α\alpha tests of H0:μ=μ0H_0 : \mu = \mu_0 against H1:μ>μ0H_1 : \mu > \mu_0. Show the set is a half-line, state its coverage, and say why the one-sided and two-sided procedures give different endpoints at the same α\alpha.
  2. Optimality transfers. Prove Pθ{θC(X)}=1βθ(θ)P_\theta\{\theta' \in C(X)\} = 1 - \beta_{\theta'}(\theta) from the definitions, then argue that inverting uniformly most powerful one-sided tests minimizes the covering probability of every false value.
  3. Equal tails are not shortest. For the exponential model above, search numerically over pairs (q1,q2)(q_1, q_2) with P(q1χ202q2)=0.95P(q_1 \le \chi^2_{20} \le q_2) = 0.95 for the pair minimizing the width of the interval for λ\lambda. Report how much narrower it is, and explain why the gain is small.
  4. Coverage by enumeration. Compute the exact coverage of the exact, Wald, and score intervals for n=25n = 25 over a grid of θ\theta, starting from the code below. Report the minimum and average of each, and say which you would use for a study reporting a small proportion.
  5. Where inversion misbehaves. Construct a data value for which a set built by inverting a sensible test family is empty or unbounded, and explain why that does not violate the coverage guarantee. Fieller’s ratio problem is one route; a discrete conditional test is another.
exact_ends <- function(n, k) {
  c(if (k == 0) 0 else qbeta(0.025, k, n - k + 1),
    if (k == n) 1 else qbeta(0.975, k + 1, n - k))
}
cover_at <- function(n, theta, method) {
  ends <- vapply(0:n, function(k) method(n, k), numeric(2))
  sum(dbinom(0:n, n, theta)[ends[1, ] <= theta & theta <= ends[2, ]])
}
cover_at(10, 0.5, exact_ends)                 # 0.9785
mean(sapply(seq(0.05, 0.95, by = 0.001), cover_at, n = 25, method = exact_ends))

Where to read more

Where this goes next

Every exact procedure here depended on special structure: a location-scale family that produced a pivot, or a discrete model small enough to enumerate. Week 5 asks what to do when neither is available, and answers with three statistics built from the log-likelihood alone — likelihood ratio, score, and Wald. Two appear above in disguise: the score interval inverts the score test, and the Wald interval whose coverage sank to 0.6390.639 inverts an approximate pivot, which is precisely why its coverage is approximate.

Carry two habits forward. Ask what family of tests an interval inverts, because that names its assumptions; and ask what its actual coverage is at the sample size you have, because a nominal level is a request rather than a report. If a step went past you, repair the duality proof first and the coverage identity second, then use the notes overview for Week 2’s power function or Week 3’s monotone likelihood ratio argument.