Why Stratified Exact Inference Is Different
A collection of sparse two-by-two tables raises two related questions: how can evidence be combined across strata, and how can inference avoid requiring the strata to have the same baseline outcome risk? A conditional approach answers both questions by fixing the two margins within each stratum. The remaining random variation in each table then depends on its odds ratio, not on its own baseline risk.
The target here is a common odds ratio: the exposure-outcome association is assumed to be the same in every stratum, while the baseline odds may vary freely from stratum to stratum. Conditioning does not make the common-effect assumption unnecessary. Rather, it removes the nuisance baseline parameters under that model and leaves a finite conditional distribution for exact inference.
Stratum Tables and Their Conditional Distributions
For stratum \(i\), let \(n_i\) be the total number of individuals and let \(r_i\) be the number exposed. Let \(c_i\) be the number with the outcome, and let \(X_i\) be the number who are both exposed and have the outcome. The table is therefore
| Outcome | No outcome | Total | |
|---|---|---|---|
| Exposed | \(X_i\) | \(r_i-X_i\) | \(r_i\) |
| Unexposed | \(c_i-X_i\) | \(n_i-r_i-c_i+X_i\) | \(n_i-r_i\) |
| Total | \(c_i\) | \(n_i-c_i\) | \(n_i\) |
The possible values of \(X_i\) are the integers from \(\max(0,c_i-(n_i-r_i))\) to \(\min(r_i,c_i)\). When all four cells are positive, the stratum’s sample odds ratio is \(X_i(n_i-r_i-c_i+X_i)/\{(r_i-X_i)(c_i-X_i)\}\). In sparse tables, some cells may be zero, which is one reason to work with the full conditional distribution rather than relying on this ratio alone.
The form of this probability explains what conditioning accomplishes. For a fixed table margin, the number of arrangements with \(x\) exposed outcomes is \(\binom{r_i}{x}\binom{n_i-r_i}{c_i-x}\). The common odds ratio weights those arrangements by \(\psi^x\). The intercept \(\alpha_i\), which determines the baseline odds in stratum \(i\), does not appear in the conditional probability.
Worked Example: The Null Distribution in Two Sparse Strata
In stratum 1, suppose \(n_1=4\), \(r_1=2\), and \(c_1=2\). In stratum 2, suppose \(n_2=3\), \(r_2=1\), and \(c_2=1\). Find both conditional distributions under the null hypothesis \(\psi=1\).
In stratum 1, \(X_1\) can be 0, 1, or 2. The unnormalized probabilities are \(\binom{2}{x}\binom{2}{2-x}\), giving weights 1, 4, and 1. Their sum is 6, so \(P(X_1=0)=1/6\), \(P(X_1=1)=4/6\), and \(P(X_1=2)=1/6\).
In stratum 2, \(X_2\) can be 0 or 1. The weights are \(\binom{1}{0}\binom{2}{1}=2\) and \(\binom{1}{1}\binom{2}{0}=1\). Their sum is 3, so \(P(X_2=0)=2/3\) and \(P(X_2=1)=1/3\).
If the strata are independent, their conditional distributions are independent. For \(T=X_1+X_2\), convolution gives \(P(T=0)=\frac16\frac23=\frac{2}{18}\); \(P(T=1)=\frac46\frac23+\frac16\frac13=\frac{9}{18}\); \(P(T=2)=\frac16\frac23+\frac46\frac13=\frac{6}{18}\); and \(P(T=3)=\frac16\frac13=\frac{1}{18}\). The probabilities sum to \(18/18=1\). This combined distribution, not either table considered alone, is the null distribution for the pooled count.
Combining Strata Under a Common Odds Ratio
Assume the strata are independent and share \(\psi\). After conditioning on every stratum’s margins, the joint probability of a vector of counts \(x_1,\ldots,x_m\) is the product of the stratum-specific probabilities. Define \(T=\sum_{i=1}^m X_i\). The product has a factor \(\psi^{\sum_i x_i}=\psi^T\), so the distribution of \(T\) is obtained by convolving the stratum-specific conditional distributions. In practice, the distribution can be calculated by enumerating the finite supports or by multiplying their probability-generating polynomials.
Proof. Independence across strata gives a joint probability equal to the product of the conditional probabilities in the definition. The product of their denominators depends on the margins and \(\psi\), but not on the particular vector \(x_1,\ldots,x_m\). The numerator is the displayed product, with the \(\psi\) factors combining to \(\psi^T\). Now also condition on \(T=t\). Every possible vector in that conditional sample space has the same factor \(\psi^t\), so it cancels from the numerator and the normalizing sum. The resulting conditional distribution is independent of \(\psi\). \(\square
Thus, \(T\) carries the conditional information about the common log odds ratio \(\beta\), while conditioning further on \(T\) removes that parameter as well. For a test of a specified value \(\psi_0\), it is usually enough to calculate the distribution of \(T\) under \(\psi_0\). The theorem also clarifies the role of the common-effect assumption: a single factor \(\psi^T\) exists because the same \(\psi\) applies in every stratum.
Worked Example: Combining Strata at a Nonnull Odds Ratio
Use the margins in the preceding example, but evaluate the conditional distribution at \(\psi=2\). Calculate the distribution of \(T=X_1+X_2\).
For stratum 1, the weights are \(1,4(2),2^2\), or \(1,8,4\), with total 13. Thus the probabilities for \(X_1=0,1,2\) are \(1/13,8/13,4/13\). For stratum 2, the weights are \(2,2\), with total 4, so \(X_2=0\) and \(X_2=1\) each have probability \(1/2\).
Convolving gives \(P(T=0)=1/13\cdot1/2=1/26\); \(P(T=1)=8/13\cdot1/2+1/13\cdot1/2=9/26\); \(P(T=2)=4/13\cdot1/2+8/13\cdot1/2=12/26\); and \(P(T=3)=4/13\cdot1/2=4/26\). The probabilities sum to \(26/26=1\). Relative to the null distribution, probability shifts toward larger values of \(T\), as expected when the common odds ratio increases above 1.
Exact Tests and Their Calibration
For testing \(H_0:\psi=\psi_0\) against the one-sided alternative \(\psi>\psi_0\), use the upper-tail conditional p-value \(P_{\psi_0}(T\ge t_{\mathrm{obs}}\mid\text{all margins})\). For the alternative \(\psi<\psi_0\), use the lower tail. A two-sided test needs a stated convention for what counts as at least as extreme as the observed result; for example, one can use a probability-ordering rule based on the null probabilities of possible values of \(T\). Different conventions can give different discrete two-sided p-values, so the convention should be reported.
Proof. The support of \(T\) is finite. Because \(p(t)\) is nonincreasing in \(t\), the set of support values for which \(p(t)\le a\) is either empty or an upper segment beginning at some support value \(t_0\). In the latter case, \(P_{\psi_0}\{p(T)\le a\mid\text{margins}\}=P_{\psi_0}(T\ge t_0\mid\text{margins})=p(t_0)\le a\). For an empty set the probability is zero. This proves the conditional bound. Averaging that bound over the possible margins also gives an unconditional type I error no greater than \(a\), under the stated model. \(\square
The inequality may be strict because \(T\) is discrete: a tail probability may jump past the chosen significance level. This is not a failure of calibration; it is the reason a nonrandomized exact test can be conservative. Exact confidence sets for \(\psi\) can be obtained by inverting tests of \(H_0:\psi=\psi_0\) over candidate values of \(\psi_0\), with the chosen test convention held fixed.
Worked Example: A One-Sided Exact p-Value
Suppose the margins are those of the first example and the observed counts are \(X_1=1\) and \(X_2=1\), so \(T_{\mathrm{obs}}=2\). Test \(H_0:\psi=1\) against \(\psi>1\).
The null distribution already calculated is \(P(T=0,1,2,3)=(2,9,6,1)/18\). Therefore the inclusive upper-tail p-value is \(P(T\ge2\mid H_0)=P(T=2)+P(T=3)=6/18+1/18=7/18\), approximately 0.389. At significance level 0.05, this p-value does not lead to rejection. The calculation uses the combined conditional distribution and includes the observed value in the tail.
What Conditioning Does—and Does Not—Assume
Each stratum may have its own baseline odds because \(\alpha_i\) is unrestricted. Fixing the outcome total \(c_i\) within the stratum removes the part of the likelihood that depends on that intercept; fixing the exposure total \(r_i\) specifies the other margin used in the conditional sample space. No equality of baseline risks across strata is needed. But the conditional distributions are tied together through the shared \(\psi\), so this procedure does assume a common odds ratio.
A stratum with no exposure variation, \(r_i=0\) or \(r_i=n_i\), has only one possible value of \(X_i\). Its conditional distribution is a point mass, so it contributes nothing to distinguishing values of \(\psi\). More generally, a stratum whose margins allow only one possible overlap count has no conditional information about the common odds ratio. It may still be part of the dataset, but it does not change the conditional test statistic’s distribution.
Worked Example: Detecting a Stratum With No Conditional Information
Consider a stratum with \(n=4\), \(r=0\) exposed individuals, and \(c=2\) outcomes. The allowable overlap is only \(X=0\). Its unnormalized conditional weight is \(\binom{0}{0}\binom{4}{2}\psi^0=6\), so its normalized probability is 1 for every \(\psi>0\).
If this stratum is added to other independent strata, the combined statistic changes from \(T\) to \(T+0\), and its conditional distribution is unchanged. The stratum has a baseline outcome count, but because no one is exposed, its table cannot provide evidence about an exposure odds ratio.
Common Mistake
Wrong reasoning: “The strata have different baseline risks, so they cannot be combined in one exact odds-ratio test.” This confuses baseline risk with the exposure effect. Different stratum intercepts are permitted and are eliminated from each stratum’s conditional distribution by fixing its margins.
Correction: Combine the stratum-specific distributions when the tables are independent and the scientific model supports a common odds ratio. Do not combine them under a single common odds ratio merely because conditioning was used: conditioning removes the nuisance intercepts, but it does not establish that the odds ratios are identical. If the common-effect model is unsuitable, the single-\(T\) test no longer has the stated interpretation.
Check Your Understanding
Use the definitions and results above to answer these questions.
- For a stratum with \(n=6\), \(r=2\), and \(c=3\), list the possible values of \(X\).
- Explain why the stratum-specific intercept \(\alpha_i\) does not appear in the conditional distribution of \(X_i\).
- What assumptions allow the joint conditional distribution across strata to be formed as a product?
- Why does conditioning further on \(T=\sum_iX_i\) remove the common odds ratio from the distribution of the vector of table counts?
- Why can an exact upper-tail test have a type I error strictly below its nominal level?