The odds ratio (OR) (razón de monomio, in Spanish) is a relative index.
OR compares the odds from two groups.
As odds are always positive, an odds ratio is always positive.
The odds of a proportion is the quotient of the complementary proportions. It is represented as \(o\).
$$o = \frac{\pi}{1-\pi}$$
Odds of a random variable:
$$o_{X=1} = \frac{\pi_{11}}{1 – \pi_{11}} = \frac{P(Y = 1 \mid X = 1)}{1 – P(Y = 1 \mid X = 1)}$$
$$o_{X=0} = \frac{\pi_{10}}{1 – \pi_{10}} = \frac{P(Y = 1 \mid X = 0)}{1 – P(Y = 1 \mid X = 0)}$$
Odds ratio definition:
$$or_X = \frac{o_{X=1}}{o_{X=0}} = \frac{\frac{\pi_{11}}{1 – \pi_{11}}}{\frac{\pi_{10}}{1 – \pi_{10}}} = \frac{\frac{P(Y=1 \mid X=1)}{1 – P(Y=1 \mid X=1)}}{\frac{P(Y=1 \mid X=0)}{1 – P(Y=1 \mid X=0)}}$$
$$or_Y = \frac{o_{Y=1}}{o_{Y=0}} = \frac{\frac{\pi’_{11}}{1 – \pi’_{11}}}{\frac{\pi’_{10}}{1 – \pi’_{10}}} = \frac{\frac{P(X=1 \mid Y=1)}{1 – P(X=1 \mid Y=1)}}{\frac{P(X=1 \mid Y=0)}{1 – P(X=1 \mid Y=0)}}$$
Theoretical confidence interval:
$$IC(1 – \alpha)\% (\ln(or)) = \left( \widehat{E}[\ln(\widehat{OR})] \mp z_{1 – \alpha/2} \widehat{EE}[\ln(\widehat{OR})] \right)$$
where
$$\widehat{E}[\ln(\widehat{OR})] = \ln(or) = \ln\left( \frac{ad}{bc} \right)$$
and
$$\widehat{EE}[\ln(\widehat{OR})] = \sqrt{\frac{1}{a} + \frac{1}{b} + \frac{1}{c} + \frac{1}{d}}$$
Confidence interval:
$$IC(1 – \alpha)\% (or) = \left( \exp \left( \ln \left( \frac{ad}{bc} \right) \mp z_{1 – \alpha/2}
\sqrt{ \frac{1}{a} + \frac{1}{b} + \frac{1}{c} + \frac{1}{d} } \right) \right)$$
Hypothesis test formulation:
$$H_0: or = 1$$
$$H_1: or \ne 1$$
It can be calculated with the z-test of difference of proportions, Fisher’s t test or chi-squared test.
Logit transformation:
$$h(\pi)=\text{logit}(\pi)=Ln(\frac{\pi}{1-\pi})$$
Bibliography
References:
- Odds ratio [online]. Wikipedia. Available at: https://en.wikipedia.org/wiki/Odds_ratio
Related entries
Instance of:
- Relative risk