Probability & Statistics

Logistic Probability Distribution

Invert a logistic CDF and compare location, scale and the distribution’s actual variance.

By Riano · Published · Updated · Report a correction

Logistic Probability Distribution

The Logistic distribution is a continuous probability distribution often used in logistic regression and feedforward neural networks. While it resembles the Normal distribution in shape, it has heavier tails (higher kurtosis). This module demonstrates how to invert a logistic CDF and compares its location, scale, and actual variance.

worked-example

Let's calculate the properties of the logistic distribution with Location = 0 and Scale = 1, and find the CDF and Density for Probe x = 0, as well as the Quantile for probability = 0.5.

  1. Mean: The mean is simply the location parameter: 0.
  2. Variance: The variance is given by π²s²/3. For scale s = 1, Variance = π²(1)²/3 ≈ 3.289868.
  3. CDF at x=0: F = 1 / (1 + exp(-(0 - 0)/1)) = 1 / (1 + exp(0)) = 1 / 2 = 0.5.
  4. Density at x=0: The density is F(1-F)/s = 0.5 * (1 - 0.5) / 1 = 0.25.
  5. Quantile for p=0.5: Q = location + scale * log(p / (1 - p)) = 0 + 1 * log(0.5 / 0.5) = log(1) = 0.

experiment

You can interactively explore the logistic distribution by adjusting its location, scale, and observing probe/quantile results in the Logistic Probability Distribution module.

  1. Change the Location control to shift the distribution left or right along the x-axis. Notice how the Mean matches the Location directly.
  2. Adjust the Scale control. A larger scale flattens the density curve and increases the Variance drastically according to the s² term.
  3. Change the Probe x control to see how the Density and CDF values change at different points along the distribution.
  4. Adjust the Quantile probability to see the inverse CDF in action, mapping a target probability back to a coordinate on the x-axis.

limitations

While the logistic distribution is analytically convenient due to its closed-form CDF, in many empirical applications the tails might not be an exact fit. Furthermore, in machine learning contexts (like the sigmoid function), the parameter interpreted as "scale" here does not map directly to the standard deviation; standard deviation involves a factor of π/√3. Finally, floating point precision limits exact representations of extremely large or small probability tails.

references

The mathematical formulations for the density, CDF, and quantile inverse function were adapted from canonical references in statistical computing.

Experience it interactively

Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Logistic Probability Distribution module.

Try Logistic Probability Distribution on Riano →

More in Probability & Statistics