# Cumulative Distribution Function of Logistic Distribution.

pdf of logistic distribution is :

$$p_X(x)=\frac{\pi}{\sigma\sqrt 3}\frac{\exp[\frac{-\pi(x-\mu)}{\sigma\sqrt3}]}{(1+\exp[\frac{-\pi(x-\mu)}{\sigma\sqrt3}])^2};\quad-\infty<x<\infty$$

I have to compute the cdf:

$F_X(x)=\int_{-\infty}^{x}\frac{\pi}{\sigma\sqrt 3}\frac{\exp[\frac{-\pi(x-\mu)}{\sigma\sqrt3}]}{(1+\exp[\frac{-\pi(x-\mu)}{\sigma\sqrt3}])^2}dx$

let $u=1+\exp[\frac{-\pi(x-\mu)}{\sigma\sqrt3}]$

$\Rightarrow\exp[\frac{-\pi(x-\mu)}{\sigma\sqrt3}]=u-1$

$\Rightarrow\frac{-\pi(x-\mu)}{\sigma\sqrt3}=\ln(u-1)$

### but isn't $\ln(u-1)=\frac{\ln(u)}{\ln1}=\frac{\ln(u)}{0}=\infty$?

so i again considered

let $u=\exp[\frac{-\pi(x-\mu)}{\sigma\sqrt3}]$

$\Rightarrow\exp[\frac{-\pi(x-\mu)}{\sigma\sqrt3}]=u$

$\Rightarrow\frac{-\pi(x-\mu)}{\sigma\sqrt3}=\ln(u)$

$\Rightarrow x=\mu+\frac{\sigma\sqrt3}{-\pi}\ln(u)$

so

$dx=\frac{\sigma\sqrt3}{-\pi}\frac{1}{u}du$

As $x\to-\infty,u\to\infty$

As $x\to\infty,u\to0$

so

$F_X(x)=\int_{\infty}^{0}\frac{\pi}{\sigma\sqrt 3}\frac{u}{(1+u)^2}\frac{\sigma\sqrt3}{-\pi}\frac{1}{u}du=-\int_{\infty}^{0}\frac{1}{(1+u)^2}du=\int_{0}^{\infty}\frac{1}{(1+u)^2}du=-\int_{0}^{\infty}\frac{1}{(1+u)}=-[\frac{1}{(1+u)}]_0^{\infty}=-[\frac{1}{(1+\infty)}-\frac{1}{(1+0)}]=-[0-1]=1$

But the cdf is :

$$F_X(x)=\frac{1}{1+\exp[\frac{-\pi(x-\mu)}{\sigma\sqrt3}]};\quad-\infty<x<\infty$$

-
I noticed you set $ln(u-1) = ln(u) /ln(1)$, this is not true. I think you were reffering to the property $ln(x/y) = ln(x) - ln(y)$, this might be of some help. –  Rogelio Molina Sep 10 '13 at 9:56
@RogelioMolina $ln(x/y)=ln(x)-ln(y)$ . But is that the inverse wrong,ie, $ln(x)-ln(y)\neq ln(x/y)$ ? –  harry Sep 10 '13 at 10:00
no, actually both equations you wrote above are the same and their are both correct. What I meant is that $ln(x/y)$ is not the same thing as $ln(x)/ln(y)$ nor $ln(x-y)$ is the same as $ln(x)-ln(y)$ (this is because the logarithm is not a linear function). The identity I pointed out involves $ln(x/y)$ and $ln(x)-ln(y)$, not the other two. Below there is a calculation of the integral. –  Rogelio Molina Sep 11 '13 at 10:14

Begin with the change of variable you proposed: $$u = 1+ exp[-\frac{\pi(x-\mu)}{\sigma \sqrt{3}}]$$ and the integral you want to compute, as a function of ,say, $y$ is:

$$F(y) = \int_{-\infty}^y \frac{\pi}{\sigma \sqrt{3}} \frac{ exp[-\frac{\pi(x-\mu)}{\sigma \sqrt{3}}] }{\left( 1+ exp[-\frac{\pi(x-\mu)}{\sigma \sqrt{3}}] \right)^2} dx$$

If we call $w = 1 + exp[-\frac{\pi(y-\mu)}{\sigma \sqrt{3}}]$, the limits of integration after the change of variables are $-\infty \to \infty$ and $y \to w$, after the change of variables we have then:

$$F(y) = \int_{\infty}^{w}(-1)\frac{(u-1)}{u^2 (u-1)}du = \int_{w}^{\infty} \frac{du}{u^2} = \frac{1}{w}$$, this is precisely

$$F(y) = \frac{1}{ 1 + exp[-\frac{\pi(y-\mu)}{\sigma \sqrt{3}}]}$$

-
Could you please explain how to get the $dx$ in terms of $du$ ? –  harry Sep 12 '13 at 0:44
Sure, since $u = 1 + exp[-\frac{\pi(x-\mu)}{\sigma \sqrt{3}}]$ then $du = d\left( 1 + exp[-\frac{\pi(x-\mu)}{\sigma \sqrt{3}}] \right) = d exp[-\frac{\pi(x-\mu)}{\sigma \sqrt{3}}]$, now use the formula for the differential of an exponential: $d exp[a(x-b)] = a exp[a(x-b)] dx$ (basically notice that $b$ does nothing because it is a multiplicative constant overall the expression) hence $du = - \frac{\pi}{\sigma \sqrt{3}} exp[-\frac{\pi(x-\mu)}{\sigma \sqrt{3}}] dx$ and this can be rewritten as $\frac{\pi}{\sigma \sqrt{3}}dx = - \frac{1}{u-1}du$ –  Rogelio Molina Sep 12 '13 at 2:46