Understanding Deeply · The 2×2 laboratory

Four cells. Many ways to tell the story.

Imagine a prevention program for an invented symptom flare. Group A receives the program; group B follows its usual routine. Change their 12-month event risks, then see exactly how the same table becomes a risk ratio, odds ratio, absolute difference or number needed to treat.

Entirely fictionalUnwanted outcome: ≥1 flare12 months · complete follow-upA compared with B
Try a story

1. Start with the 2×2 table

One person is counted once: flare or no flare during 12 months.
GroupFlareNo flareTotal
A · programab
B · usual routinecd

Enter your own fictional counts

Apply all four cells together, with at most 100,000 people per group. These are teaching counts, not individual patient data. An empty group makes comparisons undefined.

GroupFlareNo flare
A · program
B · usual routine
Results update when you apply.

2. Choose the question you want to answer

Click a measure to reveal its denominator and the calculation using your current table.

Risk versus odds

3. Same people, different denominators

A · program

B · usual routine

Both grids are normalized to 100 people for comparison. Each square represents one percentage point; a partial fill shows a fraction. They are not paired individuals. Filled = flare; pale = no flare.

“One additional” is the key. NNT and NNH describe an average net difference between strategies. They do not identify which individual benefits or is harmed, or promise exactly one changed outcome in every group of that size. Other benefits or side effects need their own outcome tables.

A controlled comparison

4. Same relative effect. Very different NNT.

These three independent fictional examples all use RR = 0.50, meaning a 50% relative reduction. The baseline risk changes. Click a row’s button to load its full table.

1,000 people per group, the same unwanted outcome, the same 12-month period.
B riskA riskRRORAbsolute reductionNNTExplore

The baseline risk supplies the scale: absolute risk reduction = baseline risk × relative risk reduction. A large percentage reduction does not, by itself, tell you how many additional events are prevented.

The attributable-risk family

5. A difference, a fraction, and a population impact

In this section, regard receiving A as the exposure and B as the reference. The labels depend on whether A raises or lowers risk. The causal interpretations require that the risks represent comparable intervention alternatives.

Change the share receiving A

This is exposure prevalence, not outcome prevalence or the trial’s allocation ratio.

Keep the names attached to the formulas

Attributable risk (AR) is used here for the risk difference, rA − rB. Attributable fraction among the exposed (AFₑ), also called attributable risk percent when expressed as a percentage, divides that excess by rA. Population attributable fraction (PAF) uses the whole population’s risk in its denominator. When A is protective, the corresponding prevented fractions use different reference denominators.

Terminology varies. If someone says “attributable risk ratio,” ask which formula they mean; the risk ratio and attributable fraction are not interchangeable. A study’s sampling ratio does not tell you the exposure share in a real target population.

Open the mathematical bridgeFrom a, b, c and d to every result, with units and current numbers

Why the odds ratio moves away from the risk ratio

For non-boundary risks, OR = RR × (1 − rB)/(1 − rA). When both event risks are small, the extra factor is close to 1. With common events it can be far from 1. For positive, unequal risks strictly below 1, OR lies farther from 1 than RR. This does not make OR an incorrect measure; it answers a different question.

The conversion needs the comparator risk. An odds ratio alone cannot provide an absolute risk reduction or NNT. This identity is for the same crude two-group comparison; converting an adjusted or conditional odds ratio into a marginal risk contrast requires further care.

Reversing the reference group

Reversing A and B reciprocates finite nonzero RR and OR and changes the sign of the risk difference. It also changes which strategy the NNT or NNH refers to. Changing the event definition is another operation: odds ratios reciprocate, but the risk ratio for “no flare” is generally not 1/RR.

Rounding, zero cells and no difference

We use the unrounded risk difference for reciprocals. NNT for benefit (NNTB) and NNT for harm (NNTH, commonly called NNH) are rounded up to a whole number here, with the exact reciprocal also shown. A risk difference of 0 has no finite NNT: the reciprocal tends to infinity. A dash marks an undefined quantity; zero is a valid result and means something else. No 0.5 continuity correction is silently added to the table.

Which study designs support these calculations?The limits of a 2×2 table, causal interpretation and uncertainty

Trial or cohort: the group totals must represent people at risk

This example assumes that everyone is followed over the same 12 months and each person contributes a single yes/no outcome. Risks, risk ratios and risk differences use the full group denominators. The same arithmetic applied to unrelated sampling fractions does not recover population risks.

A case–control table is different

In a conventional case–control study, investigators choose how many cases and controls to sample. The four cells can supply an odds ratio, but their row proportions generally do not estimate event risks. RR, absolute risk differences and NNT cannot usually be recovered from that table alone. How the OR relates to an underlying risk or rate ratio also depends on the sampling design.

A hazard ratio needs time-to-event information

A risk is a cumulative probability over a stated period. An incidence rate uses person-time. A hazard concerns the instantaneous event rate among people still at risk. This simple end-of-period 2×2 table cannot identify a hazard ratio or supply the person-time needed for a rate ratio.

Association is not automatic attribution

The fictional program comparison supports causal language only under its stated ideal conditions. With observational data, confounding, selection and measurement differences may explain a contrast. The population panel further assumes that both strategy-specific risks apply to the hypothetical target population, without effect modification or confounding left unaddressed. It compares that mixture with a counterfactual population all receiving B.

Effect size and certainty are different

Multiplying all four cells by the same number preserves the point estimates, while a larger independent sample generally improves precision. These constructed tables teach point estimates; they do not show confidence intervals. A real analysis needs uncertainty estimates and a method appropriate to its design, sparse cells and follow-up. If a risk-difference interval crosses zero, an NNT interval can extend through infinity from benefit to harm.

Changing the follow-up period requires new outcome information or an explicit model. You cannot simply relabel this 12-month NNT as a lifetime NNT. Also, benefit and harm on different outcomes cannot be combined just by comparing their NNTs without considering severity, timing and preferences.

Method references & data provenance

Every count is invented for teaching. The sliders construct whole-number counts; the displayed risks are recalculated from those counts. The population panel shows model-based expected risks, not additional observed people. No real study, clinical product or personal dataset is used.