Logistic regression · OkCupid profiles, n = 59,826
One inch, three scales
Every OkCupid dating profile lists a height and a sex. In this set of 59,826 profiles, each person is listed as either male or female, and on average the men are several inches taller. Height alone is enough to guess which group a profile belongs to about 83% of the time.
We took that data and ran a logistic regression of sex on each person's stated height. The result is a single equation, but you can read its output in three ways: as log odds, as odds, or as a probability. Add one inch of height and each scale responds differently.
glm(male ~ height, family = binomial)
Here p = P(male) and height is in inches. That 0.66 is the whole story. Follow it through the three scales below.
Step 1
From height to probability in three moves
Plug a height into the equation and you get log odds. Exponentiate to get odds. Divide odds by one plus odds to get a probability. These are three descriptions of the same prediction.
Step 2
Now add one inch
Going from 5′7″ to 5′8″ …
Log odds: add 0.66, every time
constant · additiveOdds: multiply by 1.94, every time
constant · multiplicativee0.66 = 1.94. The amount added keeps growing, but the multiplier never changes.
Probability: neither
not constantStep 3
What each inch buys, from 60″ to 76″
Each bar is one inch of height. The two constant rows are flat, while the bottom two are not. Tap a bar to jump there.
Step 4
The full ledger
Read down the shaded columns: +0.66 on every row, ×1.94 on every row. The probability change rises to a peak near 67″ and falls off again.
| Height | Log odds | Change | Odds | Change | P(male) | Change |
|---|
Why
Why probability bends
The model is linear in log odds. One inch always adds β₁ = 0.66, the way a slope works in ordinary regression.
Odds = elog odds. Adding inside an exponent multiplies outside it: ea + 0.66 = ea × 1.94.
Probability has to stay between 0 and 1, so the same push in log odds moves it a lot near 50% and barely at all near 0% or 100%.
The size of a one-inch change in probability is close to the slope times p(1 − p):
That's the "divide by 4" rule. The steepest one-inch jump in P(male) is about 0.66 / 4 ≈ 16.5 points, and it happens near 67.2″, where the model is a coin flip. At 60″ or 76″ the same inch moves the probability by less than a point.
Values use the unrounded estimates (−44.449, 0.6619). At 69″ (5′9″) the model gives P(male) = 0.77.