PUBH-210 · Lesson 9 of 12 · 23 min

Measures of association: relative risk and odds ratio

▶ Video coming soon A video version of this lesson is on the way.

Two days after the retirement banquet described in lesson 5, Dr. Hana Lindqvist had questionnaires back from all 124 guests. Each guest had said whether they ate each of the eleven menu items and whether they became ill. The epidemic curve had already suggested a point-source outbreak with an incubation period of about a day. Now she needed to find which food was responsible. She built a table with one row per food and calculated, for each, the attack rate among guests who ate it and among those who did not. One food stood out immediately. This lesson shows how she did it, and how the same arithmetic underlies every measure of association in epidemiology.

A measure of association quantifies the relationship between an exposure and an outcome. Lessons 6 to 8 introduced study designs and the measures they produce. This lesson brings those measures together, shows how to calculate and interpret each, explains when the odds ratio approximates the relative risk, and introduces absolute measures that show how much disease an exposure causes. Being fluent with these measures is the single most practical skill in reading health research.

The two-by-two table

Most measures of association start from a two-by-two table, which cross-classifies people by exposure (rows) and outcome (columns). The cells are conventionally labeled as follows.

Table 1. The standard two-by-two table.
Outcome presentOutcome absentTotal
Exposedaba + b
Not exposedcdc + d
Totala + cb + da + b + c + d

In a cohort study, the risk among the exposed is a ÷ (a + b) and the risk among the unexposed is c ÷ (c + d). In a case-control study, the columns are cases and controls, and the row totals have no meaning, because the investigator fixed the column totals. Keeping the layout consistent (exposure in rows, outcome in columns, exposed and diseased in cell a) prevents most calculation errors.

Relative risk

The relative risk (RR), also called the risk ratio, is the risk of the outcome among the exposed divided by the risk among the unexposed:

Relative risk = [a ÷ (a + b)] ÷ [c ÷ (c + d)].

Interpreting it is straightforward. A relative risk of 1.0 means the risk is the same in both groups: no association. A relative risk above 1.0 means the exposed have a higher risk; an RR of 2.5 means the exposed are 2.5 times as likely to develop the outcome, or equivalently have a 150 percent higher risk. A relative risk below 1.0 means the exposed have a lower risk, so the exposure is associated with protection; an RR of 0.6 means a 40 percent lower risk. Vaccine studies report vaccine effectiveness, which is simply 1 minus the relative risk: if vaccinated people have 0.15 times the risk of the unvaccinated, effectiveness is 0.85, or 85 percent.

When follow-up time varies and incidence rates are used, the equivalent measure is the rate ratio: the incidence rate in the exposed divided by the incidence rate in the unexposed. It is interpreted in the same way. Relative risk and rate ratio can only be calculated from studies that measure incidence: cohort studies and randomized trials. Prevalence studies give the analogous prevalence ratio.

Food-specific attack rates

Table 2. Food-specific attack rates for four of the eleven menu items at the banquet. Data invented for this course.
FoodAte: illAte: totalAte: attack rate per 100Did not eat: illDid not eat: totalDid not eat: attack rate per 100Relative risk
Garden salad428052.53446.87.7
Roast chicken3710037.082433.31.1
Rice pilaf339036.7123435.31.0
Chocolate cake4111037.341428.61.3

Worked problem

Finding the vehicle in a banquet outbreak

Using Table 2, calculate the relative risk for the garden salad and for the chocolate cake, and decide which food is the likely vehicle.

Show solution
  1. Garden salad: attack rate among eaters 42 ÷ 80 = 0.525; among non-eaters 3 ÷ 44 = 0.068. Relative risk 0.525 ÷ 0.068 = 7.7.
  2. Chocolate cake: attack rate among eaters 41 ÷ 110 = 0.373; among non-eaters 4 ÷ 14 = 0.286. Relative risk 0.373 ÷ 0.286 = 1.3.
  3. Look for the food with three features: a high attack rate among eaters, a low attack rate among non-eaters, and most cases having eaten it. The salad has all three: 42 of the 45 cases ate it.
  4. Explain the exceptions: the three ill guests who did not eat salad might have been secondary cases, misremembered what they ate, or been exposed through cross-contamination.

Answer: The garden salad is the likely vehicle, with a relative risk of 7.7. The investigation then found that a kitchen worker who prepared the salad by hand had been ill with vomiting the day before the banquet. Stool samples from guests and the worker were positive for the same norovirus strain.

Note that the cake, eaten by almost everyone, has a high attack rate among eaters (37 per 100) but an only slightly lower rate among non-eaters, so its relative risk is near 1. A high attack rate alone does not identify the vehicle; the comparison does. This is the same lesson as the picnic example in lesson 1.

Odds ratio

The odds ratio (OR) compares odds instead of risks. In a case-control study, as lesson 8 showed, it is the odds of exposure among cases divided by the odds of exposure among controls. In a cohort study it can also be calculated as the odds of the outcome among the exposed divided by the odds among the unexposed. Both calculations give the same number:

