Graph of the logistic function (sigmoid)
The logistic function, or sigmoid, rises in an S-shape from 0 to 1. It grows almost exponentially at first, slows down, and levels off at 1, which makes it the standard model for growth that runs into a limit.
Key features
- Domain
- All real numbers
- Range
- 0 < y < 1
- Horizontal asymptotes
- y = 0 as x → −∞ and y = 1 as x → ∞
- Midpoint and inflection point
- (0, 1/2), where the slope is greatest (1/4)
- Symmetry
- σ(−x) = 1 − σ(x): point symmetry about (0, ½)
- Derivative
- σ′(x) = σ(x)(1 − σ(x))
- y-intercept
- (0, 1/2)
- Derivative
- e−x(1+e−x)2
Derivative and antiderivative from the calculator’s algebra system. Domain, range and asymptotes are stated for real x.
What the graph of 1/(1 + e⁻ˣ) looks like
For large negative x the denominator is huge and the curve is close to 0, growing roughly like eˣ. For large positive x, e⁻ˣ is tiny and the curve is close to 1. The switch happens around x = 0, where the curve passes through ½ with slope ¼.
The general logistic growth curve is L / (1 + e^(−k(t − t₀))): L is the carrying capacity, k the growth rate and t₀ the midpoint, where growth is fastest.
The inverse of the sigmoid is the logit, ln(p/(1 − p)), which turns probabilities into log-odds.
Points of interest
Found numerically to about twelve digits in the window −8 ≤ x ≤ 8, then shown in exact form where one exists.
- x-intercepts (roots)
- None in this window
- Local maxima
- None in this window
- Local minima
- None in this window
- Inflection points
- (0, 1/2)
Table of values
A few points to plot, with exact values where they are simple.
| x | y = 1/(1 + e⁻ˣ) |
|---|---|
| −4 | 0.0179862 |
| −2 | 0.119203 |
| −1 | 0.268941 |
| 0 | 1/2 |
| 1 | 0.731059 |
| 2 | 0.880797 |
| 4 | 0.982014 |
How to graph 1/(1 + e⁻ˣ) by hand
- 1Draw the asymptotes y = 0 and y = 1.
- 2Plot (0, ½), (2, 0.88), (−2, 0.12), (4, 0.98) and (−4, 0.02).
- 3Draw an S-curve with its steepest point at (0, ½).
Transformations
How the graph moves when you change the formula. The original is 1/(1 + e⁻ˣ) in blue.
y = 1/(1 + e^(-3x))Larger growth rate: a sharper switch.y = 1/(1 + e^(-(x - 3)))Midpoint moved to x = 3.y = 2/(1 + e^(-x))Carrying capacity 2.
Where it shows up
- Population growth limited by resources.
- The spread of a technology or an epidemic before saturation.
- Logistic regression and neural networks, where it turns a score into a probability.
Frequently asked questions
What is the range of the logistic function?
Where is the logistic curve steepest?
What is the logistic growth model?
Related graphs
S-curve between −1 and 1; a classic activation function.
Through (0, 1), always positive; its slope equals its height.
y = aˣ: growth when a > 1, decay when 0 < a < 1.
All real inputs, outputs between −π/2 and π/2.
The bell curve: peak (0, 1), area √π.
Defined for x > 0, through (1, 0) and (e, 1).
Change the window, add sliders for a, b, h and k, trace the curve with your keyboard, or overlay its derivative.