01

What the logit and its inverse do

A probability lives between 0 and 1, which makes it awkward to use as the output of a linear model — a straight line will eventually predict 1.4 or −0.3. The logit solves that by stretching the interval (0, 1) onto the entire real line.

The pairlogit(p) = ln(p / (1 − p))
logit⁻¹(x) = 1 / (1 + e^(−x))

The first expression is the log of the odds. The second, usually called the logistic function or sigmoid, is its inverse: feed it any real number and it returns a probability, never exactly 0 or 1.

  • p = 0.5 ↔ x = 0 — even odds.
  • p = 0.731 ↔ x = 1 — odds of about 2.72 to 1.
  • p → 0 sends x → −∞; p → 1 sends x → +∞.
02

Odds, probability and log-odds

Three ways of saying the same thing, and mixing them up is the usual source of error. Probability is successes over total; odds are successes over failures; log-odds are the natural logarithm of the odds.

The same information, three scales
ProbabilityOddsLog-odds
0.100.111−2.197
0.250.333−1.099
0.501.0000.000
0.753.0001.099
0.909.0002.197
0.9999.0004.595

Notice the symmetry: probabilities 0.1 and 0.9 give log-odds of equal magnitude and opposite sign. That symmetry is exactly what makes logistic regression coefficients interpretable as additive effects.

03

Why logistic regression uses it

A logistic regression models log-odds as a linear combination of predictors: ln(p/(1−p)) = β₀ + β₁x₁ + … Because the right-hand side can take any value, the left-hand side must be allowed to as well — and log-odds can. Probabilities cannot.

A coefficient of 0.7 means each one-unit increase in the predictor adds 0.7 to the log-odds, which multiplies the odds by e^0.7 ≈ 2.01. That multiplicative reading on the odds scale is the practical reason log-odds are preferred to raw probabilities.

The sigmoid is not a probability density. It maps numbers to probabilities, but it is not itself a distribution. The area under the sigmoid curve is infinite, which is why it never appears as a PDF.

04

Pitfalls

  • Entering p = 0 or p = 1. The log-odds are infinite there. In practice software adds a small correction, but the honest answer is that the value is undefined.
  • Reading log-odds as probabilities. A log-odds of 2.2 is p = 0.90, not 2.2% and not 90% odds.
  • Forgetting the base. The logit uses natural logarithms. Using log₁₀ changes every number by a constant factor of about 2.303.
05

Reading the odds ratio

A log-odds difference of 0.693 corresponds to an odds ratio of 2, because e^0.693 = 2. That single conversion is what makes logistic regression coefficients interpretable.

Log-odds to odds ratio
Log-oddsOdds ratioReading
01.00No effect
0.6932.00Doubles the odds
1.0993.00Triples the odds
−0.6930.50Halves the odds
2.30310.0Ten times the odds

Odds ratios are not probability ratios, and confusing the two exaggerates effects. An odds ratio of 2 on a baseline probability of 0.5 raises it to 0.67, not to 1.0 — a difference that matters when the effect is reported to a non-specialist audience.

?

Frequently asked questions

What is logit⁻¹(0)?

0.5. A log-odds of zero means the odds are 1:1, which is an even chance.

What is the difference between logit and inverse logit?

They are the same function run in opposite directions. logit takes a probability and returns log-odds; the inverse takes log-odds and returns a probability.

Why can't I enter a probability of 0 or 1?

Because the log-odds would be infinite. A probability of exactly 0 or 1 means the event is impossible or certain, and no finite evidence value corresponds to that.

Is the inverse logit the same as the sigmoid?

Yes. The logistic function, the sigmoid and the inverse logit are three names for 1/(1 + e^(−x)).

How do I interpret a logistic regression coefficient?

Exponentiate it to get an odds ratio. A coefficient of 0.7 gives e^0.7 ≈ 2.01, meaning the odds roughly double for each unit increase in that predictor.