Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I was reading a paper regarding using a logistic regression to predict an outcome of interest. In the paper the logit is given as

logit(p) = log[p/1-p] = b0 + b1*x1 + .... + bn*xn => Which is fine

but then p is given as

p = 1/exp[-(b0 + b1*x1 + .... bn*xn)] => Which I don't understand.

It should be p = 1/(1 + exp[-(b0 + b1*x1 + .... + bn*xn)]), then the probability will be between 0 and 1, right?

Thank you for your time.

--

share|improve this question

1 Answer 1

up vote 0 down vote accepted

If $\ell = \log \frac{p}{1-p}$ then $\ell = \log\left(-1 + \frac{1}{1-p}\right)$. The advantage of this last way of writing it is that $p$ only appears once. So just invert step-by-step: $$ \begin{align} e^\ell & = -1 + \frac{1}{1-p} \\ 1 + e^\ell & = \frac{1}{1-p} \\ \frac{1}{1+e^\ell} & = 1-p \\ p & = 1 - \frac{1}{1+e^\ell} = \frac{(1+e^\ell) - 1}{1+e^\ell} = \frac{e^\ell}{1+e^\ell} \end{align} $$ Multiplying the numerator and denominator both by $e^{-\ell}$ yields: $$ p = \frac{1}{e^{-\ell}+1}. $$ Now put the appropriate expression in place of $\ell$.

So your answer is right and the one that was "given" is not.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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