Continuous distribution

Logistic distribution

A symmetric bell shape with slightly heavier tails than the normal, whose CDF is the logistic sigmoid. Logistic regression is the model in which a latent score plus standard logistic noise crosses zero; it also appears in Elo ratings and growth curves.

Logistic probability calculator

P(X ≤ 0) = 0.5

At the parameters set by the sliders. The shaded region on the plot is the probability; the dots on the CDF mark F at its ends.

PDF

00.10.2−505f(x)mean

CDF

00.250.50.751−505F(x)

mean 0 · variance 3.29 · sd 1.814 · mode 0 · entropy 2 nats

Formulas

Parameters
  • , the location
  • , the scale
Support
PDF
CDF
Mean
Variance
Mode
MGF
Entropy

Worked example

In a logistic regression, a customer's score is . What is the modelled probability that they buy?

The customer buys when with standard logistic, which has probability . answer checked by code

How it relates to others

All the relationships, as a diagram →

In Python

from scipy import stats
import numpy as np

X = stats.logistic(loc=0, scale=1)
X.pdf(0.5)  # f(0.5) = 0.235
X.cdf(0.5)  # P(X ≤ 0.5) = 0.6225
X.mean(), X.var()  # 0, 3.29
X.ppf(0.95)  # 95th percentile
X.rvs(size=10, random_state=0)

rng = np.random.default_rng(0)
rng.logistic(loc=0, scale=1, size=10)

Choosing between this and its neighbours? Which distribution for measurements and errors?

← LaplaceLog-logistic →