Odds ratio = (a × d) ÷ (b × c).

The odds ratio is interpreted like the relative risk: 1.0 means no association, above 1.0 a positive association and below 1.0 an inverse (protective) one. It is the measure produced by case-control studies and by logistic regression, the most common method for adjusting for confounders with a yes-or-no outcome, so it appears throughout the health literature.

When does the odds ratio approximate the relative risk?

The odds ratio and relative risk are close when the outcome is rare, generally when it affects fewer than about 10 percent of people in each group. The reason is that when an outcome is rare, b is almost equal to a + b and d is almost equal to c + d, so the odds (a ÷ b) are almost equal to the risk a ÷ (a + b). When the outcome is common, the odds ratio is always further from 1 than the relative risk: larger when the RR is above 1, smaller when it is below 1.

A line chart with the risk of the outcome in the unexposed group, from 0 to 45 per 100, on the horizontal axis and the odds ratio on the vertical axis. Three curves represent true relative risks of 2, 3 and 0.5. At low baseline risk each curve starts at its relative risk; as baseline risk rises, the curves for relative risks of 2 and 3 climb steeply upward, and the curve for 0.5 drifts slightly downward.
Figure 1. The odds ratio diverges from the relative risk as the outcome becomes common.

Worked problem

Odds ratio and relative risk for a common outcome

In a cohort study of 400 adults with low back pain, 80 of 200 who received only an advice leaflet still had pain at three months, compared with 40 of 200 who received physiotherapy. Calculate the relative risk and the odds ratio of persistent pain for the leaflet group.

Show solution
  1. Risks: leaflet 80 ÷ 200 = 0.40; physiotherapy 40 ÷ 200 = 0.20.
  2. Relative risk: 0.40 ÷ 0.20 = 2.0.
  3. Odds: leaflet 80 ÷ 120 = 0.667; physiotherapy 40 ÷ 160 = 0.25.
  4. Odds ratio: 0.667 ÷ 0.25 = 2.67, or (80 × 160) ÷ (120 × 40) = 12,800 ÷ 4,800 = 2.67.

Answer: The relative risk is 2.0 and the odds ratio is 2.67. Because persistent pain is common, the odds ratio overstates the relative risk. Reporting the odds ratio as if it were “2.67 times the risk” would exaggerate the difference.

In case-control studies with incidence-density sampling of controls (controls chosen from people still at risk when each case occurs), the odds ratio estimates the rate ratio without any rare-disease assumption. This is a technical point, but it explains why case-control studies are such powerful tools.

Absolute measures: how much disease is due to the exposure?

Relative measures describe the strength of an association, which is useful for judging causation. But they do not tell you how many cases an exposure causes, which is what matters for public health decisions. For that, epidemiologists use absolute measures.

The risk difference, also called the attributable risk among the exposed, is the risk among the exposed minus the risk among the unexposed: [a ÷ (a + b)] − [c ÷ (c + d)]. In the night-shift cohort of lesson 7, the ten-year risk of diabetes was 80 per 1,000 among night workers and 50 per 1,000 among day workers, a risk difference of 30 per 1,000. If the association is causal, 30 of every 1,000 night workers developed diabetes because of shift work.

The attributable fraction among the exposed expresses the same idea as a proportion of the exposed group’s cases: (RR − 1) ÷ RR. For the night workers, (1.6 − 1) ÷ 1.6 = 0.375: if the association is causal, about 38 percent of diabetes cases among night workers would not have occurred without shift work.

The population attributable fraction (PAF) estimates the proportion of all cases in a population that are due to the exposure, which depends on both the relative risk and how common the exposure is. With p as the proportion of the population exposed, Levin’s formula is: PAF = p(RR − 1) ÷ [1 + p(RR − 1)]. A strong risk factor that few people have may account for few cases overall, while a modest risk factor that many people have may account for many, an echo of Rose’s prevention paradox from lesson 1.

Worked problem

Population attributable fraction

In a fictional population, 20 percent of adults smoke, and smokers have a relative risk of 10 for a cancer compared with non-smokers. In the same population, 60 percent of adults are physically inactive, with a relative risk of 1.5 for colon cancer. Calculate the PAF for each.

Show solution
  1. Smoking: p(RR − 1) = 0.20 × 9 = 1.8. PAF = 1.8 ÷ (1 + 1.8) = 1.8 ÷ 2.8 = 0.64.
  2. Inactivity: p(RR − 1) = 0.60 × 0.5 = 0.30. PAF = 0.30 ÷ 1.30 = 0.23.

Answer: If both associations are causal, about 64 percent of cases of the first cancer and about 23 percent of colon cancer cases in this population are attributable to the exposures. The weaker risk factor still accounts for nearly a quarter of cases because it is so common.

