1
$\begingroup$

$$Log(Odds) = log({p \over (1-p)}) $$

$${p \over (1-p)} = e^{b+b_1x_1+....}$$

I understand up to here, however how does this:

$$p = (1-p) e^{b+b_1x_1+...}$$

become:

$$ p = {1 \over {1+e^{-(b+b_1x_1+...)}}}$$

Can someone explain last two steps?

$\endgroup$
1
$\begingroup$

We have, $p = (1 - p)e^{b + b_1x_1 + \ldots}$

Let $y= {b + b_1x_1 + \ldots}$

So, $p = (1 - p)e^y$

or, $p = e^y - pe^y$

or, $p+pe^y = e^y$

or, $p(1+e^y) = e^y$

or, $p = e^y/(1+e^y)$

or, $p = 1/(e^{-y}+1)$ (Dividing both denominator and numerator by $e^y$ on the RHS)

or, $p = 1/(e^{-{b + b_1x_1 + \ldots}}+1)$

or, $p = 1/(1+e^{-{b + b_1x_1 + \ldots}})$

Let me know if you have any doubts.

$\endgroup$
3
  • $\begingroup$ How do we get $p(1-e^{y})$ ? as @Linxing Yao derived on RHS? $\endgroup$
    – haneulkim
    Oct 18 at 9:58
  • $\begingroup$ That should be $p(1+e^y)$. I think he has made a silly mistake there. Did you understand my answer @haneulkim? $\endgroup$ Oct 18 at 10:04
  • $\begingroup$ Yes, this is perfect. Thanks :) $\endgroup$
    – haneulkim
    Oct 19 at 0:54
1
$\begingroup$

$p = (1 - p)e^{b + b_1x_1 + \ldots}$, then $p(1 + e^{b + b_1x_1 + \ldots}) = e^{b + b_1x_1 + \ldots}$, thus \begin{align} p &= \frac{e^{b + b_1x_1 + \ldots}}{1 + e^{b + b_1x_1 + \ldots}} \\ &= \frac{1}{1 + e^{-(b + b_1x_1 + \ldots)}} \end{align}

$\endgroup$
3
  • $\begingroup$ could you elaborate formula between then and thus? $\endgroup$
    – haneulkim
    Oct 18 at 3:48
  • $\begingroup$ you can move the same factor p to the left side, it transits my first equation to the my second equation. $\endgroup$ Oct 18 at 4:53
  • $\begingroup$ let $y = b+b_1x_1+...$I'm confused about how $p = (1-p)e^{y}$ becomes $p(1-e^{y}) = e^{y}$. $\endgroup$
    – haneulkim
    Oct 18 at 5:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.