In logistic regression, the odds represent the likelihood of an event occurring compared to it not occurring.

If $p$ is the probability of success (e.g., a positive outcome), the odds are calculated as:

$$ Odds = \frac{p}{1 - p} $$

For example, if the probability of success is 0.8, the odds are $\frac{0.8}{0.2} = 4$, meaning success is four times more likely than failure.

Log Odds (Logit Function)

Since odds are always positive and can grow exponentially, log odds (also called the logit function) transform them into a continuous scale that can take any real value:

$$ Log Odds = \log \left(\frac{p}{1 - p} \right) $$

Logistic regression models the relationship between predictor variables and the log odds of an outcome, making the response variable linear and suitable for regression analysis. The model equation is:

$$ \log \left(\frac{p}{1 - p} \right) = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \dots $$

Interpretation in Logistic Regression

Each coefficient ($β$) in the logistic regression model represents the change in log odds for a one-unit increase in the predictor variable. When exponentiated ($e^β$), the coefficient gives the odds ratio, indicating how much the odds of the event change for each unit increase in the predictor.

If an odds ratio is greater than 1, the predictor increases the likelihood of the outcome; if less than 1, it decreases it.

Example

Consider a logistic regression model predicting whether a student will pass an exam based on study hours. Suppose we get the following equation from our regression model:

$$ \log \left(\frac{p}{1-p}\right) = -2.5 + 0.8x $$

where x is the number of study hours.

We can interpret this as follows: