Statistics & probability

Breslow Day odds ratio homogeneity calculator from stratified tables

Test whether independent stratified 2×2 tables support a common odds ratio using the Breslow–Day statistic and optional Tarone correction.

Your numbers

One stratum per row, table[[a, b],[c, d]]; independent strata with positive row and column margins.
Enter a finite value within the stated calculator bounds.

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

Test whether independent stratified 2×2 tables support a common odds ratio using the Breslow–Day statistic and optional Tarone correction.

THE FORMULAQBD=Σ(ai−Eθ[ai])²/Vi; QTarone=QBD−(Σresiduali)²/ΣVi.

A worked example

The three default strata have Mantel–Haenszel common odds ratio 2.3881748 and Tarone-adjusted statistic 3.6348507 on 2 df, p≈0.1624435.

Good to know

2–20 independent 2×2 strata, nonnegative integer cells≤100000, positive row/column margins and finite positive common odds estimate. Asymptotic chi-square test with fitted-cell variance; no exact sparse-table correction or claim that nonrejection establishes homogeneity.

Pooling and testing answer different questions

A pooled odds ratio summarizes several stratified two-by-two tables under a common-effect convention. A homogeneity test asks whether the observed stratum effects are compatible with that common value. A plausible pooled estimate does not by itself demonstrate that every stratum follows the same association.

Breslow–Day compares each observed upper-left cell with its fitted value under a common odds ratio while preserving that stratum's margins. The page uses the Mantel–Haenszel common estimate and offers an explicitly named Tarone adjustment. It does not calculate an exact conditional heterogeneity distribution for sparse data.

Observed and common-odds fitted cells123Blue: observed a · Green: common-odds fitted a
Scroll across to see the full diagram.
Each pair compares the upper-left count with its fitted value under the same common odds ratio.

Compare this with the Mantel Haenszel stratified odds ratio calculator. Test whether stratum odds ratios support one common effect, rather than report only their pooled odds ratio.

Keeping the cell orientation consistent

Enter each stratum as a, b, c, d for rows a-b and c-d. The same row and column meanings must apply to every stratum. Reversing a category in only one table inverts that stratum's odds ratio and can manufacture apparent heterogeneity from inconsistent coding.

Cells are nonnegative integer counts, and every row and column margin must be positive. Some individual zeros are accepted when the combined common estimate and fitted variances remain finite. A table with an empty marginal category provides no usable variation for the stated fitted-cell comparison and is rejected.

The three-stratum worked example

The default tables contain upper-left counts twelve, eighteen and eight. Their individual odds-ratio patterns differ, while the Mantel–Haenszel common value is approximately two-point-three-eight-eight-one-seven. The fitted expected upper-left cells are determined from that common value and each table's fixed margins.

The ordinary Breslow–Day sum is about three-point-six-three-seven-eight-one. Tarone subtracts a small common-estimation correction, giving about three-point-six-three-four-eight-five. With three strata, the chi-square reference has two degrees of freedom and produces a tail probability around zero-point-one-six-two-four-four.

Solving for the fitted cell

Within a stratum, row totals and column totals determine all four fitted cells once the upper-left count is known. Its feasible interval is bounded by nonnegative cell requirements. The common odds equation is monotone within that interval, allowing a bracketed solution without choosing an unstable quadratic branch.

The fitted variance is obtained from the reciprocal sum of the four fitted cell counts. Small fitted cells can make the approximation sensitive, and a nearly boundary solution can make the variance unresolved. The calculator checks that variance before forming a residual-square contribution rather than dividing by an effectively zero number.

What the Tarone correction changes

The common odds ratio is estimated from the same collection of strata. Tarone's correction subtracts a component associated with the sum of fitted residuals, rather than pretending the common effect was supplied independently. It is not an arbitrary continuity correction added separately to each observed cell.

Both the unadjusted statistic and the subtraction are returned, so the selected convention can be reproduced. With ordinary mode, no Tarone subtraction is applied. Comparing software requires matching that choice as well as the common-odds estimator, since equally named homogeneity outputs can use different default adjustments.

Interpreting asymptotic evidence

A small p-value suggests that a single common odds ratio may not adequately describe all strata under the assumed sampling model. The result does not tell you which scientific interaction produced the variation or which subgroup estimate should be trusted as a causal effect.

A large p-value does not establish identical effects. Sparse tables and few strata can provide limited power and unreliable large-sample approximations. Inspect stratum counts, fitted variances and meaningful effect sizes. Do not pool mechanically because a homogeneity threshold was not crossed.

Checks before a final comparison

Reordering strata must preserve the statistic. Swapping both row labels consistently across every table reciprocates the common odds ratio but should leave heterogeneity evidence unchanged. Applying an inconsistent swap to only selected strata changes the hypothesis and is not a valid software-agreement check.

Report the cell layout, common estimator, selected adjustment and chi-square degrees of freedom. If the data are paired, clustered or repeatedly sampled across strata, the independence assumption needs a different model. This calculator is an explicit stratified-table diagnostic, not an automatic decision rule for whether a pooled analysis is scientifically appropriate.

A few questions, answered

Does this compute the pooled odds ratio too?

Yes, it returns the Mantel–Haenszel common estimate used for the fitted-cell test.

What does Tarone adjust?

It subtracts a common-effect estimation component from the ordinary Breslow–Day statistic.

Are zero cells always rejected?

No, but every margin, common estimate and fitted variance must remain usable; sparse-table accuracy is still limited.

Does a large p-value prove a common effect?

No. Nonrejection does not establish homogeneity or adequate power.

Find your calculator

Start typing to explore the library.