Continuous distribution · also called Fisk distribution

Log-logistic distribution

A positive quantity whose logarithm has a logistic distribution, much as the log-normal's logarithm is normal: survival times whose hazard rises and then falls (recovery after surgery, time to cancer remission), river flows, and income (where economists call it the Fisk distribution). Its CDF is a simple closed form, so its quantiles and odds are easy to work with: the odds of having finished by time grow like .

Log-logistic probability calculator

P(X ≤ 1) = 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.511.5012345f(x)mean

CDF

00.250.50.751012345F(x)

mean 1.047 · variance 0.1126 · sd 0.3355 · mode 0.9455 · entropy 0.2082 nats

Formulas

Parameters
  • , the scale (also the median)
  • , the shape
Support
PDF
CDF
Mean
Variance
Mode
Entropy

The mean is infinite when , and the variance when ; in general is finite only for . The hazard rate decreases for and rises then falls for . SciPy calls it fisk, with c and scale .

Worked example

Recovery time after an operation is log-logistic with median days and shape . What fraction of patients take more than 20 days?

. Doubling the median divides the odds of still being unwell by . 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.fisk(c=6, scale=1)
X.pdf(1.5)  # f(1.5) = 0.2968
X.cdf(1.5)  # P(X ≤ 1.5) = 0.9193
X.mean(), X.var()  # 1.047, 0.1126
X.ppf(0.95)  # 95th percentile
X.rvs(size=10, random_state=0)

rng = np.random.default_rng(0)
1 * (1 / rng.uniform(size=10) - 1) ** (-1 / 6)

NumPy has no log-logistic sampler; this inverts the CDF, α (1/U − 1)^(−1/β).

Choosing between this and its neighbours? Which distribution for waiting times and lifetimes? · Which distribution for extremes and heavy tails?

← LogisticWeibull →