Logistic regression · OkCupid profiles, n = 59,826
Where 1.94 comes from
We ran a logistic regression of sex on stated height and got a slope of 0.66. The usual interpretation is that each extra inch multiplies the odds of being male by e0.66 = 1.94. This page shows why the exponential appears, and why the answer is the same at every height.
Step 1
First, check that it's true
Pick any height. Compute the odds there and one inch higher, then divide. Move the slider and watch the ratio.
The odds themselves change a lot, from under 0.01 at 60″ to about 180 at 75″. The ratio never moves. The algebra below shows why.
Step 2
The derivation, one line at a time
Call the log odds at your starting height A. It holds everything about where you start: the intercept and your height. Watch what happens to it.
-
Write the odds at both heights
odds(h) = e−44.45 + 0.66·h odds(h + 1) = e−44.45 + 0.66·(h + 1)Odds are e raised to the log odds. That's just undoing the log on the left side of the model. -
Split the new exponent into "old" plus "extra"
−44.45 + 0.66·(h + 1) = (−44.45 + 0.66·h) + 0.66 = A + 0.66Distribute the 0.66 across (h + 1). The part in purple is exactly the old log odds, A. One more inch adds 0.66 on the log-odds scale, and nothing else. -
Adding in an exponent means multiplying outside it
odds(h + 1) = eA + 0.66 = eA × e0.66This is the exponent rule ea + b = ea × eb. It's the same rule as 23 × 22 = 25, which is 8 × 4 = 32. And eA is just the old odds. -
Divide new odds by old odds
odds(h + 1)odds(h) = eA × e0.66eAA ratio asks "how many times bigger?", which is the natural question once the change is a multiplication. -
The starting point cancels
eA × e0.66eA = e0.66 = 1.94eA is on the top and the bottom, so it divides out. Everything about where you started is gone: the intercept, your height, your starting odds. Only the coefficient is left, which is why the multiplier is the same at every height.
Step 3
See it on a slide rule
Here are three scales lined up. Height is evenly spaced and so is log odds, because log odds is a straight line in height. The odds scale is logarithmic: 0.01, 0.1, 1, 10 and 100 sit at equal distances, so equal distances mean equal ratios.
Drag the orange band. Its width is a fixed number of inches, so on the middle scale it always spans the same amount of log odds. On the bottom scale, the same width is always the same multiplication.
Taking the log turns multiplication into addition, so a fixed step on the log scale is a fixed ratio on the original scale. Logistic regression is linear on the log-odds scale, which means it's multiplicative on the odds scale.
Step 4
More than one inch: the multipliers stack
Two inches add 0.66 twice in the log odds, so the odds get multiplied by 1.94 twice. In general, k inches give e0.66·k = 1.94k. It compounds like interest.
| Inches | Added to log odds | Odds multiplier | Percent change in odds |
|---|
One check: e0.66×2 = e1.32 = 3.76, the same as 1.94 × 1.94. You can't get that by adding. Two inches don't add 0.94 + 0.94 = 188% to the odds. They add 276%.