Lesson 4.2 · 9 min read · about 50 min to master at a very slow pace
Odds, Log-odds and the Sigmoid Function
Probability, odds and log-odds are three views of the same thing. How to convert between them by hand, and how the sigmoid function squashes any score into a probability.
Odds: betting language
gives odds of : "3 to 1 in favour". is odds 1 (even money). is odds 0.25 ("1 to 4"). Odds run from 0 to .
Log-odds (the logit)
Taking the log stretches odds over the whole real line, which is perfect for a linear model: any value of is a valid log-odds.
| Probability | Odds | Log-odds |
|---|---|---|
| 0.10 | 0.111 | −2.20 |
| 0.20 | 0.25 | −1.39 |
| 0.50 | 1 | 0 |
| 0.75 | 3 | 1.10 |
| 0.80 | 4 | 1.39 |
| 0.90 | 9 | 2.20 |
Notice the symmetry: and have log-odds of equal size and opposite sign.
The sigmoid: back from score to probability
The inverse of the logit is the logistic (sigmoid) function:
Conversions you must be able to do
Probability → odds → log-odds: odds .
Log-odds → probability: odds . Equivalently .
Handy values: , , , , .
Cheatsheet
Odds & log-odds
Sigmoid
Check your understanding
Score 75% or more to master this lesson and earn XP. Answer first, then check.