I am trying to understand the math behind Logistic regression. I am confused about transposing one formula to another.
Here is what I have: Our regression formula $$\ y = b_0 + b_1x$$
Our sigmoid function
$$\ p = \frac{1}{1+e^{-y}}$$
Our logistic function
$$\ ln(\frac{p}{1-p}) = b_0 + b_1x$$
From what I understand, we have to solve for y using the sigmoid function. I did this:
- $$\ p = \frac{1}{1+e^{-y}}$$
- $$\frac{1}{p} = 1+e^{-y}$$
- $$\frac{1}{p}-1 = e^{-y}$$
- $$\ln(\frac{1}{p}-1) = ln(e^{-y})$$
- $$\ln(\frac{1}{p}-1) = -y$$
- $$\ -ln(\frac{1}{p}-1) = y$$ 6 is y for our logistic function, but I don't see how can we get to our logistic function y $$\ ln(\frac{p}{1-p})$$
Can anyone help me transpose this or point me in the right direction?
If anyone downvotes me, please explain why in a comment.
$$-\log (\frac1p-1)=-\log(\frac{1-p}{p})=\log(\frac{p}{1-p})$$