From probabilities to thresholds
For a continuous distribution, a quantile answers an inverse question: what value is exceeded with a specified probability, or what value is reached with a specified cumulative probability? For the logistic distribution, both questions have explicit answers. Those formulas are especially useful in the tails, where a small change in the target probability can move the quantile substantially.
We use the location-scale logistic distribution with location \(\mu\in\mathbb{R}\) and scale \(s>0\). Its cumulative distribution function is \(F(x)=1/(1+\exp(-(x-\mu)/s))\). The survival function is \(S(x)=P(X>x)=1-F(x)\); continuity means \(P(X>x)=P(X\geq x)\).
The ratio \(p/(1-p)\) is the odds corresponding to cumulative probability \(p\). Thus the quantile is the location plus the scale times the log-odds. For an upper-tail probability \(\alpha\), where \(0<\alpha<1\), the threshold exceeded with probability \(\alpha\) is
This form is often convenient for rare events: specify the probability of exceedance directly, then calculate the threshold. The survival function also gives the probability of exceeding any specified threshold without first calculating a CDF.
Deriving and checking the quantile formula
The quantile expression follows by solving the CDF equation, and strict monotonicity guarantees that the solution is unique. We show both points so that the inversion is clear.
Writing \(z=(x-\mu)/s\), the CDF is \(F(x)=1/(1+e^{-z})\). Its derivative is \(f(x)=e^{-z}/\{s(1+e^{-z})^2\}>0\), since \(s>0\). The limits as \(x\) tends to \(-\infty\) and \(+\infty\) are 0 and 1, respectively.
For \(0<p<1\), solve \(p=1/(1+e^{-(x-\mu)/s})\). Rearranging gives \(1/p-1=e^{-(x-\mu)/s}\), hence \((1-p)/p=e^{-(x-\mu)/s}\).
Taking logarithms yields \(\log((1-p)/p)=-(x-\mu)/s\), so \(x=\mu+s\log(p/(1-p))\). Strict increase from Step 1 makes this solution unique. \(\square\)
The survival formula follows directly by subtraction: \(S(x)=1-F(x)=1/(1+\exp((x-\mu)/s))\). As a check, substituting \(x=Q(p)\) gives \(\exp((x-\mu)/s)=p/(1-p)\), and therefore \(S(Q(p))=1-p\). This agrees with the interpretation of \(Q(p)\) as the threshold exceeded with probability \(1-p\).
Worked quantile and tail calculations
Worked Example: Central and Upper Quantiles
Let \(X\) have a logistic distribution with \(\mu=10\) and \(s=2.5\). Find its 95th and 99th percentiles.
For the 95th percentile, \(p=0.95\), so \(p/(1-p)=0.95/0.05=19\). Therefore
For the 99th percentile, the odds are \(0.99/0.01=99\), giving
The second value is higher, as it must be for a larger cumulative probability. Substitution checks the results: at \(Q(0.99)\), \(\exp((Q(0.99)-10)/2.5)=99\), so \(F(Q(0.99))=1/(1+1/99)=0.99\).
Worked Example: A Rare Upper-Tail Threshold
Let \(X\) have a logistic distribution with \(\mu=0\) and \(s=1.5\). Find a threshold \(c\) such that \(P(X>c)=0.0005\).
Here \(\alpha=0.0005\), so \(1-\alpha=0.9995\). The odds in the upper-quantile formula are \(0.9995/0.0005=1999\). Thus
To verify the exceedance probability, \(\exp(c/1.5)=1999\), and hence
Worked Example: Checking an Exponential Tail Approximation
Let \(X\) have a logistic distribution with \(\mu=4\) and \(s=2\). Calculate \(P(X>14)\), then compare it with the exponential approximation obtained from the leading right-tail term.
The standardized distance above the location is \(z=(14-4)/2=5\). The exact probability and the leading exponential term are
The approximation is slightly larger than the exact probability. Its ratio to the exact probability is \(e^{-5}(1+e^5)=1+e^{-5}\), so its relative error, measured relative to the exact value, is \(e^{-5}\approx0.006738\), or about \(0.674\%\). The approximation is close here, but it is not the exact tail probability.
Exponential decay in both tails
The logistic tails decay exponentially in distance from the location. The scale \(s\) determines the rate: increasing \(s\) makes the exponential factor decrease more slowly as a function of the distance measured in the original units.
For the right tail, put \(z=(x-\mu)/s\). When \(x\) tends to \(+\infty\), \(z\) tends to \(+\infty\), and
For the left tail, \(x\to-\infty\) means \(z\to-\infty\). Using \(F(x)=1/(1+e^{-z})\),
Both limits are obtained from exact algebraic identities and the fact that \(e^{-z}\to0\) as \(z\to+\infty\), and \(e^z\to0\) as \(z\to-\infty\). No interchange of a limit and an integral is needed. \(\square\)
The limits also yield useful bounds at finite thresholds. For \(z\geq0\), \(1\leq1+e^{-z}\leq2\), so
Thus, whenever \(x\geq\mu\), the right-tail probability lies between half its leading exponential term and that term. By symmetry, whenever \(x\leq\mu\),
These bounds show why the exponential expression is a useful approximation far into a tail, while also making clear that it is a bound rather than an identity at finite \(x\).
Extreme quantiles and the size of the tail
For an upper-tail probability \(\alpha\), the exact threshold is
As \(\alpha\) decreases towards zero, the last term \(s\log(1-\alpha)\) tends to zero. Consequently,
Here the additive approximation error is exactly \(s\log(1-\alpha)\), not an unspecified correction. By symmetry around \(\mu\), the lower-tail quantile satisfies \(Q(\alpha)=\mu-s\log((1-\alpha)/\alpha)\), and tends to \(-\infty\) at the same rate. In particular, an extreme logistic quantile grows with \(\log(1/\alpha)\), rather than with a power of \(1/\alpha\).
This relationship makes the quantile formula practically valuable. If a model specifies an allowable exceedance probability, the formula translates it directly into a threshold on the measurement scale. Conversely, the survival function returns the probability associated with a proposed threshold. The two calculations are inverse checks on one another.
Common pitfall: replacing the exact tail too soon
A tempting calculation is to replace \(S(x)\) by \(\exp(-(x-\mu)/s)\) as soon as \(x>\mu\), then report the result as the exact probability. The theorem only says that the ratio approaches 1 as \(x\to\infty\); for a finite threshold, the exact survival probability is \(e^{-z}/(1+e^{-z})\), not \(e^{-z}\). The bound \(S(x)\leq e^{-z}\) also shows that the approximation is an upper bound on the right tail.
For an exact quantile, retain the factor \(1-\alpha\) in \(\log((1-\alpha)/\alpha)\). Dropping it is appropriate only when explicitly reporting the extreme-tail approximation \(\mu+s\log(1/\alpha)\). These formulas allow the error to be checked directly: the difference between the exact and approximate quantiles is \(s\log(1-\alpha)\).
Check Your Understanding
Use the formulas and bounds in this tutorial to answer the following questions.
- For a logistic distribution with \(\mu=3\) and \(s=2\), write the exact formula for the 90th percentile and calculate its value to three decimal places.
- For an upper-tail probability \(\alpha\), derive the exact expression for the threshold exceeded with probability \(\alpha\).
- State the limit of \(S(x)/\exp(-(x-\mu)/s)\) as \(x\to\infty\), and explain what it says about the right-tail decay rate.
- If \(x\geq\mu\), give the exponential upper and lower bounds for \(S(x)\).
- Explain why \(\exp(-(x-\mu)/s)\) is not generally equal to the exact logistic survival probability at a finite \(x\).