Relative Risk (2×2) — cohort / prospective risk ratio

Verified

Advanced & specialized

Independently verified. Every statistic this test reports has been re-derived against an independent reference — never the library the pipeline itself calls — the rendered output was read back in a browser, and the result is locked with a committed regression suite.

Run this test straight away on a free built-in teaching dataset — no data of your own needed — or bring your own. Either opens the guided workspace: variable setup, assumption diagnostics, results with effect sizes and confidence intervals, figures, and APA-ready reporting.

Loading teaching datasets…

Or use your own dataset

Loading your datasets…

Compares the probability of a binary event between two groups (exposed vs unexposed).

Valid in prospective cohort / RCT designs where exposure PRECEDES outcome — RR is biased on case-control data and the engine refuses to compute it on designs where the marginal disease prevalence is fixed. Reports RR, Katz log-CI, absolute risk difference (RD), and number-needed-to-treat (NNT). The engine surfaces a primary-voice qualifier when the unexposed baseline > 50% — RR is ceiling-bounded by 1/p_unexp in that regime.

Worked example

How much more likely is the outcome with exposure?

Relative risk from a 2×2 table compares the probability of the outcome between exposed and unexposed — best for cohort / prospective designs.

Result

Exposure raised the risk by 70% (RR = 1.7, 95% CI [1.2, 2.4], p = .003).

How you'd report it (APA)

The relative risk showed exposure increased outcome risk, RR = 1.7, 95% CI [1.2, 2.4], p = .003.

When to use it

  • Randomised controlled trial (RCT)
    A vaccine RCT randomises 5,000 participants to vaccine or placebo and follows them for 6 months.
  • Prospective cohort study (observational)
    An occupational cohort of 2,000 chemical-plant workers is followed for 10 years.

When NOT to — use instead

Hypotheses

H₀: RR = 1 (equivalently p_exposed = p_unexposed).
Hₐ: RR ≠ 1.

Parameter tested: relative risk RR

Assumptions (and what to do if they fail)

No zero cells. Zero in a or c makes RR undefined (0 or ∞); Katz log-CI uses 0.5-continuity correction.high

Check: Min cell count.

If violated: Zero cells break the log-CI.

Baseline rate p_unexposed is non-trivial (≥ 0.02 and ≤ 0.98). Very rare / very common outcomes make RR sensitive to sampling noise.low

Check: c / n0.

If violated: Rare event: RR becomes unstable and similar to OR.

Ready to run a Relative Risk (2×2) — cohort / prospective risk ratio on your own data?

Guided setup, automatic assumption checks, effect sizes, figures and an APA write-up.

Run this test →