# Why use odds and not probability in logistic regression?

Why would we use odds instead of probabilities when performing logistic regression?

## 2 Answers

The advantage is that the odds defined on $(0,\infty)$ map to log-odds on $(-\infty, \infty)$, while this is not the case of probabilities. As a result, you can use regression equations like $$\log \left(\frac{p_i}{1-p_i}\right) = \beta_0 + \sum_{j=1}^J \beta_j x_{ij}$$ for the log-odds without any problem (i.e. for any value of the regression coefficients and covariates a valid value for the odds are predicted). You would need extremely complicated multi-dimensional constraints on the regression coefficients $\beta_0,\beta_1,\ldots$, if you wanted to do the same for the log probability (and of course this would not work in a straightforward way for the untransformed probability or odds, either). As a consequence you get effects like being unable to have a constant risk ratio across all baseline probabilities (some risk ratios would result in probabilities > 1), while this is not an issue with an odds-ratio.

• I would just add to this excellent answer that with logged probabilities the maximum value can be log(1)=0. Whereas with logged odds we need not be bound to that. e.g. log (0.99/(1-0.99)) would well exceed 0. I know this point has been raised in the answer but I thought illustrating with an example would help novices such as myself – Sazid Ahmad Dec 4 '20 at 1:43

The odds is the expected number of "successes" per "failure", so it can take values less than one, one or more than one, but negative values won't make sense; you can have 3 successes per failure, but -3 successes per failure does not make sense. The logarithm of an odds can take any positive or negative value. Logistic regression is a linear model for the log(odds). This works because the log(odds) can take any positive or negative number, so a linear model won't lead to impossible predictions. We can do a linear model for the probability, a linear probability model, but that can lead to impossible predictions as a probability must remain between 0 and 1.