Tutorials › Propensity Score Matching and Instrumental Variables › Stratified Tests for Matched Binary Outcomes

Rosenbaum Bounds and E-Values · Tutorial 337 of 699

Stratified Tests for Matched Binary Outcomes

Learn to calculate and interpret sensitivity bounds for matched-pair binary outcomes, and see how hidden bias changes the worst-case test result.

Advanced 10 min read

What You'll Learn

  • Identify which matched pairs contribute information to a binary-outcome test.
  • Construct the stratified statistic from discordant-pair outcomes.
  • Calculate an exact worst-case one-sided p-value at a specified Gamma.
  • Compare sensitivity bounds across different Gamma values.
  • Recognize assumptions, diagnostics, and common errors in matched-pair sensitivity tests.

Why Discordant Pairs Carry the Test

For a binary outcome, a matched pair can be concordant (both units have outcome 0 or both have outcome 1) or discordant (one has outcome 1 and the other has outcome 0). Under the sharp null of no treatment effect for any unit, each unit’s outcome would stay the same if its treatment assignment changed. The two units in a pair may nevertheless have different outcomes from one another. If their outcomes are concordant, switching which unit receives treatment does not change the pair’s treated outcome. If they are discordant, that assignment determines whether the treated unit has outcome 1. Thus, conditional on the outcomes in the pairs, the test is driven by the discordant pairs.

The test below is for matched pairs with one treated and one control unit in each pair. It tests a directional sharp null against the alternative that treatment increases the probability of outcome 1. This may be an adverse event or a beneficial outcome; the direction must be chosen to match the scientific question.

Definition: For discordant pair \(i\), let \(X_i=1\) if the treated unit has outcome 1 and the control unit has outcome 0, and let \(X_i=0\) if the treated unit has outcome 0 and the control unit has outcome 1. With \(m\) discordant pairs, define \(X=\sum_{i=1}^{m}X_i\) and \(x=\sum_{i=1}^{m}X_i\) as the observed number of discordant pairs favoring an increase under treatment. The signed statistic is \(T=2X-m\), the number favoring an increase minus the number favoring a decrease.

Concordant pairs are not counted in \(m\). They contribute zero to this conditional test statistic: given that both outcomes in a pair are equal under the null, either assignment produces the same treated outcome. The test therefore asks whether the observed allocation of treatment across discordant pairs is unusually favorable to an increase in outcome 1.

Assignment Bounds and the Worst-Case Test

The sensitivity parameter \(\Gamma\) bounds how different the treatment odds may be between the two members of a matched pair because of an unmeasured covariate. At \(\Gamma=1\), the odds are equal within every pair. At \(\Gamma>1\), treatment assignment may favor one member. Under the sharp null, the member with outcome 1 could be the one favored for treatment, making an increase in treated outcomes more likely.

Assumptions for the bound: There is one treated unit in each matched pair; the sharp null fixes each unit’s outcome regardless of treatment; the odds of treatment for the two units in any pair differ by at most a factor of \(\Gamma\); and assignments across pairs are independent conditional on the matched sets. These conditions imply that, for a discordant pair, the probability that the treated unit has outcome 1 is at most \(q_\Gamma=\Gamma/(1+\Gamma)\).

The bound on that probability follows by considering the assignment most favorable to the alternative. If the outcome-1 unit has treatment odds \(\Gamma\) times those of the outcome-0 unit, its probability of receiving treatment is \(\Gamma/(\Gamma+1)\). No assignment allowed by the sensitivity model can give a higher probability. At \(\Gamma=1\), this is \(1/2\); as \(\Gamma\) increases, the bound rises.

$$ P_\Gamma(X\ge x)\ \le\ P\{\operatorname{Binomial}(m,q_\Gamma)\ge x\}, \qquad q_\Gamma=\frac{\Gamma}{1+\Gamma}. $$

