The logistic distribution is used for various growth models, and is used in a certain type of regression, known appropriately as logistic regression.
The standard logistic distribution is a continuous distribution on \( \R \) with distribution function \( G \) given by \[ G(z) = \frac{e^z}{1 + e^z}, \quad z \in \R \]
Note that \( G \) is continuous, and \( G(z) \to 0 \) as \( z \to -\infty \) and \( G(z) \to 1 \) as \( z \to \infty \). Moreover, \[ G^\prime(z) = \frac{e^z}{\left(1 + e^z\right)^2} \gt 0, \quad z \in \R \] so \( G \) is increasing.
The probability density function \(g\) of the standard logistic distribution is given by \[ g(z) = \frac{e^z}{\left(1 + e^z\right)^2}, \quad z \in \R \]
These result follow from standard calculus. First recall that \( g = G^\prime \) was computed in the details of .
In the special distribution simulator, select the logistic distribution. Keep the default parameter values and note the shape of the probability density function. Run the simulation 1000 times and compare the empirical density function to the probability density function.
The quantile function \( G^{-1} \) of the standard logistic distribution is given by \[ G^{-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. The fact that the median is 0 also follows from symmetry, of course.
In the quantile app, select the logistic distribution. Keep the default parameter values and note the shape of the probability density function and the distribution function. Find the quantiles of order 0.1 and 0.9.
Suppose that \( Z \) has the standard logistic distribution. The moment generating function of \( Z \) has a simple representation in terms of the beta function \( B \), and hence also in terms of the gamma function \( \Gamma \)
The moment generating function \( m \) of \( Z \) is given by
\[ m(t) = B(1 + t, 1 - t) = \Gamma(1 + t) \, \Gamma(1 - t), \quad t \in (-1, 1) \]Note that \[ m(t) = \int_{-\infty}^\infty e^{t z} \frac{e^z}{\left(1 + e^z\right)^2} dx \] Let \(u = \frac{e^z}{1 + e^z}\) so that \( du = \frac{e^z}{\left(1 + e^z\right)^2} dz \) and \( e^z = \frac{u}{1 - u} \). Hence \[ m(t) = \int_0^1 \left(\frac{u}{1 - u}\right)^t du = \int_0^1 u^t (1 - u)^{-t} \, du \] The last integral, by definition, is \( B(1 + t, 1 - t) \) for \( t \in (-1, 1) \)
Since the moment generating function is finite on an open interval containing 0, random variable \( Z \) has moments of all orders. By symmetry, the odd order moments are 0. The even order moments can be represented in terms of Bernoulli numbers, named of course for Jacob Bernoulli. Let \( \beta_n \) Bernoulli number of order \( n \in \N \).
Let \( n \in \N \)
In particular, we have the mean and variance.
The mean and variance of \( Z \) are
In the special distribution simulator, select the logistic distribution. Keep the default parameter values and note the shape and location of the mean \( \pm \) standard deviation bar. Run the simulation 1000 times and compare the empirical mean and standard deviation to the distribution mean and standard deviation.
The skewness and kurtosis of \( Z \) are
It follows that the excess kurtosis of \( Z \) is \( \kur(Z) - 3 = \frac{6}{5} \).
The standard logistic distribution has the usual connections with the standard uniform distribution by means of the distribution function in and quantile function in . Recall that the standard uniform distribution is the continuous uniform distribution on the interval \( (0, 1) \).
Connections with the standard uniform distribution.
Since the quantile function has a simple closed form, we can use the usual random quantile method to simulate the standard logistic distribution.
Open the random quantile experiment and select the logistic distribution. Keep the default parameter values and note the shape of the probability density and distribution functions. Run the simulation 1000 times and compare the empirical density function, mean, and standard deviation to their distributional counterparts.
The standard logistic distribution also has several simple connections with the standard exponential distribution (the exponential distribution with rate parameter 1).
Connections with the standard exponential distribution:
These results follow from the standard change of variables formula. The transformations, inverses of each other of course, are \( y = \ln\left(e^z + 1\right) \) and \( z = \ln\left(e^y - 1\right) \) for \( z \in \R \) and \( y \in (0, \infty) \). Let \( g \) and \( h \) denote the PDFs of \( Z \) and \( Y \) respectively.
Suppose that \( X \) and \( Y \) are independent random variables, each with the standard exponential distribution. Then \( Z = \ln(X / Y) \) has the standard logistic distribution.
For \( z \in \R \), \[ \P(Z \le z) = \P[\ln(X / Y) \le z] = \P\left(X / Y \le e^z\right) = \P\left(Y \ge e^{-z} X\right) \] Recall that \( \P(Y \ge y) = e^{-y} \) for \( y \in (0, \infty) \) and \( X \) has PDF \( x \mapsto e^{-x} \) on \( (0, \infty) \). We condition on \( X \): \[ \P(Z \le z) = \E\left[\P\left(Y \ge e^{-z} X \mid X\right)\right] = \int_0^\infty e^{-e^{-z} x} e^{-x} dx = \int_0^\infty e^{(e^{-z} + 1)x} dx = \frac{1}{e^{-z} + 1} = \frac{e^z}{1 + e^z} \] As a function of \( z \), this is the distribution function of the standard logistic distribution.
There are also simple connections between the standard logistic distribution and the Pareto distribution.
Connections with the Pareto distribution:
These results follow from the basic change of variables theorem. The transformation, inverses of one another of course, are \( y = e^z + 1 \), \( z = \ln(y - 1) \) for \( z \in \R \) and \( y \in (1, \infty) \). Let \( g \) and \( h \) denote PDFs of \( Z \) and \( Y \) respectively.
Finally, there are simple connections to the extreme value distribution.
If \( X \) and \( Y \) are independent and each has the standard Gumbel distribution, them \( Z = Y - X \) has the standard logistic distribution.
The distribution function of \( Y \) is \( G(y) = \exp\left(-e^{-y}\right) \) for \( y \in \R \) and the density function of \( X \) is \( g(x) = e^{-x} \exp\left(-e^{-x}\right) \) for \( x \in \R \). For \( z \in \R \), conditioning on \( X \) gives \[ \P(Z \le z) = \P(Y \le X + z) = \E[\P(Y \le X + z \mid X)] = \int_{-\infty}^\infty \exp\left(-e^{-(x + z)}\right) e^{-x} \exp\left(-e^{-x}\right) dx\] Substituting \( u = -e^{-(x + z)} \) gives \[ \P(Z \le z) = \int_{-\infty}^0 e^u \exp(e^z u) e^z du = e^z \int_{-\infty}^0 \exp\left[u(1 + e^z)\right] du = \frac{e^z}{1 + e^z}, \quad z \in \R \] As a function of \( z \), this is the standard logistic distribution function.
The general logistic distribution is the location-scale family associated with the standard logistic distribution.
Suppose that \(Z\) has the standard logistic distribution. For \(a \in \R\) and \( b \in (0, \infty) \), random variable \( 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. Suppose that \( X \) has the logistic distribution with location parameter \( a \in \R \) and scale parameter \( b \in (0, \infty) \).
The probability density function \( f \) of \( X \) is given by \[ 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 \]
In the special distribution simulator, select the logistic distribution. Vary the parameters and note the shape and location of the probability density function. For selected values of the parameters, run the simulation 1000 times and compare the empirical density function to the probability density function.
The distribution function \( F \) of \( X \) is given by \[ 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 \( F^{-1} \) of \( X \) is given by \[ F^{-1}(p) = a + b \ln \left( \frac{p}{1 - p} \right), \quad p \in (0, 1) \]
In the quantile app, select the logistic distribution. Vary the parameters and note the shape and location of the probability density function and the distribution function. For selected values of the parameters, find the quantiles of order 0.1 and 0.9.
Suppose again that \( X \) has the logistic distribution with location parameter \( a \in \R \) and scale parameter \( b \in (0, \infty) \). Recall that \( B \) denotes the beta function and \( \Gamma \) the gamma function.
The moment generating function \( M \) of \( X \) is given by \[ M(t) = e^{a t} B(1 + b t, 1 - b t) = e^{a t} \Gamma(1 + b t) \, \Gamma(1 - b t), \quad t \in (-1, 1) \]
The mean and variance of \( X \) are
In the special distribution simulator, select the logistic distribution. Vary the parameters and note the shape and location of the mean \( \pm \) standard deviation bar. For selected values of the parameters, run the simulation 1000 times and compare the empirical mean and standard deviation to the distribution mean and standard deviation.
The skewness and kurtosis of \( X \) are
Recall that skewness and kurtosis are defined in terms of the standard score, and hence are invariant under location-scale transformations. So the skewness and kurtosis of \( Z \) are the same as the skewness and kurtosis of \( Z \) in .
Once again, it follows that the excess kurtosis of \( X \) is \( \kur(X) - 3 = \frac{6}{5} \). The central moments of \( X \) can be given in terms of the Bernoulli numbers. As before, let \( \beta_n \) denote the Bernoulli number of order \( n \in \N \).
Let \( n \in \N \).
The general logistic distribution is a location-scale family, so it is trivially closed under location-scale transformations.
Suppose that \( X \) has the logistic distribution with location parameter \( a \in \R \) and scale parameter \( b \in (0, \infty) \), and that \( c \in \R \) and \( d \in (0, \infty) \). Then \( Y = c + d X \) has the logistic distribution with location parameter \( c + a d \) and scale parameter \( b d \).