\(\newcommand{\R}{\mathbb{R}}\) \(\newcommand{\N}{\mathbb{N}}\) \(\newcommand{\E}{\mathbb{E}}\) \(\newcommand{\P}{\mathbb{P}}\) \(\newcommand{\var}{\text{var}}\) \(\newcommand{\sd}{\text{sd}}\) \(\newcommand{\cov}{\text{cov}}\) \(\newcommand{\cor}{\text{cor}}\) \(\newcommand{\skew}{\text{skew}}\) \(\newcommand{\kurt}{\text{kurt}}\)
  1. Virtual Laboratories
  2. 4. Special Distributions
  3. The Logistic Distribution

The Logistic Distribution

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

The Standard Logistic Distribution

The function \(F\) given below is a distribution function.

\[ F(x) = \frac{e^x}{1 + e^x}, \quad x \in \R \]

The distribution defined by the function in Exercise 1 is called the (standard) logistic distribution.

Suppose that \(X\) has the logistic distribution. Find \(\P(-1 \lt X \lt 2)\).

Answer:

\(\P(-1 \lt X \lt 2) = 0.6119\)

The probability density function \(f\) of the logistic distribution is given by

\[ f(x) = \frac{e^x}{(1 + e^x)^2}, \quad x \in \R \]

The probability density function \(f\) satisfies the following properties:

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

In the special distribution simulator, select the logistic distribution. Note the shape and location of the density function. Run the simulation 1000 times and note the apparent convergence of the empirical density function to the true probability density function.

The quantile function is

\[ F^{-1}(p) = \ln \left( \frac{p}{1 - p} \right), \quad p \in (0, 1) \]

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.

Answer:

\(Q_1 = -1.0986\), \(Q_2 = 0\), \(Q_3 = 1.0986\), \(Q_3 - Q_1 = 2.1972\)

In the special distribution calculator, select the logistic distribution. Note the shape and location of the probability 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.

The moment generating function can be written in terms of the beta function and in terms of the gamma function:

\[ M(t) = B(1 + t, 1 - t) = \Gamma(1 + t) \, \Gamma(1 - t), \quad -1 \lt t \lt 1 \]
Proof:

In the integral for \(M(t)\), make the substitution \(u = \frac{1}{1 + e^x}\).

If \(X\) has the logistic distribution then

  1. \(\E(X) = 0\)
  2. \(\var(X) = \frac{\pi^2}{3}\)

In the special distribution simulator, select the logistic distribution. Note the shape and location of the mean/standard deviation bar. Run the simulation 1000 times and note the apparent convergence of the empirical moments to the true moments.

The General Logistic Distribution

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 \(a \in \R\) and \( b \in (0, \infty) \), \( X = a + b \, Z \) 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.

The probability density function is

\[ f(x) = \frac{\exp \left(\frac{x - a}{b} \right)}{b \left[1 + \exp \left(\frac{x - a}{b} \right) \right]^2}, \quad x \in \R \]

The probability density function \(f\) satisfies the following properties:

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

The distribution function is

\[ F(x) = \frac{\exp \left( \frac{x - a}{b} \right)}{1 + \exp \left( \frac{x - a}{b} \right)}, \quad x \in \R \]

The quantile function is

\[ F^{-1}(p) = a + b \, \ln \left( \frac{p}{1 - p} \right), \quad p \in (0, 1) \]

In particular, the median occurs at \(x = a\).

The moment generating function is

\[ M(t) = e^{a \, t} B(1 + b \, t, 1 - b \, t) = e^{a \, t} \Gamma(1 + b \, t) \, \Gamma(1 - b \, t), \quad - 1 \lt t \lt 1 \]

The mean and variance are

  1. \(\E(X) = a\)
  2. \(\var(X) = b^2 \frac{\pi^2}{3}\)

Transformations

If \(X\) has the Pareto distribution with shape parameter \(a = 1\) then \(Y = \ln(X - 1)\) has the standard logistic distribution.