# Odds ratio and relative risk

I'm trying to understand how the odds ratio can approximate the relative risk under the rare disease assumption.

I'm given the relative risk for disease $B$ and risk factor $A$ is 2 and that 20% of the population has been exposed to the risk factor. Assuming the probability of having the disease among those without the risk factor is $d$, how do I express the odds ratio in terms of this $d$?

Using law of total probability, you can get $$P(B=1)=d(1-0.2)+2d \times 0.2 = 1.2d.$$
$$OR=\frac{P(B=1|A=1)/P(B=0|A=1)}{P(B=1|A=0)/P(B=0|A=0)} = RR \times \frac{P(B=0|A=0)}{P(B=0|A=1)} = 2 \frac{1-d}{1-2d}.$$
In general, $$P(B=1) = d(1-P(A=1))+dRRP(A=1)=d(1+(RR-1)P(A=1));\\ OR=RR\frac{1-d}{1-dRR}$$ If $P(B=1)$ close to 0, $d$ is close to 0. Then if $dRR$ is not large,$\frac{1-d}{1-dRR}$ is close to 1, RR and OR are approximately equal. However there are some extreme cases. For example, $RR=100,d=0.009,P(A=1)$ very small, then $OR=9.91RR$.
An intuitive way to understand this is to consider the basic definitions of odds and risk. Odds are simply the ratio of the number of events ($E$) to the number of non-events ($NE$) whereas risk is the the ratio of events to total events ($E+NE$). As an event becomes more rare, the number of non-events approaches the number of total events. Take a simple example:
The odds of this event are $E/NE$ while the risk is $E/(E+NE)$
It is easy to see that as an event gets rarer ($E$ approaches zero), odds and risk both approach the same value (zero), whereas, as the event gets more common ($NE$ approaches zero), they diverge (odds approaches infinity and risk approaches unity).