# Does the "divide by 4 rule" give the upper bound marginal effect?

In the logisitic regression chapter of "Data Analysis Using Regression and Multilevel/Hierarchical Models" by Gelman and Hill, The "Divide by 4" rule is presented to approximate average marginal effects. Essentially, dividing the estimated log-odds ratio gives the maximum slope (or the maximum change in probabilities) of the logistic function. Since the text above states that the "divide by 4 rule" gives the maximum change in $$P(y=1)$$ with a unit change in x, why is the estimated 8% less than the 13% calculated from actually taking the derivative of the logistic function in the example given?

Does the "divide by 4 rule" actually give the upper bound marginal effect?

Other "divide by 4" resources:

• Your question seems to come down to asking why the maximum slope of the logistic function occurs at $x=0.$ Is that really what you are after?
– whuber
Jul 3, 2019 at 19:11
• @whuber I think they understand that part... I think they are asking why the estimated maximum marginal effect is beta/4 = 0.08 yet the text suggests that the actual derivative = 0.13. Jul 3, 2019 at 19:14
• @whuber I guess I'm trying to reconcile the explanation with the example in the text. It looks like the number given by the rule of 4 (8%) is not the maximum because it is smaller than the 13% calculated by taking the derivative. Jul 3, 2019 at 19:15
• Isn't that the very meaning of maximum: everything else is smaller??
– whuber
Jul 3, 2019 at 19:40
• I see what you are saying--I misread the quotation.
– whuber
Jul 3, 2019 at 21:36

I think it's a typo.

The derivative of the logistic curve with respect to $$x$$ is: $$\frac{\beta\mathrm{e}^{\alpha + \beta x}}{\left(1 + \mathrm{e}^{\alpha + \beta x}\right)^{2}}$$

So for their example where $$\alpha = -1.40, \beta = 0.33$$ it is: $$\frac{0.33\mathrm{e}^{-1.40 + 0.33 x}}{\left(1 + \mathrm{e}^{-1.40 + 0.33 x}\right)^{2}}$$ Evaluated at the mean $$\bar{x}=3.1$$ gives: $$\frac{0.33\mathrm{e}^{-1.40 + 0.33 \cdot 3.1}}{\left(1 + \mathrm{e}^{-1.40 + 0.33\cdot 3.1}\right)^{2}} = 0.0796367$$ This result is very close to the maximum slope of $$0.33/4 = 0.0825$$ which is attained at $$x=-\frac{\alpha}{\beta}=4.24$$, supporting their claim.

On page 82, they write But $$0.33\mathrm{e}^{-0.39}/\left(1+\mathrm{e}^{-0.39}\right)^{2}\neq 0.13$$. Instead, it's around $$0.08$$, as shown above.

• Cool. I think you're right. That makes a lot more sense. I wonder if it has been corrected in a newer edition. Jul 8, 2019 at 19:57

For a continuous variable $$x$$, the marginal effect of $$x$$ in a logit model is

$$\Lambda(\alpha + \beta x)\cdot \left[1-\Lambda(\alpha + \beta x)\right]\cdot\beta = p \cdot (1 - p) \cdot \beta,$$ where the inverse logit function $$\Lambda$$ is $$\Lambda(z)=\frac{\exp{z}}{1+\exp{z}}.$$

Here $$p$$ is a probability, so the factor $$p\cdot (1-p)$$ is maximized when $$p=0.5$$ at $$0.25$$, which is where the $$\frac{1}{4}$$ comes from. Multiplying by the coefficient gives you the upper bound on the marginal effect. Here it is

$$0.25\cdot0.33 =0.0825.$$

Calculating the marginal effect at the mean income yields,

$$\mathbf{invlogit}(-1.40 + 0.33 \cdot 3.1)\cdot \left(1-\mathbf{invlogit}(-1.40 + 0.33 \cdot3.1)\right)\cdot 0.33 = 0.07963666$$

These are pretty close, with the approximate maximum marginal effect bounding the marginal effect at the mean.