# How to calculate the relative risk based on two independent confidence intervals

Medicine A cures 30% of patients (95% CI: 17 to 45).

Medicine B cures 15% of patients (95% CI: 10 to 20).

So I can divide 30% by 15% and say that medicine A is twice as likely to cure the patients compared to medicine B, right?

My question is: how would I make this same calculation for the confidence intervals?

I want to say that medicine A is twice as likely (95% CI: X to Y) to cure the patient as medicine B. Conceptually, do I just divide the CIs or is there something else to do?

You can use the Delta method to obtain an approximate distribution of your relative risk, as shown by that link. Then you can define a pivot and use this to obtain a CI.

I understand that there might be some confusion regarding the use of the Delta method, so here are a few simple steps that show how to construct an approximate CI for the relative risk.

1. Estimate the RR from the data
2. Find the natural log of RR: $\log(RR)$
3. The confidence coefficient is from the standard normal distribution: 1.96 for a 95% confidence interval

Now you need the standard error. Using the Delta method for sample sizes $n$ and $m$ with probabilities $p$ and $q$ respectively, this is found to be

$$SE=\sqrt{\frac{1-p}{pn}+\frac{1-q}{qm}}$$

Of course you need to replace the unknown quantities with your estimates, let's denote them by $\widehat{p}$ and $\widehat{q}$. You might notice that this is the second approximation we are using.

Now that you have the formula, compute the standard error: $SE$

1. Calculate the lower and upper limits on the log scale: $\log(RR) scale: \log(RR) ± 1.96 \times SE \log(RR)$

2. Exponentiate!

You can find plenty such information throughout the internet and the above steps are taken from here. We all have Fisher to thank for these approximations!

• There's also an R function for the delta method. May 20 '15 at 18:17
• @JeremyMiles I am sure there is. They are in the middle of constructing one that makes coffee too :P May 20 '15 at 18:17
• May 20 '15 at 18:18
• @Alexander Just in case you come by the need to use the Delta method again-and this is not very unlikely- I recommend studying it now. It's quite easy to use as it is mainly based on a third order Taylor expansion. I will look for the R-function as well. Let me just say that if you were a Bayesian you would be done by now :) May 20 '15 at 18:21
• @Alexander I have included some extra details in my answer that I believe illustrate how you can program R on your own. May 20 '15 at 18:34