Skip to main content

Section 12.5 Summary of Inference for Relative Risk

For tables of the form:
\(A\) \(B\)
\(C\) \(D\)
\(A + C\) \(B + D\)

Relative Risk Procedures.

Statistic: Ratio of conditional proportions (typically set up to be larger than one) = \(\frac{\hat{p}_1}{\hat{p}_2}\)
Hypotheses: \(H_0: \frac{\pi_1}{\pi_2} = 1\text{;}\) \(H_a: \frac{\pi_1}{\pi_2} < 1\text{,}\) \(\frac{\pi_1}{\pi_2} > 1\text{,}\) or \(\frac{\pi_1}{\pi_2} \neq 1\)
p-value: Fisher’s Exact Test or normal approximation on \(\ln\left(\frac{\hat{p}_1}{\hat{p}_2}\right)\)
Confidence interval for \(\frac{\pi_1}{\pi_2}\text{:}\) Exponentiate endpoints of
\begin{equation*} \ln\left(\frac{\hat{p}_1}{\hat{p}_2}\right) \pm z^*\sqrt{\frac{1}{A}-\frac{1}{A+C}+\frac{1}{B}-\frac{1}{B+D}} \end{equation*}
Technology:
  • In Two-way Tables applet: Choose Relative Risk as statistic and check box for 95% CI
  • In R: You can install the fmsb package and use the riskratio command.
    fmsb::riskratio(A, B, A+C, B+D, conf.level, p.calc.by.independence = TRUE)
  • In JMP: From the Contingency Analysis hot spot, choose Relative Risk

Technology Detour – Simulating Random Assignment (two-way tables).

  1. Simulate a random sample (number of successes for group 1) using the hypergeometric distribution
  2. Calculate the number of successes for group 2 (total successes – number of successes group 1)
  3. Convert the counts to proportions
  4. Calculate the difference in proportions, relative risk, etc.
Keep in mind you can use "log" to calculate the natural logs of values. Also recall how you created a Boolean expression in Investigation 3.1 to find the p-value from the simulated results.
You have attempted of activities on this page.