How to Calculate Confidence Intervals Using Relative Risk
Relative risk is a fundamental measure in epidemiology and public health used to quantify the strength of association between an exposure and an outcome. Calculating confidence intervals for relative risk provides a range of plausible values for the true risk, accounting for sampling variability. This guide explains how to calculate confidence intervals for relative risk using the most common method.
What is Relative Risk?
Relative risk (RR) is a ratio that compares the probability of an outcome occurring in an exposed group to the probability of the outcome occurring in an unexposed group. It's calculated as:
Relative Risk (RR) = (Probability of outcome in exposed group) / (Probability of outcome in unexposed group)
Relative risk values can be interpreted as follows:
- RR = 1: No association between exposure and outcome
- RR > 1: Higher risk in the exposed group
- RR < 1: Lower risk in the exposed group
For example, if the probability of developing a disease is 20% in people who smoke and 10% in people who don't smoke, the relative risk would be 2 (20/10). This indicates that smoking is associated with a 2-fold increased risk of the disease.
Confidence Intervals for Relative Risk
Confidence intervals provide a range of values that are likely to contain the true population parameter. For relative risk, a 95% confidence interval means that if we were to take many samples and calculate the relative risk and its confidence interval for each, 95% of those intervals would contain the true relative risk.
The most common method for calculating confidence intervals for relative risk is the Wald method, which uses the following formula:
Lower bound = RR × exp(-1.96 × √(Var(RR)))
Upper bound = RR × exp(1.96 × √(Var(RR)))
Where Var(RR) is the variance of the relative risk
The variance of the relative risk can be calculated using the following formula:
Var(RR) = (1/a) + (1/b) - (1/c) - (1/d)
Where:
- a = number of exposed cases
- b = number of exposed non-cases
- c = number of unexposed cases
- d = number of unexposed non-cases
This method assumes that the distribution of the relative risk is approximately normal, which is reasonable when the sample sizes are large.
Calculation Method
To calculate the confidence interval for relative risk, follow these steps:
- Calculate the relative risk using the formula above
- Calculate the variance of the relative risk using the formula above
- Calculate the standard error as the square root of the variance
- Calculate the lower and upper bounds of the confidence interval using the formulas above
Note: The Wald method works best with large sample sizes. For smaller samples, alternative methods like the exact method or the score method may be more appropriate.
Worked Example
Let's consider a hypothetical study examining the relationship between coffee consumption and the development of type 2 diabetes.
Study Data
| Group | Cases (Diabetes) | Non-cases | Total |
|---|---|---|---|
| Coffee drinkers | 120 | 380 | 500 |
| Non-coffee drinkers | 80 | 420 | 500 |
Step 1: Calculate the relative risk
RR = (120/500) / (80/500) = 0.24 / 0.16 = 1.5
Step 2: Calculate the variance of the relative risk
Var(RR) = (1/120) + (1/380) - (1/80) - (1/420)
= 0.0083 + 0.0026 - 0.0125 - 0.0024
= 0.0006
Step 3: Calculate the standard error
SE = √0.0006 ≈ 0.0245
Step 4: Calculate the 95% confidence interval
Lower bound = 1.5 × exp(-1.96 × 0.0245) ≈ 1.5 × 0.96 ≈ 1.44
Upper bound = 1.5 × exp(1.96 × 0.0245) ≈ 1.5 × 1.04 ≈ 1.56
The 95% confidence interval for the relative risk is approximately 1.44 to 1.56. This means we are 95% confident that the true relative risk of developing type 2 diabetes for coffee drinkers compared to non-coffee drinkers is between 1.44 and 1.56.
Interpreting Results
When interpreting confidence intervals for relative risk, consider the following:
- If the confidence interval includes 1, there is no statistically significant association between the exposure and outcome
- If the entire interval is above 1, there is a statistically significant increased risk
- If the entire interval is below 1, there is a statistically significant decreased risk
- The width of the interval indicates the precision of the estimate - narrower intervals are more precise
In our example, since the entire confidence interval (1.44 to 1.56) is above 1, we can conclude that coffee consumption is associated with a statistically significant increased risk of type 2 diabetes.
Important: A statistically significant result does not necessarily imply clinical significance. Always consider the magnitude of the effect and the context when interpreting results.
FAQ
What is the difference between relative risk and odds ratio?
Relative risk compares probabilities of outcomes between groups, while odds ratio compares odds of outcomes between groups. Odds ratios are often used when the outcome is rare, as they are less affected by the prevalence of the outcome.
How do I choose the confidence level?
The most common confidence level is 95%, which provides a balance between precision and reliability. However, you can choose other confidence levels (e.g., 90% or 99%) depending on your specific needs.
What if my sample size is small?
For small sample sizes, the Wald method may not be appropriate. Consider using exact methods or simulation-based methods to calculate confidence intervals for relative risk.
How do I report the confidence interval?
Report the confidence interval in parentheses after the relative risk, using the format: "The relative risk was X (95% CI: Y to Z)." For example, "The relative risk was 1.5 (95% CI: 1.44 to 1.56)."