Confidence Intervals for Odd's Ratio? I am an MBA Student and I am trying to understand how to calculate the Confidence Interval for an Odd's Ratio. Our professor gave us this link (https://www.ncbi.nlm.nih.gov/books/NBK431098/) which contains the formula for the Confidence Interval of the Odd's Ratio :

*

*Upper 95% CI = e ^ [ln(OR) + 1.96 sqrt(1/a + 1/b + 1/c + 1/d)]

*Lower 95% CI = e ^ [ln(OR) - 1.96 sqrt(1/a + 1/b + 1/c + 1/d)]

I tried to work out the same formula but I could not get the same answer. For example:
Suppose a "Treatment" results in "A" people "Dying" and "C" people "Surviving" - there are "n1" people who were given the treatment. And suppose the "Control" results in "B" people "Dying" and "D" people "Surviving" - there are "n2" people who were given the treatment.

*

*The Odd's Ratio = (a/c)/(b/d)

Since the Confidence Interval is related to the Variance, we need to find out the Variance of "(a/c)/(b/d)". In other words, what is VAR((a/c)/(b/d)). Using the laws of total variance, I think VAR((a/c)/(b/d)) = VAR(a/c) + VAR(b/d). And seeing that since these are basically proportions, I think that (based on the law of the variance of proportions):

*

*VAR(Odd's Ratio) =  VAR((a/c)/(b/d)) = VAR(a/c) + VAR(b/d) = [((a/c)(1-a/c))/n1] + [((b/d)(1-b/d))/n2]

But as we can see, my formula does not match the formula in the link.
Can someone help me out and show me what I might be doing incorrectly?

Here is the derivation using the delta method. Let's look at the familiar $2\times2$-Table below.

Suppose that $\theta = f(p_{11},p_{12},p_{21},p_{22})$ where $p_{ij}$ is defined as in the table above.
The Odds Ratio is defined as
$$
\theta=\mathrm{OR}=\dfrac{p_{11}p_{22}}{p_{21}p_{12}}
$$
We want to derive the variance of $\theta$. The multivariable version of the delta method is:
$$
\operatorname{Var}(\hat{\theta})\approx \nabla f(p_{11}, p_{12}, p_{21}, p_{22})\cdot \operatorname{Cov}(p_{11}, p_{12}, p_{21}, p_{22})\cdot \nabla f(p_{11}, p_{12}, p_{21}, p_{22})^{T}
$$
Where $\nabla$ is the gradient vector. That is:
$$
\nabla f(p_{11}, p_{12}, p_{21}, p_{22}) = \left(\frac{\partial f}{\partial\,p_{11}}, \ldots,\frac{\partial f}{\partial\,p_{22}}\right)
$$
We want to estimate
$$
\operatorname{Var}(\log(\mathrm{OR}))=\mathrm{Var}\left[\log\left(\frac{p_{11}p_{22}}{p_{21}p_{12}}\right)\right]
$$
Let the function $f$ be
$$
f = \left[\log(p_{11}) + \log(p_{22}) - \log(p_{21}) - \log(p_{21})\right]
$$
The gradient $\nabla f$ is
$$
\nabla f = \left(\frac{1}{p_{11}},-\frac{1}{p_{12}},-\frac{1}{p_{21}},\frac{1}{p_{22}}\right)
$$
The variance covariance matrix for a multinomial distribution with $c=4$ categories is
$$
\Sigma=\frac{1}{n}\left(
\begin{array}{cccc}
 \left(1-p_{11}\right) p_{11} & -p_{11} p_{12} & -p_{11} p_{21} & -p_{11} p_{22} \\
 -p_{11} p_{12} & \left(1-p_{12}\right) p_{12} & -p_{12} p_{21} & -p_{12} p_{22} \\
 -p_{11} p_{21} & -p_{12} p_{21} & \left(1-p_{21}\right) p_{21} & -p_{21} p_{22} \\
 -p_{11} p_{22} & -p_{12} p_{22} & -p_{21} p_{22} & \left(1-p_{22}\right) p_{22} \\
\end{array}
\right)
$$
Then $\nabla f\,\Sigma$ equals
$$
\nabla f\,\Sigma=\frac{1}{n}\times \left[1, -1, -1, 1\right]
$$
Now we need $(\nabla f\,\Sigma)\times \nabla f^{T}$ which equals:
$$
(\nabla f\,\Sigma)\times \nabla f^{T}=\frac{1}{n}\times \left[\frac{1}{p_{11}} +\frac{1}{p_{12}}+\frac{1}{p_{21}}+\frac{1}{p_{22}}\right]
$$
Substituting the MLEs for $\widehat{p_{ij}}=n_{ij}/n$ finally yields
$$
\widehat{\operatorname{Var}(\log(\operatorname{OR})}=\frac{1}{n_{11}}+\frac{1}{n_{12}}+\frac{1}{n_{21}}+\frac{1}{n_{22}}
$$
So the approximative standard error for the relative risk on the log-scale is
$$
\widehat{\operatorname{SE}(\log(\operatorname{OR})}=\sqrt{\widehat{\operatorname{Var}(\log(\operatorname{OR})}}=\sqrt{\frac{1}{n_{11}}+\frac{1}{n_{12}}+\frac{1}{n_{21}}+\frac{1}{n_{22}}}
$$
So an approximative two-sided confidence interval of level $\alpha$ for the relative risk on the original scale is
$$
\mathrm{CI}=\exp(\log(\operatorname{OR})\pm z_{1-\alpha/2}\times \operatorname{SE}(\log(\operatorname{OR}))
$$
