The logistic distribution has been used for various growth models, and is used in a certain type of regression, known appropriately as logistic regression.

Show that the function $F$ given below is a distribution function.

$$F(x)=\frac{e^{x}}{1+e^{x}}\text{,\hspace{1em}}x\in \mathbb{R}$$The distribution defined by the function in Exercise 1 is called the (standard) logistic distribution.

Show that the probability density function $f$ of the logistic distribution is given by

$$f(x)=\frac{e^{x}}{(1+e^{x})^{2}}\text{,\hspace{1em}}x\in \mathbb{R}$$Sketch the graph of the logistic density function $f$. In particular, show that

- $f$ is symmetric about $x=0$.
- $f$ is increasing on $\left(-\infty , 0\right)$ and decreasing on $\left(0 , \infty \right)$. Thus, the mode occurs at $x=0$

In the random variable experiment, select the logistic distribution. Note the shape and location of the density function. Run the simulation 1000 times with an update frequency of 10 and note the apparent convergence of the empirical density to the true density.

Show that the quantile function is

$$F^{(-1)}(p)=\ln \left(\frac{p}{1-p}\right)\text{,\hspace{1em}}p\in \left(0 , 1\right)$$Recall that $(p, 1-p)$ are the odds in favor of an event with probability $p$. Thus, the logistic distribution has the interesting property that the quantiles are the logarithms of the corresponding odds ratios. Indeed, this function of $p$ is sometimes called the logit function. Note that, by symmetry, the median of the logistic distribution is 0.

Find the first and third quartiles of the logistic distribution and compute the interquartile range.

In the quantile applet, select the logistic distribution. Note the shape and location of the density function and the distribution function. Find the quantiles of order 0.1 and 0.9.

The moment generating function of the logistic distribution has a simple representation in terms of the beta function, and hence also in terms of the gamma function. The moment generating function, in turn, can be used to compute the mean and variance.

Show that the moment generating function can be written in terms of the beta function and in terms of the gamma function, as follows:

$$M(t)=(1+t, 1-t)=(1+t)(1-t)\text{,\hspace{1em}}-1< t< 1$$*Hint*: In the integral for
$M(t)$,
make the substitution
$u=\frac{1}{1+e^{x}}$.

Suppose that $X$ has the logistic distribution. Show that

- $(X)=0$
- $\sigma(X)^2=\frac{\pi ^{2}}{3}$

In the random variable experiment, select the logistic distribution. Note the shape and location of the mean/standard deviation bar. Run the simulation 1000 times with an update frequency of 10 and note the apparent convergence of the empirical moments to the true moments.

The general logistic distribution is the location-scale family associated with the standard logistic distribution. Thus, if $Z$ has the standard logistic distribution, then for any $a\in \mathbb{R}$ and any $b> 0$,

$$X=a+bZ$$has the logistic distribution with location parameter $a$ and scale parameter $b$. Analogies of the results above for the general logistic distribution follow easily from basic properties of the location-scale transformation.

Show that the probability density function is

$$f(x)=\frac{e^{\frac{x-a}{b}}}{b(1+e^{\frac{x-a}{b}})^{2}}\text{,\hspace{1em}}x\in \mathbb{R}$$Sketch the graph of the probability density function $f$. In particular, show that

- $f$ is symmetric about $x=a$.
- $f$ is increasing on $\left(-\infty , a\right)$ and decreasing on $\left(a , \infty \right)$. Thus, the mode occurs at $x=a$

Show that the distribution function is

$$F(x)=\frac{e^{\frac{x-a}{b}}}{1+e^{\frac{x-a}{b}}}\text{,\hspace{1em}}x\in \mathbb{R}$$Show that the quantile function is

$$f^{(-1)}(p)=a+b\ln \left(\frac{p}{1-p}\right)\text{,\hspace{1em}}p\in \left(0 , 1\right)$$In particular, the median occurs at $x=a$.

Show that the moment generating function is

$$M(t)=e^{at}(1+bt, 1-bt)=e^{at}(1+bt)(1-bt)\text{,\hspace{1em}}-1< t< 1$$Show that the mean and variance are

- $(X)=a$
- $\sigma(X)^2=b^{2}\frac{\pi ^{2}}{3}$

Suppose that $X$ has the Pareto distribution with shape parameter $a=1$. Show that $Y=\ln (X-1)$ has the standard logistic distribution.