Statistics & probability

Rosenbaum sensitivity bounds calculator for matched pair binary outcomes

Bound the exact one-sided binary matched-pair randomization p-value under a supplied Rosenbaum treatment-odds sensitivity factor.

Your numbers

Treated outcome higher than control for the declared one-sided alternative.
Treated outcome lower than control; concordant pairs do not enter this test.
At least 1; treatment-odds ratio bound within each matched pair, not outcome risk ratio.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Bound the exact one-sided binary matched-pair randomization p-value under a supplied Rosenbaum treatment-odds sensitivity factor.

THE FORMULAplow=1/(1+Γ); phigh=Γ/(1+Γ); Pbounds=P[Binomial(n,p)≥favorable] at plow and phigh.

A worked example

Eighteen favorable and six unfavorable discordant pairs have randomized one-sided p≈0.011328. At Γ=1.5, the exact lower and upper bounds are approximately 0.000540 and 0.095961.

Good to know

1–100000 discordant binary matched pairs; integer favorable/unfavorable counts, Γ∈[1,100]. Exact one-sided favorable upper-tail bounds. Concordant pairs excluded from this sign statistic. No continuous-outcome signed ranks, general matched sets, treatment-effect adjustment or causal certification.

Define the matched-pair question

A binary matched-pair sensitivity analysis asks how a one-sided randomization-test conclusion could change if matched individuals differ in their odds of receiving treatment because of an unobserved factor. Each informative pair has exactly one favorable binary outcome relative to treatment direction. Concordant pairs contribute no sign information to this particular test statistic.

Enter the number of discordant pairs where the treated outcome is higher as favorable, and the number where it is lower as unfavorable. This orientation defines the alternative before examining the p-value. It is not a two-sided procedure selected retrospectively to make the more convenient direction look strongest after the data have been inspected.

Hidden-bias allowance and exact tail boundsDefault 18 favorable, 6 unfavorable pairs00.3250.65123Treatment-odds factor ΓBlue: upper p boundGreen: lower p bound
Scroll across to see the full diagram.
The conservative upper bound increases as Gamma expands the allowed hidden treatment-assignment bias; it is about 0.095961 at Gamma1.5.

Compare this with the McNemar paired binary test calculator. Bound a paired sign-test result under a specified hidden treatment-odds bias Gamma; an ordinary paired test assumes no such bias.

Interpret the sensitivity factor Gamma

Gamma bounds the ratio of treatment odds for the two people within a matched pair after the observed matching variables have been held fixed. Gamma equal to one corresponds to equal treatment odds. Larger Gamma permits a hidden factor to make one member more likely to receive treatment, within the specified sensitivity model.

It is not a risk ratio for the outcome, an estimated effect size or a percentage of confounding. A value such as 1.5 does not mean the observed effect is reduced by fifty percent. It specifies a family of possible treatment-assignment biases against which the randomization-test probability is bounded, conditional on the matched-pair structure.

Construct exact one-sided bounds

Among n discordant pairs, the favorable count is compared with a binomial upper tail. Under equal treatment odds, the success probability is one half. Under the allowed hidden bias, the corresponding extremal success probabilities are one over one plus Gamma and Gamma over one plus Gamma, giving lower and upper p-value bounds.

Both tails include the observed favorable count: the event is at least as many favorable pairs, not strictly more. The upper bound is the conservative value when assessing whether a positive one-sided conclusion survives the specified hidden-bias allowance. The calculation is exact for this binary sign statistic within the stated model, without a normal approximation or continuity correction.

Check eighteen favorable and six unfavorable pairs

The default contains twenty-four discordant pairs, eighteen favoring the treated outcome and six favoring the control outcome. At Gamma one, the one-sided binomial tail is approximately 0.011328. This is the equal-odds randomization-test value for the declared direction, not a two-sided McNemar value obtained by doubling a tail automatically.

At Gamma 1.5, the success-probability range becomes 0.4 to 0.6. The lower p-value bound is approximately 0.000540 and the upper bound approximately 0.095961. Thus an argument using a 0.05 one-sided threshold would no longer be protected against every assignment mechanism allowed by this particular Gamma, even though the equal-odds p-value is smaller.

Read a sensitivity path rather than one threshold

Increasing Gamma expands the family of allowed treatment-assignment biases. For a fixed favorable count, the conservative upper tail cannot decrease as that family expands. The plotted example makes this progression visible and shows why the Gamma value should be reported alongside the bounds instead of presenting a single unexplained sensitivity p-value.

A threshold crossing can describe robustness under the selected model, but it does not estimate whether a hidden bias of that magnitude actually exists. Scientific knowledge about treatment assignment remains necessary. Nor does an apparently robust result eliminate other problems such as bad matching, outcome misclassification, selective reporting or interference between different pairs.

Reverse the alternative consistently

If lower treated outcomes are favorable in the substantive question, redefine favorable and unfavorable using that direction before calculation. Swapping those counts changes the one-sided tail being tested. Merely relabeling the displayed upper bound without changing the statistic would leave the mathematics tied to the original alternative and create a misleading interpretation.

Concordant pairs can be important for describing the study and estimating a treatment effect, even though they do not enter this discordant-pair sign calculation. Excluding them here is a property of the test, not permission to remove observations from every analysis. More general matched sets, continuous outcomes and signed-rank sensitivity statistics need their own formulas.

Use the bounds as a model-based diagnostic

The interface supports one to one hundred thousand discordant pairs and Gamma from one to one hundred. It evaluates binomial tails through a stable incomplete-beta calculation rather than factorials that would overflow for larger counts. Invalid counts, no discordant pairs and Gamma below one are rejected explicitly instead of yielding a false impression of evidence.

The output provides both bounds, the equal-odds tail and their success-probability endpoints. It does not adjust the treatment-effect estimate, identify a hidden variable or certify a causal conclusion. A useful report describes the matching design, outcome coding, declared alternative, Gamma and sensitivity-model assumptions together with the numerical bounds.

A few questions, answered

Is Gamma an outcome risk ratio?

No. Gamma bounds the treatment-odds ratio within a matched pair under a hidden-bias model. It does not estimate or rescale an outcome effect.

Which p-value bound is conservative?

For the declared positive one-sided alternative, use the upper p-value bound when asking whether a rejection survives every assignment bias allowed by Gamma.

Why are concordant pairs absent?

They provide no positive-versus-negative sign information for this binary discordant-pair statistic. Their exclusion here does not justify discarding them from effect estimation.

Does a small upper bound prove causality?

No. It describes robustness within one sensitivity model and cannot rule out bad matching, outcome errors, interference, selective reporting or other assumption failures.

Find your calculator

Start typing to explore the library.