# Why odds ratio in logistic regression

I'm a bit confused about odds ratio in logistic regression (LR). In a logistic regression textbook (pdf), it says that the odds ratio (OR) is $OR = \exp(\beta_0 + \beta_1X)$. But, I don't understand how the $\exp(\beta)$ is linked with the odds ratio.

This is my intuition about LR. The equation of the LR is: \begin{align} \ln\bigg(\frac{p}{1-p}\bigg) &= \beta_0 + \beta_1X \\[5pt] &\quad\text{or} \\[5pt] \frac{p}{1-p} &= \exp(\beta_0 + \beta_1X) \end{align} Suppose that $p$ is the probability of winning a lottery, $\frac{p}{1-p}$ is then the odds of winning the lottery. Therefore, ${\rm Odds}_{{\rm win}} = \exp(\beta_0 + \beta_1X)$. So can anyone explain how it is then linked to the OR?

You are right. If the book said that, it is wrong. I do wonder if it is a typo or a poorly phrased passage that lends itself to misunderstanding, though. As you show, $$\exp(\beta_0 + \beta_1X)$$ is the odds of 'success' predicted by the model. The odds ratio associated with a $$1$$-unit change in $$X$$ is $$\exp(\beta)$$. You can also think of is as the factor by which you would multiply the odds of 'success' associated with $$x_i$$ to get the odds associated with $$(x_i + 1)$$ (these are the same, phrased differently).
Since $$p$$ is the probability of success, $$p/(1-p)$$ is the odds of success by definition. Imagine $$X=0$$, then the right hand side simplifies to $$\exp(\beta_0)$$, but the left hand side is unchanged. Thus we can see that $$\exp(\beta_0)$$ is the odds of success when $$X=0$$. Now imagine we move to where $$X=1$$, then we can rewrite the RHS as $$\exp(\beta_0)\times\exp(\beta_1)$$ using the rules for exponentiation. Thus we can see that $$\exp(\beta_1)$$ is the factor by which you would multiply the odds of success to determine the odds of success associated with a $$1$$-unit increase in $$X$$.
• Aha, I think it is my wrong interpretation. I thought $\exp(B)$ is for the whole term i.e. $\beta_0 + \beta_1X$. So based on what you answer, the result of the equation is the odds and the exponential of the coefficient is the OR. Is this correct? – user1480478 Mar 17 '17 at 18:15
• @user1480478, that's the gist of it: $\exp(\beta)$ is the odds ratio when holding all else constant. – gung - Reinstate Monica Mar 17 '17 at 18:18
• Thank you so much I totally got it now from what you edited. Say odds of success given X=0 is $\exp(\beta)$ and the odds of success given X = 1 is $\exp(\beta) * \exp(\beta_1)$. Then the odds ratio of success to failure given the factor X is $\frac{\exp(\beta) * \exp(\beta_1)}{\exp(\beta)}$ which is equal $\exp(\beta_1)$. Now that is my linkage from odds to odds ratio! – user1480478 Mar 17 '17 at 18:35