Binary Outcomes &
Log-Odds
Learn how to transform probabilities into log-odds, interpret the logit function, and understand the mathematical backbone of logistic regression.
What Is a Binary Outcome?
A binary outcome is a variable that can take exactly two values: success or failure, yes or no, 1 or 0. In biostatistics, this is the most common type of response variable.
From Probability to Odds
If the probability of an event is \( p \), the odds of that event are defined as the ratio of success to failure:
For example, if \( p = 0.75 \), the odds are \( \frac{0.75}{0.25} = 3 \). This means the event is 3 times more likely to happen than not.
Introducing Log-Odds (the Logit)
The log-odds, also called the logit, is simply the natural logarithm of the odds. It transforms the bounded probability scale into an unrestricted one:
The Logit Function Visualized
The Inverse Logit: Back to Probability
Given a log-odds value, we can convert back to a probability using the logistic function (also called the inverse logit or sigmoid):
The Logistic Regression Model
In logistic regression, we model the log-odds of the outcome as a linear combination of predictors:
Interpreting \( \beta \) Coefficients
Each coefficient \( \beta_j \) has two interpretations depending on the scale you use:
Probability vs. Odds vs. Log-Odds
| Property | Probability | Odds | Log-Odds |
|---|---|---|---|
| Symbol | \( p \) | \( \frac{p}{1-p} \) | \( \ln\!\left(\frac{p}{1-p}\right) \) |
| Range | [0, 1] | [0, +∞) | (-∞, +∞) |
| At even chance | 0.5 | 1 | 0 |
| Linear model? | No | No | Yes |
| Symmetric? | No | No | Yes |
The Sigmoid Curve
How to Convert Between Scales
Example 1: Probability to Log-Odds
A medical test has a positive predictive value of \( p = 0.80 \). What are the odds and log-odds?
Example 2: Log-Odds to Probability
A logistic regression model gives a log-odds of \( -1.5 \) for a patient. What is their probability of disease?
Example 3: Interpreting an Odds Ratio
A study on heart disease finds that the coefficient for smoking status is \( \beta = 0.85 \). Interpret this result.
Common Mistakes to Avoid
Summary: Conversion Cheat Sheet
| From | To | Formula |
|---|---|---|
| Probability | Odds | \( \frac{p}{1-p} \) |
| Odds | Probability | \( \frac{\text{odds}}{1+\text{odds}} \) |
| Odds | Log-Odds | \( \ln(\text{odds}) \) |
| Log-Odds | Odds | \( e^{\text{logit}} \) |
| Coefficient \( \beta \) | Odds Ratio | \( e^{\beta} \) |
| Log-Odds | Probability | \( \frac{1}{1+e^{-\text{logit}}} \) |
Question 1 of 5
If \( p = 0.2 \), what is the log-odds (logit)?
Question 2 of 5
A logistic regression gives \( \text{log-odds} = 0 \) for a patient. What is the patient's probability?
Question 3 of 5
If a logistic regression coefficient \( \beta_1 = 1.1 \), what is the odds ratio?
Question 4 of 5
Which scale is symmetric around zero and spans \( (-\infty, +\infty) \)?
Question 5 of 5
A researcher says: "The coefficient \( \beta = 0.5 \) means the probability increases by \(0.5\) for every unit increase." What is wrong with this interpretation?