Continuous distribution
Exponential distribution
The time until the next event when events arrive independently at a constant rate : the gap between customers, the lifetime of a part that does not wear out, the time to the next radioactive decay. It is memoryless: having waited an hour tells you nothing about how much longer you will wait.
Exponential probability calculator
P(X ≤ 0.69) = 0.498424
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.
CDF
mean 1 · variance 1 · sd 1 · mode 0 · entropy 1 nats
Formulas
| Parameters |
|
|---|---|
| Support | |
| CDF | |
| Mean | |
| Variance | |
| Mode | |
| MGF | |
| Entropy |
Worked example
A component's lifetime is exponential with mean 1,000 hours. What is the probability it lasts more than 1,500 hours? Given that it has already lasted 1,000, what is the probability it lasts 1,500 more?
, so . By memorylessness, the second answer is the same: . answer checked by code
How it relates to others
- Transformation← Uniform: If is Uniform(), is Exponential(): the inverse-CDF method of sampling. checked by code
- Sum→ Gamma: The sum of independent Exponential() variables is Gamma() (the Erlang distribution). checked by code
- Special case← Gamma: Gamma() is Exponential(). checked by code
- Special case← Chi-squared: Chi-squared() is Exponential(). checked by code
- Transformation→ Laplace: The difference of two independent Exponential() variables is Laplace(). checked by code
- Transformation← Laplace: If is Laplace(), is Exponential(). checked by code
- Special case← Weibull: Weibull() is Exponential(). checked by code
- Transformation→ Pareto: If is Exponential(), is Pareto(). checked by code
- Transformation→ Gumbel: If is Exponential(), is standard Gumbel. (The Gumbel is also the limit of the maximum of exponentials, shifted by .) checked by code
- Limit← Geometric: If is Geometric(), tends to Exponential() as : the continuous version of waiting for a success. checked by code
- Conjugate prior← Gamma: A Gamma() prior on an exponential rate and observed times give a Gamma() posterior.
- Sum→ Erlang: The sum of independent Exponential() waiting times is Erlang(): the time to the -th event of a Poisson process. checked by code
- Special case← Erlang: Erlang() is Exponential(). checked by code
- Transformation→ Gompertz: If is Exponential(), is Gompertz(). checked by code
- Special case← Generalized Pareto: Generalized Pareto() is Exponential(). checked by code
All the relationships, as a diagram →
In Python
from scipy import stats
import numpy as np
X = stats.expon(scale=1/1)
X.pdf(0.5) # f(0.5) = 0.6065
X.cdf(0.5) # P(X ≤ 0.5) = 0.3935
X.mean(), X.var() # 1, 1
X.ppf(0.95) # 95th percentile
X.rvs(size=10, random_state=0)
rng = np.random.default_rng(0)
rng.exponential(scale=1/1, size=10)Both libraries take the scale 1/λ, not the rate.
Choosing between this and its neighbours? Which distribution for waiting times and lifetimes? · Which prior distribution should I use?