I know that the logit function in logistic regression can be written two different ways:
$p = \frac{e^z}{1 + e^z}$
$p = \frac{1}{1 + e^{-z}}$
I'm weak on basic algebra and can't recall the steps in transforming the first equation into the second. Could someone walk me through the principles involved?
EDIT: Working out the solution provided by Dr. Sonnhard Graubner below:
$p = \frac{e^z}{1 + e^z} \cdot \frac{e^{-z}}{e^{-z}}$
Since $e^{-z} = \frac{1}{e^z}$ and $e^z \cdot \frac{1}{e^z} = \frac{e^z}{e^z} = 1$, therefore:
$p = \frac{1}{e^{-z}(1 + e^z)}$
Multiply out the denominator:
$p = \frac{1}{e^{-z} + 1} = \frac{1}{1 + e^{-z}}$
Hint: Multiply numerator and denominator by $$e^{-z}$$