Choose your reading route
eduKateSG · Why Mathematics? · Breslow–Day, Odds-Ratio Homogeneity and Stratum Differences
Start with the question, audit the worked example, or jump to the assumptions and practice. Every chapter stays open for uninterrupted reading.
Understand the question
Define the quantity and follow the mechanism.Route 2 · Chapters 6–11
Reproduce the example
Audit the numbers one step at a time.Route 3 · Chapters 12–19
Check assumptions
See where design and calibration matter.Route 4 · Chapters 20–21
Explore applications
Connect the method to a concrete investigation.Route 5 · Chapters 22–26
Study and verify
Practise, inspect failure cases and read further.
Full chapter index · Practice and checking · Mathematics Learning Hub
Why is mathematics important before combining several comparisons? Because an average association can conceal differences between settings. The Breslow–Day test asks whether the odds ratios in several independent two-by-two strata are consistent with a common population odds ratio. It investigates homogeneity of association, not whether that common association equals one and not whether a particular exposure caused an outcome.
Imagine two synthetic testing environments comparing methods A and B on a binary outcome. A performs better in one environment and worse in the other. A combined ratio may lie near the middle and describe neither environment well. Mathematics makes that tension explicit by fitting a common association and measuring how far each stratum departs from it.
This guide develops a checked two-stratum example, explains odds, pooled estimation, fitted cells and the optional Tarone adjustment, and shows why interaction depends on the measurement scale. All counts are invented for learning. They are not evidence about a real school, product or health intervention, and this article is not guidance for a personal medical decision.
Did You Know? Equal odds ratios do not require equal outcome probabilities or equal probability differences. An association can be homogeneous on one scale while differing on another. A statement about “the same effect” needs to name its scale.
Full chapter index
Chapters 1–5 · Understand the question
Chapters 6–11 · Reproduce the example
Chapters 12–19 · Check assumptions
- The Tarone adjustment is a declared option
- Homogeneity is not a significance gatekeeper
- Equality on one scale can differ on another
- Confounding and heterogeneity are different ideas
- Collapsing the example hides important context
- Sparse tables and zeros need caution
- Numerical stability matters near a common ratio of one
- Stratum selection must precede confirmatory claims
Chapters 20–21 · Explore applications
Chapters 22–26 · Study and verify
Within each stratum, arrange the table as [[a, b],[c, d]]. Rows represent two groups and columns success versus failure, with the same labels and directions in every stratum. The odds ratio is ad/(bc) when all required counts are positive.
The first group’s observed success odds are a/b, while the second group’s are c/d. Their ratio compares odds, not probabilities. The orientation determines whether a larger value favours the first group under the chosen success definition.
Swap both row and column labels and the odds ratio stays unchanged. Swap only one dimension and it becomes its reciprocal. A homogeneity analysis requires consistent orientation, so a single reversed table can create an artificial appearance of opposing associations.
Record labels beside the numbers rather than relying on memory. Non-negative integer counts should represent the actual independent observational units under the intended sampling model. Weighted pseudo-counts and repeated outcomes need a separately justified analysis.
A probability p corresponds to odds p/(1−p). A probability of 0.8 gives odds four, while a probability of 0.25 gives odds one-third. Their odds ratio is twelve, whereas their probability ratio is 3.2 and their probability difference is 0.55.
These are three legitimate but different summaries of the same two proportions. Calling an odds ratio of twelve “twelve times as likely” would generally confuse odds with probability. The discrepancy becomes especially important when outcomes are common.
The odds ratio is useful in several statistical models and sampling designs, but its interpretation still needs care. It is not automatically a causal effect or a direct measure of practical benefit. Baseline outcome probabilities and study design remain relevant.
Before combining strata, write which association scale the scientific question uses. The Breslow–Day procedure concerns equality of odds ratios. It does not test equality of risk ratios, probability differences or every conceivable measure of effect.
A stratum is a subgroup or setting within which a two-by-two comparison is formed. It might represent an environment, age band or another declared grouping. Strata should be defined because they matter to the design or question, not discovered solely to produce significance.
In the straightforward stratified analysis, the units contributing counts are independent under the sampling model. The same participant appearing in several strata would violate a simple independent-table interpretation unless the dependence is handled explicitly.
Stratification preserves information about context instead of collapsing it immediately. But it does not automatically control every confounder or create causal comparability. Important differences may remain within strata.
Use compatible measurement rules across strata. If success means one thing in the first environment and another in the second, the odds-ratio contrast may reflect a changed outcome definition rather than genuine heterogeneity of the same association.
For K strata, let θ_k be the population odds ratio in stratum k. The null is θ₁=θ₂=…=θ_K. The common value is not specified as one;it is estimated from the data in the usual procedure.
The alternative is that not all odds ratios are equal. Rejection signals evidence against the common-odds-ratio model under the approximation and assumptions. It does not identify the source of heterogeneity or prove that every pair of strata differs.
This differs from testing a common odds ratio against one. All strata could share an odds ratio of four and satisfy homogeneity while showing association. They could also show different odds ratios that average near one.
Write these two questions separately in an analysis plan: is there association under an appropriate common-effect model, and is that model sufficiently consistent across strata? One p-value cannot answer both merely because the calculations use related tables.
CHAPTER 5 OF 26 · Understand the question
5. Inspect stratum-specific summaries first
List each table, its group sizes, success proportions and observed odds ratio. A global homogeneity statistic should not be the first time the analyst notices that directions reverse across settings.
Small strata can have unstable ratios, especially when a denominator cell is small or zero. Large numerical differences in point estimates may therefore reflect substantial uncertainty. Conversely, a moderate ratio difference can be well estimated in a large study.
A plot of stratum-specific log odds ratios with appropriate intervals can help in substantive analysis, but it should not replace the original counts. Ratios can look similar while underlying baseline probabilities and practical consequences differ.
The teaching example below uses positive counts so all simple ratios are defined. Its numerical separation is deliberate and easy to inspect. It illustrates the mechanism, not a claim that every real dataset will provide such a clear pattern.
Use stratum one [[12,3],[4,12]] and stratum two [[5,10],[10,5]]. The first stratum contains thirty-one units and the second thirty. Rows are method A and method B;columns are success and failure.
In stratum one, A succeeds in twelve of fifteen cases and B in four of sixteen. The odds ratio is 12×12/(3×4)=12. In stratum two, A succeeds in five of fifteen and B in ten of fifteen, with odds ratio 5×5/(10×10)=0.25.
The observed directions oppose each other. This immediately warns that one combined association may be an unhelpful description, even before a formal test. The probability differences are also different: 0.55 in the first stratum and approximately −0.3333 in the second.
These synthetic counts do not establish a cause. They demonstrate the descriptive pattern that the common-odds-ratio model will be asked to accommodate. The inferential calculation follows from a stated model, not from the visual drama of the two ratios alone.
| Stratum and group | Success | Failure |
|---|---|---|
| Stratum 1: A | 12 | 3 |
| Stratum 1: B | 4 | 12 |
| Stratum 2: A | 5 | 10 |
| Stratum 2: B | 10 | 5 |
The usual Mantel–Haenszel pooled estimate is θ̂=[Σa_k d_k/n_k]/[Σb_k c_k/n_k], where n_k is the stratum total. This is not the arithmetic mean of the observed odds ratios.
For the worked tables, the numerator is 144/31+25/30 and the denominator is 12/31+100/30. Their ratio is approximately 1.47254335. The value lies between twelve and one-quarter but does not describe either observed setting particularly well.
This estimate supplies the common association used in the Breslow–Day construction. Its existence does not validate homogeneity. A model can always produce a fitted summary that needs to be checked against the data it summarises.
Do not interpret the pooled estimate as a vote that the first method is generally superior. Population composition, baseline outcomes, uncertainty and the heterogeneity result all matter. A single number can be mathematically well defined while being a poor practical headline.
CHAPTER 8 OF 26 · Reproduce the example
8. Fit each table under the common association
Within a stratum, hold its row and column margins fixed for the fitted-table construction. Let R=a+b be the first row total, C=a+c the first column total and n the grand total. If e is the fitted upper-left cell, the other cells are R−e, C−e and n−R−C+e.
The fitted odds ratio must equal θ̂, so e(n−R−C+e)=θ̂(R−e)(C−e). This is a quadratic equation except at the special common-ratio value one, where it simplifies.
The admissible range is max(0, R+C−n)≤e≤min(R, C). Choose the root producing non-negative fitted cells, not simply whichever algebraic root appears first. A numerical root solve on this interval offers an independent check.
These are fitted cell values under the common-association approximation. They are not observed counts and need not be integers. Nor should they be casually described as exact finite-sample conditional expectations without specifying the relevant distribution and approximation.
CHAPTER 9 OF 26 · Reproduce the example
9. Reconstruct the fitted cells numerically
For stratum one, R=15, C=16, n=31. The fitted upper-left cell is approximately 8.48767959. The remaining cells are 6.51232041,7.51232041 and 8.48767959, which preserve the original row and column margins.
For stratum two, R=C=15, n=30. The fitted upper-left cell is approximately 8.22335279. The other cells are 6.77664721,6.77664721 and 8.22335279.
Substituting either fitted table into ad/(bc) reproduces the common ratio about 1.47254335. This is an essential reconstruction check: the fit must satisfy both margins and the intended common association.
The values were calculated by an independent bracketed root solve and checked against the quadratic expression in the maintained implementation. The two routes agreed. No local execution of statsmodels is claimed;the verification concerns independently reproduced arithmetic and inspected public algorithm definitions.
CHAPTER 10 OF 26 · Reproduce the example
10. Scale each cell departure by its variability
For a fitted table with cells e, R−e, C−e, n−R−C+e, the usual approximate variance term is v=[1/e+1/(R−e)+1/(C−e)+1/(n−R−C+e)]⁻¹.
The Breslow–Day statistic sums (a_k−e_k)²/v_k across strata. Each term measures the observed upper-left cell’s departure from its common-ratio fit relative to a fitted variability scale. Because margins determine the other cells, one cell captures the stratum’s remaining association departure.
For our example, the variance terms are approximately 1.91458858 and 1.85755869. The observed upper-left counts are twelve and five, departing in opposite directions from their fitted values near eight.
This weighting is why raw differences between observed ratios are not themselves the test statistic. Strata contribute according to the fitted table structure and uncertainty, rather than simply measuring how far twelve lies from one-quarter on an arbitrary numerical axis.
Using the fitted cells and variances gives Q≈12.03673053 for the two-stratum example. The usual approximate reference has K−1=1 degree of freedom. Its upper-tail probability is about 0.00052162.
Under the stated model and approximation, this supplies strong evidence against a common population odds ratio. It is an omnibus heterogeneity result, not a proof that a particular named mechanism causes the difference between settings.
The decimal calculation was independently checked from both admissible quadratic roots and bracketed numerical solutions. SciPy supplied the chi-square tail evaluation;the observed tables and fitting equation were retained separately for audit.
Report the stratum-specific observations alongside the result. A small p-value without the ratios twelve and one-quarter leaves the reader unaware that the associations point in opposite directions. The practical interpretation depends on that pattern, not only on statistical unusualness.
CHAPTER 12 OF 26 · Check assumptions
12. The Tarone adjustment is a declared option
The optional Tarone adjustment subtracts [Σ(a_k−e_k)]²/Σv_k from the unadjusted statistic. It accounts for a component of the aggregate fitted-cell departure in the common-parameter construction.
For the worked example, the adjusted statistic is approximately 12.01459399, with approximate p≈0.00052786 on the same one-degree-of-freedom reference. The numerical difference is small here but should still be recorded.
Current statsmodels documentation exposes this through an adjust option. A reproducible report should state whether it was enabled. Saying only “Breslow–Day” can omit a choice that changes the reported number.
Do not select the adjustment based on which p-value crosses a threshold. Choose the intended procedure in advance or label comparisons as sensitivity analysis. A small implementation difference does not justify hiding the method that was actually used.
CHAPTER 13 OF 26 · Check assumptions
13. Homogeneity is not a significance gatekeeper
It is tempting to run a homogeneity test and, if it is non-significant, declare that pooling is automatically safe. That is too strong. A small study can have little power to detect important heterogeneity.
Clinical, engineering or educational context may already make a single common association implausible. Conversely, a very large dataset can detect differences too small to matter practically. The decision to summarise should consider magnitude, uncertainty and purpose, not one threshold alone.
A prespecified model can include stratum-specific associations or interaction terms when the question requires them. That is a modelling choice with its own assumptions, not a punishment for failing a preliminary test.
Use the test as one diagnostic of a common-odds-ratio representation. Keep the original tables visible and ask whether the summary would help a reader make the intended decision. A non-rejection is not a certificate that all settings are interchangeable.
CHAPTER 14 OF 26 · Check assumptions
14. Equality on one scale can differ on another
Suppose two strata have the same odds ratio but different baseline success probabilities. Their probability differences and probability ratios can differ because converting odds to probability is nonlinear.
This means effect modification is scale-specific. A statement that an effect is homogeneous should say “on the odds-ratio scale” rather than implying identical impact under every representation.
The practical decision may depend more on absolute probability change than on an odds multiplier. A modest absolute change in a frequent outcome can matter differently from a similar odds ratio applied to a rare outcome.
Report relevant original probabilities and differences where the design permits their interpretation. The Breslow–Day test addresses one association scale. Domain judgement supplies which scale best expresses the real consequence being considered.
CHAPTER 15 OF 26 · Check assumptions
15. Confounding and heterogeneity are different ideas
Confounding concerns distortion of an association by other variables under a causal or associational model. Heterogeneity concerns differences in the chosen association across strata. Both can arise in a study, but one is not a synonym for the other.
Stratification can reveal that associations differ across settings. It can also support adjustment under suitable assumptions. The same stratified table does not automatically establish which causal explanation accounts for its pattern.
Odds ratios also have a non-collapsibility property: marginal and conditional odds ratios can differ even without the simple story that a confounder caused the discrepancy. Therefore a change after pooling should not be treated as proof of confounding by itself.
Use causal reasoning and study design to distinguish these questions. A statistical interaction on one scale does not identify a biological, educational or operational mechanism without additional evidence about how the data were generated.
CHAPTER 16 OF 26 · Check assumptions
16. Collapsing the example hides important context
Adding the two example tables produces [[17,13],[14,17]]. Its simple cross-product odds ratio is 17×17/(13×14)≈1.58791209. That single number conceals the original opposing associations.
The Mantel–Haenszel estimate about 1.4725 preserves a form of stratified adjustment, but it still represents a common-ratio summary. Neither number alone communicates the contrast between environments.
This does not mean aggregation is always wrong. A well-justified summary can be useful when its target and limits are clear. The problem is presenting a combined association as if it described every subgroup when the evidence shows otherwise.
For teaching, compare three displays: the two original tables, the collapsed table and the common fitted tables. Ask which information each preserves and which it discards. The exercise connects representation choices with the claims a reader can legitimately make.
Small or zero cells can make observed odds ratios undefined or highly unstable. They can also undermine the large-sample approximation used by the homogeneity statistic. A numerical output is not a guarantee of reliable calibration.
Some implementations offer zero-cell shifts or other corrections. Record the exact setting and retain the original counts. Adding artificial counts changes the fitted problem and should not be treated as invisible housekeeping.
If a zero reflects a structural impossibility, that differs from an event unobserved in a small sample. The analysis should respect the design constraint rather than automatically applying a generic correction.
The worked tables avoid zeros so the mechanism can be checked cleanly. Real sparse data may require a different model, simulation study or specialist inference. Do not claim that the method becomes exact merely because the table is small.
CHAPTER 18 OF 26 · Check assumptions
18. Numerical stability matters near a common ratio of one
The fitted-cell quadratic has a leading coefficient involving one minus the common odds ratio. When the ratio is one, the equation becomes linear. A naive implementation that always divides by the quadratic coefficient can fail at that boundary.
A stable educational implementation can handle the special case explicitly or solve the fitted-odds equation over its admissible interval. Check non-negative fitted cells, margin preservation and reconstruction of the common association.
Near-boundary counts can also create very small fitted cells and sensitive variance terms. Preserve full intermediate precision and avoid premature rounding. A small denominator should prompt inspection rather than a triumphal interpretation of a large statistic.
Our numerical audit used two formulations precisely to catch these issues. Agreement on the worked example is an implementation check, not a universal validation of the approximation for every possible sparse or extreme table.
CHAPTER 19 OF 26 · Check assumptions
19. Stratum selection must precede confirmatory claims
Exploring many subgroup definitions can uncover interesting patterns, but selecting the most dramatic heterogeneity result changes the inferential problem. A single unadjusted p-value does not account for all the searches that produced it.
Define important strata and planned comparisons before viewing outcomes whenever confirmation is intended. If a pattern is discovered afterwards, label it exploratory and seek new evidence or an analysis that accounts for the search.
Avoid interpreting an insignificant overall association as permission to search indefinitely for a significant subgroup. The practical question and a coherent analysis plan should guide the work, not the desire for a publishable threshold crossing.
For students, this distinction is a useful research habit: preserve what was predicted, what was inspected and what was revised. The test’s arithmetic is only one part of an honest evidence trail.
CHAPTER 20 OF 26 · Explore applications
20. A two-environment engineering investigation
Generate synthetic independent binary outcomes for methods A and B in two declared environments. Start with common odds ratios but different baseline probabilities. Then introduce an environment-specific reversal.
Calculate each table’s proportions, odds ratio and fitted common table. Inspect whether the pooled estimate gives a useful description under each generating scenario. Keep the true generating values separate from noisy sample estimates.
Repeat simulations to study calibration and power under the chosen scenarios. Vary group sizes, baseline probabilities and sparsity. A simulation demonstrates behaviour in its declared models, not universal reliability.
End with an engineering criterion such as reliability above a specified threshold. Homogeneity of association does not certify that either method meets that threshold. A process can behave consistently across environments and still perform inadequately everywhere.
CHAPTER 21 OF 26 · Explore applications
21. An educational-comparison reading exercise
Use synthetic pass/fail results in two independent settings. Before comparing, ask whether assessments, thresholds and marking standards are compatible. Different outcome definitions can create apparent heterogeneity unrelated to learning.
Shared classrooms and selection into programmes can introduce clustering and confounding. An odds-ratio test does not automatically correct those design issues. A large count of pupils may still contain relatively few independent learning environments.
Do not translate a subgroup association into a recommendation for an individual child without other evidence. Learning needs, prior preparation and the actual task matter. Group ratios cannot diagnose a missing algebra prerequisite or guarantee a personal outcome.
For parents, the useful question is which comparison applies to the child’s situation and what it measured. Mathematics supports that question by preserving context rather than flattening every learner into one combined statistic.
Begin with probabilities and odds. Convert a few proportions and explain why an odds ratio is not generally a probability ratio. Use the worked first stratum to compare twelve,3.2 and 0.55 as different summaries.
Move to weighted aggregation and the Mantel–Haenszel formula. Show that a pooled estimate is not an ordinary average of observed ratios. Then reconstruct fitted cells from fixed margins and a common association.
Study the quadratic equation through its admissible root. The interval constraints give a concrete reason to reject an algebraically possible but impossible fitted table. Check the result by recomputing margins and odds.
Finally introduce the weighted squared departures and chi-square approximation. The route links arithmetic, algebra, modelling and inference without pretending that a complicated name replaces understanding of the underlying comparison.
Question 1: What are the odds when probability is 0.8? They are 0.8/0.2=4. A probability of one-quarter gives odds one-third, so their odds ratio is twelve.
Question 2: What is the first example odds ratio? It is 12×12/(3×4)=12. The second is 5×5/(10×10)=0.25. Their directions differ under the same labels.
Question 3: If rows are swapped in every stratum, what happens? Every odds ratio is reciprocated. The homogeneity question remains equivalent when coding changes consistently, but a single incorrectly swapped table can manufacture heterogeneity.
Question 4: Does a non-significant homogeneity result prove equal population effects? No. It may reflect limited information, and equality concerns only the named odds-ratio scale. Practical equivalence requires a declared tolerance.
Question 5: Does a common odds ratio of four mean success probabilities are the same everywhere? No. Baseline probabilities can differ while the odds multiplier remains common. Report the original proportions to preserve that distinction.
Save the original tables with identical labels, the definition of strata, the observational unit and sampling process. Record zero-cell settings, pooled estimator, fitted cells, variance terms and whether Tarone adjustment was applied.
Report stratum-specific estimates alongside the pooled estimate and heterogeneity statistic. State that the reference is asymptotic and identify sparse-data concerns. Keep causal interpretation separate from association and interaction on the odds-ratio scale.
For an educational implementation, check margins, admissible roots and reconstructed odds in every fitted table. Compare a direct quadratic calculation with a bracketed solve on a nondegenerate example. Retain intermediate values rather than only the final p-value.
A reader should be able to see why a common summary was considered, how it was checked and what context it hides. That evidence trail makes the statistical result useful for a decision rather than simply another number in a report.
Does Breslow–Day test whether an odds ratio equals one?
Its main null is equality of odds ratios across strata. Testing a common association against one is a different question. A dataset can satisfy one condition while failing the other.
Is the procedure exact?
The usual reference is a chi-square approximation. Sparse or extreme tables can make that approximation problematic. The word test does not imply an exact finite-sample guarantee.
Why report the adjustment setting?
The Tarone option changes the statistic and its reported tail probability. Recording it allows reproduction and prevents an unexplained discrepancy between otherwise similar analyses.
Does heterogeneity prove a causal mechanism?
No. Measurement changes, selection, confounding and genuine context-dependent effects can all contribute. A mechanism needs additional design and substantive evidence.
What is the lasting mathematical lesson?
Check what a combined number preserves before using it as a headline. A valid summary can conceal important opposing patterns, and sameness depends on which quantity and scale were defined in the first place.
The maintained statsmodels Breslow–Day documentation specifies the equal-odds-ratio null and Tarone option. Its public implementation was inspected. The fitted tables and probabilities here were independently reconstructed;local execution of statsmodels is not claimed.
For a common stratified association question, read Cochran–Mantel–Haenszel stratification. For two independent binomial groups, see Barnard’s exact test. The Mathematics Learning Hub connects these comparisons with probability, algebra and responsible evidence.
