Logistic Distribution#

Univariate, Continuous, Symmetric, Unbounded, Light-tailed

The logistic distribution is a continuous probability distribution with a shape that resembles the normal distribution but with heavier tails. Thus, it is sometimes used as a replacement for the normal when heavier tails are needed. It is defined by two parameters: the mean (\(\mu\)) and the scale parameter (\(s\)). The mean determines the center of the distribution, while the scale parameter controls the width.

Its cumulative distribution function is the logistic function, which is characterized by an S-shaped curve (sigmoid curve). It is particularly useful in modeling growth processes, such as population growth, where the rate of growth decreases as the population reaches its carrying capacity.

A logistic regression model is typically characterized by a Bernoulli distribution for the likelihood and the logistic function as the inverse link function. However, logistic regression can also be described as a latent variable model where the error term follows a logistic distribution.

Key properties and parameters#

Support

\(x \in \mathbb{R}\)

Mean

\(\mu\)

Variance

\(\frac{\pi^2}{3}s^2\)

Parameters:

  • \(\mu\) : (float) Mean of the distribution.

  • \(s\) : (float) Scale parameter, \(s > 0\).

Probability Density Function (PDF)#

\[ f(x \mid \mu, s) = \frac{e^{-(x-\mu)/s}}{s(1+e^{-(x-\mu)/s})^2} \]
/home/docs/checkouts/readthedocs.org/user_builds/preliz/envs/stable/lib/python3.11/site-packages/pytensor/link/c/cmodule.py:2986: UserWarning: PyTensor could not link to a BLAS installation. Operations that might benefit from BLAS will be severely degraded.
This usually happens when PyTensor is installed via pip. We recommend it be installed via conda/mamba/pixi instead.
Alternatively, you can use an experimental backend such as Numba or JAX that perform their own BLAS optimizations, by setting `pytensor.config.mode == 'NUMBA'` or passing `mode='NUMBA'` when compiling a PyTensor function.
For more options and details see https://pytensor.readthedocs.io/en/latest/troubleshooting.html#how-do-i-configure-test-my-blas-library
  warnings.warn(
Logistic Distribution PDF

Cumulative Distribution Function (CDF)#

\[ F(x \mid \mu, s) = \frac{1}{1 + e^{-(x - \mu) / s}} \]
Logistic Distribution CDF

See also

Common Alternatives:

  • Normal - Often used as an alternative to the logistic distribution when the tails are not of primary concern.

  • Cauchy - Has much heavier tails than the logistic distribution, making it a robust alternative when outliers are a concern.

  • Student’s t - A generalization of the normal distribution with heavier tails.

Related Distributions:

  • Log-logistic - If a random variable is distributed as a logistic, then its exponential is distributed as a log-logistic distribution.

References#