The right side is a valid upper bound on the one-sided p-value for the observed result. The actual assignment probabilities may differ across pairs, so \(X\) need not have a binomial distribution. It is a sum of independent Bernoulli variables with probabilities no greater than \(q_\Gamma\). To justify the bound, take independent \(U_i\sim\operatorname{Uniform}(0,1)\) and represent each discordant-pair indicator as \(X_i=1\) when \(U_i\le p_i\), where \(p_i\le q_\Gamma\). The indicators \(1\{U_i\le q_\Gamma\}\) then dominate \(X_i\) pair by pair. Their sum has a \(\operatorname{Binomial}(m,q_\Gamma)\) distribution, so its upper-tail probability is at least as large as the actual upper-tail probability. This gives a conservative worst-case test.

For the directional alternative of an increase, use the binomial upper tail. A small bound means that even the assignment most favorable to hidden bias would rarely produce at least \(x\) pairs favoring an increase under the sharp null. A large bound means the data do not rule out that null at the specified \(\Gamma\). The bound is not the probability that the null is true, nor the probability that a confounder exists.

For a two-sided analysis, specify the two-sided convention before examining results. One conservative option is to calculate the worst-case upper-tail bound for an increase and the corresponding worst-case lower-tail bound for a decrease, then report the smaller one-sided bound doubled and capped at 1. The examples here use a one-sided alternative so that the tail and its interpretation remain explicit.

Calculating the Stratified Statistic

Each matched pair is a stratum. Its contribution to \(X\) is 1 if it is discordant and the treated member has outcome 1, 0 if it is discordant in the opposite direction, and zero to the conditional test if it is concordant. Summing the discordant contributions gives \(x\), while the total number of discordant pairs gives \(m\). Under no hidden bias, \(X\) has the familiar conditional matched-pair distribution \(\operatorname{Binomial}(m,1/2)\). Sensitivity analysis replaces \(1/2\) with the larger worst-case probability \(q_\Gamma\).

Worked Example: Eight Discordant Pairs at Two Gamma Values

Suppose a hypothetical matched study has 12 pairs: 7 are discordant in the direction of an increase under treatment, 1 is discordant in the opposite direction, and 4 are concordant. Thus \(m=8\), \(x=7\), and \(T=7-1=6\). Test the one-sided sharp null at \(\Gamma=1\) and \(\Gamma=2\).

At \(\Gamma=1\), \(q_\Gamma=1/2\). The exact upper-tail probability is \(P\{\operatorname{Binomial}(8,0.5)\ge7\}\). The outcomes are 7 or 8 successes:

$$ \binom{8}{7}(0.5)^8+\binom{8}{8}(0.5)^8 =\frac{8+1}{256} =0.03516. $$

At the 0.05 level, this bound is small enough to reject the sharp null in the specified direction under equal assignment odds.

At \(\Gamma=2\), \(q_\Gamma=2/3\). The worst-case tail is

$$ \binom{8}{7}\left(\frac{2}{3}\right)^7\left(\frac{1}{3}\right) +\left(\frac{2}{3}\right)^8 =\frac{1024+256}{6561} =0.1951. $$

This larger bound does not reject the sharp null at the 0.05 level. The observed pairs have not changed; allowing more unequal assignment odds makes the result less compelling against the null.

Worked Example: Four Increases Among Six Discordant Pairs

In a second hypothetical study, six matched pairs are discordant: four favor an increase under treatment and two favor a decrease. All other matched pairs, if any, are concordant and excluded from this conditional calculation. Here \(m=6\), \(x=4\), and \(T=4-2=2\). Calculate the upper-tail bounds at \(\Gamma=1\) and \(\Gamma=1.5\).

At \(\Gamma=1\), the upper-tail bound is

$$ P\{\operatorname{Binomial}(6,0.5)\ge4\} =\frac{\binom{6}{4}+\binom{6}{5}+\binom{6}{6}}{2^6} =\frac{15+6+1}{64} =0.3438. $$

For \(\Gamma=1.5\), \(q_\Gamma=1.5/2.5=0.6\). The upper tail is

$$ \begin{aligned} P\{\operatorname{Binomial}(6,0.6)\ge4\} &=\binom{6}{4}(0.6)^4(0.4)^2 +\binom{6}{5}(0.6)^5(0.4) +(0.6)^6\\ &=0.31104+0.186624+0.046656\\ &=0.54432. \end{aligned} $$

