\(p\)-Values &
Test Inversion
Understand how p-values connect hypothesis tests to confidence sets through the elegant duality of test inversion.
What Is a \(p\)-Value?
Given a test statistic \( T(X) \) and observed value \( T(x) \), the p-value is the probability, computed under the null hypothesis \( H_0 \), of observing a test statistic at least as extreme as \( T(x) \):
The p-value is not the probability that \( H_0 \) is true. It is a random variable that measures the compatibility of the observed data with the null model. Smaller values indicate stronger evidence against \( H_0 \).
The \(p\)-Value Distribution
Anatomy of a Hypothesis Test
The Duality Between Tests and Confidence Sets
The Test Inversion Theorem
Proof sketch: Fix any true \(\theta^\star\). Then \(\theta^\star \in C(X)\) iff \(X \in A(\theta^\star)\). Since \(A(\theta^\star)\) is the acceptance region of a level-\(\alpha\) test, we have \(P_{\theta^\star}(X \in A(\theta^\star)) \geq 1 - \alpha\).
\(p\)-Value Formulation
Since we reject \( H_0{:}\;\theta = \theta_0 \) whenever \( p(\theta_0) \leq \alpha \), the inverted confidence set can be written purely in terms of p-values:
This is powerful: compute the p-value as a function of \(\theta_0\), then the confidence set is the superlevel set of that function at height \(\alpha\). No separate construction needed.
Pivotal vs. Non-Pivotal Inversion
| Pivotal Quantity | Direct Inversion | |
|---|---|---|
| Requirement | Distribution of \(Q(X,\theta)\) is free of \(\theta\) | Only need a valid level-\(\alpha\) test for each \(\theta_0\) |
| p-value | Exact, from known CDF of pivot | May require asymptotic or simulation-based computation |
| Resulting CI | Typically a closed-form interval | May be a general set (not necessarily an interval) |
| Example | \(\frac{\bar{X}-\mu}{S/\sqrt{n}} \sim t_{n-1}\) | Likelihood ratio test for non-regular models |
Visualizing \(p(\theta_0)\) as a Function
How to Apply Test Inversion
Example 1: Normal Mean
Let \(X_1, \ldots, X_n \stackrel{\text{iid}}{\sim} N(\mu, \sigma^2)\) with \(\sigma^2\) known. Test \(H_0{:}\;\mu = \mu_0\) using the z-test:
Example 2: Likelihood Ratio Inversion
For a general parametric model, use the likelihood ratio test. The LRT statistic for \(H_0{:}\;\theta = \theta_0\) is:
The p-value is \(p(\theta_0) = P(\chi^2_k \geq \Lambda(\theta_0))\). The inverted confidence set is:
Example 3: LRT Contour Visualization
Why Test Inversion Matters
Common Mistakes
Summary: Three Inverted Tests
| Wald Test | Score Test | LRT | |
|---|---|---|---|
| Statistic | \(\frac{(\hat\theta - \theta_0)^2}{I(\hat\theta)^{-1}}\) | \(\frac{U(\theta_0)^2}{I(\theta_0)}\) | \(-2\log\frac{L(\theta_0)}{L(\hat\theta)}\) |
| Null dist. | \(\chi^2_1\) | \(\chi^2_1\) | \(\chi^2_1\) |
| CI shape | Symmetric around \(\hat\theta\) | Centered at \(\hat\theta\) (approx.) | Contour of \(\ell(\theta)\) |
| Advantage | Simplest computation | Evaluated only at \(\theta_0\); no MLE needed | Transformation-invariant |
| Weakness | Not invariant to reparametrization | May not be an interval | Requires full MLE |
Question 1 of 5
Under \(H_0\), a valid p-value for a continuous test statistic has which distribution?
Question 2 of 5
In test inversion, a \(1{-}\alpha\) confidence set \(C(\mathbf{x})\) consists of all parameter values \(\theta_0\) such that:
Question 3 of 5
You invert a two-sided z-test of \(H_0{:}\;\mu=\mu_0\) for normal data with known \(\sigma\). The resulting confidence interval is:
Question 4 of 5
Which statement about confidence sets obtained by test inversion is true?
Question 5 of 5
The LRT-based confidence set \(\{\theta_0 : \Lambda(\theta_0) \leq \chi^2_{k,\alpha}\}\) is equivalent to: