Definition of relative risk (RR)
Let's call \(D\) a disease, and \(R\) a risc factor. Consider that
the probability of presenting the disease in those people having the risk factor
(for example smokers, high BMI, etc.) is \(P(D|R)\). For people that are not
at risk, this probability is \(P(D|\bar R)\). The relative risk (RR) is defined as:
$$RR=\frac{P(D|R)}{P(D|\bar R)}$$
IR RR>1 then the considered factor increments the probability of having the disease.
If RR=1, then the probability is not changed by this factor. If RR<1, then the
factor reduces the probability of the disease.
In practice, supose you have a group of \(n_1\) exposed people, and \(x_1\) of them
present the disease. In a group of \(n_2\) non-exposed people, we observe
\(x_2\) with the disease. Then the RR is computed as:
$$RR=\frac{x_1/n_1}{x_2/n_2}$$
Computing a CI for RR
In order to obtain a CI \((1-\alpha)\)%, we first calculate:
$$\sigma=\sqrt{\frac{1}{x_1}-\frac{1}{n_1}+\frac{1}{x_2}-\frac{1}{n_2}}$$
Then we compute:
$$(a,b) \rightarrow log(RR) \pm z_{1-\alpha/2}\times \sigma$$
Finally, the desired CI for the RR will be:
$$(e^a,e^b)$$
Example
Supose that we have 35 exposed and 45 non-exposed. The cases are 25 and 22 in each
group. Then:
$$p_1=25/35$$
$$p_2=22/45$$
$$\sigma=\sqrt{\frac{1}{25}-\frac{1}{35}+\frac{1}{22}-\frac{1}{45}}=0.186$$
$$(a,b) \rightarrow log((25/35)/(22/45)) \pm 1.96 \times 0.186 \rightarrow (0.01,0.74)$$
$$95\% CI \rightarrow (e^{0.01},e^{0.74}) \rightarrow (1.01,2.10)$$