Neither bound is small at the 0.05 level. The increase in the bound from 0.3438 to 0.5443 shows how the allowed hidden bias changes the reference distribution, even though the observed count remains four.

Worked Example: All Discordant Pairs Favor an Increase

A third hypothetical study has 12 matched pairs. Seven are concordant and five are discordant; all five discordant pairs favor an increase under treatment. Therefore \(m=x=5\), and the one-sided upper tail is the probability of five successes.

At \(\Gamma=1\), this is

$$ P\{\operatorname{Binomial}(5,0.5)\ge5\}=(0.5)^5=0.03125. $$

At \(\Gamma=1.5\), \(q_\Gamma=0.6\), giving

$$ P\{\operatorname{Binomial}(5,0.6)\ge5\}=(0.6)^5=0.07776. $$

The result is below 0.05 with equal assignment odds but not with the \(\Gamma=1.5\) bound. This comparison describes sensitivity of the test to the specified assignment-odds allowance; it does not estimate the size of a treatment effect.

Diagnostics, Comparisons, and Limitations

Before calculating a bound, verify that the data are organized as matched pairs with one treated unit and one control unit per pair, that the outcome is coded consistently, and that the direction of the alternative is stated. Count the two discordant directions separately and check that their sum equals \(m\). Concordant pairs should not be added to the binomial denominator. If \(m=0\), there is no discordant-pair information for this conditional test; the statistic cannot provide evidence in either direction.

The exact binomial tail is preferable to a normal approximation when the number of discordant pairs is small or the observed count is near 0 or \(m\). At \(\Gamma=1\), the test is the exact conditional matched-pair test often called McNemar’s exact test. A large-sample score or normal approximation can be useful for a rough check, but it may be inaccurate in small samples and does not replace the exact worst-case calculation. Unlike a test based on independent treatment and control proportions, this analysis conditions on the matched-pair structure and uses the within-pair discordances.

The sensitivity bound is conservative: it permits each discordant pair’s assignment probability to take the value most unfavorable to the null test, whether or not a single realistic unmeasured covariate would produce that pattern across all pairs. Its interpretation depends on the sharp null, the matched-pair assignment model, and the independence condition across pairs. It is not a bound on every causal estimand, such as an average treatment effect, and it does not correct measured confounding or poor matching. The analysis also cannot reveal whether an unmeasured confounder of a given strength is actually present.

Common pitfall: A frequent error is to count all matched pairs as Bernoulli trials, including pairs where both outcomes are the same. That changes the reference distribution and can make the test appear more informative than it is. For this conditional binary test, use only discordant pairs: \(m\) is the number discordant, and \(x\) is the number discordant pairs favoring the specified direction.

Check Your Understanding

Try each calculation before reading the solutions below.

  1. There are 7 discordant pairs, of which 6 favor an increase under treatment. Calculate the one-sided bound at \(\Gamma=1\).
  2. There are 4 discordant pairs, all favoring an increase. Calculate the bound at \(\Gamma=3\).
  3. There are 9 discordant pairs, of which 3 favor an increase. Calculate the bound at \(\Gamma=1\).
  4. Why are concordant pairs excluded from \(m\), and what does a large worst-case p-value mean?

Solutions. (1) At \(\Gamma=1\), \(q_\Gamma=0.5\), so \(P\{\operatorname{Binomial}(7,0.5)\ge6\}=(7+1)/128=0.06250\). (2) Here \(q_\Gamma=3/4\), and the upper tail is \((0.75)^4=0.3164\). (3) The bound is \(P\{\operatorname{Binomial}(9,0.5)\ge3\}=1-(1+9+36)/512=466/512=0.9102\). (4) In a concordant pair, either assignment gives the same treated outcome under the sharp null, so it contributes no information to this conditional statistic. A large worst-case p-value means the data do not reject the sharp null at the chosen level even under the specified sensitivity bound; it is not the probability that the null is true.

Clinical Biostats