how to justify the logistic function is the inverse of the natural logit function?

4.4k Views Asked by At

per wiki

The logistic function is the inverse of the natural logit function

The standard logistic function looks like (equation_1)

$$ {\displaystyle {\begin{aligned} f(x)&={\frac {1}{1+e^{-x}}}={\frac {e^{x}}{e^{x}+1}}={\frac {1}{2}}+{\frac {1}{2}}\tanh({\frac {x}{2}})\\ \end{aligned}}} $$

the natural logit function looks like (equation_2)

$$logit(p) = \log\left(\dfrac{p}{1-p}\right)$$

how to justify equation_1 is the inverse of equation_2?

2

There are 2 best solutions below

0
On BEST ANSWER

let $y = logit(x) = log \dfrac{x}{1-x}$

$e^y = \dfrac{x}{1-x}$

$1 + e^y = \dfrac{1-x}{1-x} + \dfrac{x}{1-x} = \dfrac{1}{1-x}$

$\dfrac{1}{1 + e^y} = 1 - x$

$x = 1 - \dfrac{1}{1 + e^y} = \dfrac{e^y}{1 + e^y}$

0
On

just calculate $f\big(\operatorname{logit}(p)\big)=p$ and $\operatorname{logit}\big(f(x)\big)=x$; $$f\big(\operatorname{logit}(p)\big) = \frac{1}{1+e^{-\log\left(\frac{p}{1-p}\right)}}=\frac{1}{1+\frac{1-p}{p}}=\frac{1}{\frac{1}{p}}=p$$and$$\operatorname{logit}\big(f(x)\big)=\log\left(\frac{\frac{1}{1+e^{-x}}}{1-\frac{1}{1+e^{-x}}}\right)=\log\left(\frac{1}{1+e^{-x}-1}\right)=\log\left(e^x\right)=x.$$