For treatments and preventive interventions, the risk difference is often turned into the number needed to treat (NNT): 1 ÷ absolute risk reduction. If a program reduces the five-year risk of a fall from 10 percent to 7 percent, the absolute risk reduction is 0.03 and the NNT is 1 ÷ 0.03 = 33.3, rounded up to 34: about 34 older adults must take part for five years to prevent one fall. The analogous number needed to harm (NNH) applies to adverse effects.

Relative versus absolute in communication

Relative measures can make small absolute effects sound dramatic. A headline that a medication “doubles the risk” of a blood clot is alarming; if the baseline risk is 2 per 10,000 women per year, doubling adds 2 cases per 10,000 per year. Conversely, a modest relative reduction in a common disease can prevent thousands of cases. Good practice in health communication is to present absolute risks in each group alongside relative measures, using the same denominator: “about 4 in 10,000 women taking the medication develop a clot each year, compared with 2 in 10,000 who do not.”

Table 3. Measures of association and impact.
MeasureFormulaStudy designsNo associationAnswers
Relative risk[a ÷ (a + b)] ÷ [c ÷ (c + d)]Cohort, trial1How many times higher is the risk?
Rate ratioRate in exposed ÷ rate in unexposedCohort, trial1How many times faster do cases arise?
Odds ratio(a × d) ÷ (b × c)Case-control, cohort, cross-sectional1How many times higher are the odds?
Risk difference[a ÷ (a + b)] − [c ÷ (c + d)]Cohort, trial0How many extra cases per person exposed?
Attributable fraction (exposed)(RR − 1) ÷ RRCohort, trial0What share of exposed cases is due to exposure?
Population attributable fractionp(RR − 1) ÷ [1 + p(RR − 1)]Combined data0What share of all cases is due to exposure?
Number needed to treat1 ÷ absolute risk reductionTrialInfiniteHow many must be treated to prevent one case?

Common mistakes

  • MistakeAn odds ratio of 3 means the exposed have three times the risk.

    InsteadAn odds ratio approximates the relative risk only when the outcome is rare; for common outcomes it overstates the RR.

  • MistakeThe food with the highest attack rate among eaters is the vehicle.

    InsteadCompare attack rates among eaters and non-eaters; a food eaten by nearly everyone can have a high attack rate and a relative risk near 1.

  • MistakeA relative risk of 0.7 means 70 percent fewer cases.

    InsteadIt means 30 percent fewer cases (1 − 0.7 = 0.3).

  • MistakeA large relative risk means an exposure causes many cases in the population.

    InsteadPopulation impact depends on both the relative risk and how common the exposure is.

  • MistakeRelative risks can be calculated from case-control studies.

    InsteadCase-control studies fix the numbers of cases and controls, so they give odds ratios, not risks.

Summary and key terms

  • Measures of association are calculated from a two-by-two table with exposure in rows and outcome in columns.
  • The relative risk compares risks and the rate ratio compares rates; both come from cohort studies and trials.
  • The odds ratio, (a × d) ÷ (b × c), comes from case-control studies and logistic regression and approximates the RR when the outcome is rare.
  • A ratio of 1 means no association; vaccine effectiveness is 1 minus the relative risk.
  • Absolute measures, such as the risk difference, attributable fractions and the number needed to treat, show how much disease an exposure causes or an intervention prevents.
  • Report absolute risks alongside relative measures to avoid exaggerating small effects.
Relative risk
Risk among the exposed divided by risk among the unexposed.
Odds ratio
The ratio of the odds of exposure (or outcome) in two groups; (a × d) ÷ (b × c).
Risk difference
Risk among the exposed minus risk among the unexposed.
Attributable fraction
The proportion of cases among the exposed due to the exposure, (RR − 1) ÷ RR.
Population attributable fraction
The proportion of all cases in a population due to an exposure.
Number needed to treat
The number of people who must receive an intervention to prevent one case.
Vaccine effectiveness
The proportional reduction in risk among vaccinated people, equal to 1 minus the relative risk.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. In a cohort, 60 of 1,500 exposed and 20 of 2,000 unexposed people develop a disease. Calculate the RR, risk difference and attributable fraction among the exposed.

    Show answer

    Risks 0.040 and 0.010. RR = 4.0; risk difference 0.030 (30 per 1,000); attributable fraction (4 − 1) ÷ 4 = 0.75.

  2. In an influenza season, 2 percent of vaccinated and 8 percent of unvaccinated nursing home residents developed laboratory-confirmed influenza. What was vaccine effectiveness?

    Show answer

    RR = 0.02 ÷ 0.08 = 0.25; effectiveness = 1 − 0.25 = 0.75, or 75 percent.

  3. A trial reduces the one-year risk of hospital admission from 20 percent to 15 percent. What is the NNT?

    Show answer

    Absolute risk reduction 0.05; NNT = 1 ÷ 0.05 = 20.

  4. In a case-control study, a = 50, b = 25, c = 50, d = 75. Calculate the odds ratio.

    Show answer

    (50 × 75) ÷ (25 × 50) = 3,750 ÷ 1,250 = 3.0.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz