Exponential Distribution
Exponential Distribution
Definition
The Exponential Distribution models the time between events in a Poisson process, where events occur continuously and independently at a constant average rate. It is the continuous analog of the geometric distribution.
Purpose
- Model waiting times (time until next event).
- Reliability analysis: Time until failure.
- Queueing theory: Time between arrivals.
- Foundation for survival analysis.
When to Use
- Modeling time until an event occurs.
- Events occur at a constant rate (
). - Events are memoryless (past doesn't affect future).
Theoretical Background
Notation
where
Probability Density Function (PDF)
Cumulative Distribution Function (CDF)
Meaning: If you've waited
Properties
| Property | Formula |
|---|---|
| Mean | |
| Variance | |
| Median | |
| Mode | 0 (peak at origin) |
Relationship to Poisson
If the number of events in time
Worked Example: Call Center Waiting Time
A help desk receives calls at an average rate of 4 calls per hour (
Questions:
- What is the probability that the next call comes in less than 10 minutes?
- What is the probability that you wait more than 30 minutes for a call?
Solution:
First, convert units to be consistent. Let's work in hours.
calls/hour. - 10 minutes =
hours. - 30 minutes =
hours.
1. Probability wait < 10 mins (
Result: ~48.7% chance the next call arrives within 10 minutes.
2. Probability wait > 30 mins (
Result: ~13.5% chance you wait more than 30 minutes.
Assumptions
Limitations
- The "Real World Ages" Problem: Exponential implies components never wear out. A brand new bulb has the same failure probability as one that has run for 10 years. For mechanical wear, use Weibull.
- Varying Rates: If calls peak at noon and drop at night,
is not constant. Use a Non-Homogeneous Poisson Process. - Clustering: If events trigger other events (e.g., earthquakes, stock trades), independence fails.
Python Implementation
from scipy.stats import expon
import numpy as np
import matplotlib.pyplot as plt
# Exponential with λ=0.5 (mean = 2)
lambda_param = 0.5
dist = expon(scale=1/lambda_param) # scipy uses scale = 1/λ
# Mean
print(f"Mean: {dist.mean():.2f}")
# P(X > 3)
prob_gt_3 = 1 - dist.cdf(3)
print(f"P(X > 3): {prob_gt_3:.4f}")
# Visualize PDF
x = np.linspace(0, 10, 500)
plt.plot(x, dist.pdf(x), label=f'λ={lambda_param}')
plt.xlabel('Time')
plt.ylabel('Density')
plt.title('Exponential Distribution')
plt.legend()
plt.grid(alpha=0.3)
plt.show()
# Memoryless Property Verification
# P(X > 5 | X > 2) = P(X > 3)
cond_prob = (1 - dist.cdf(5)) / (1 - dist.cdf(2))
uncond_prob = 1 - dist.cdf(3)
print(f"Conditional P(X > 5 | X > 2): {cond_prob:.4f}")
print(f"Unconditional P(X > 3): {uncond_prob:.4f}")
R Implementation
# Exponential with λ=0.5
lambda_param <- 0.5
# Mean
1 / lambda_param
# P(X > 3)
pexp(3, rate = lambda_param, lower.tail = FALSE)
# Visualize
curve(dexp(x, rate = lambda_param), from = 0, to = 10,
xlab = "Time", ylab = "Density",
main = "Exponential Distribution", lwd = 2, col = "blue")
# Random sample
rexp(10, rate = lambda_param)
Interpretation Guide
| Scenario | Interpretation |
|---|---|
| Scenario | Interpretation |
| ---------- | ---------------- |
| Mean wait = |
|
| High |
Events happen very frequently; waiting times are tiny. |
| Memorylessness | "It's been quiet for an hour" does not mean a call is more likely now. |
| Median < Mean | The distribution is right-skewed; most events happen early, but some take a long time. |
Related Concepts
- Poisson Distribution - Number of events in fixed time.
- Geometric Distribution - Discrete memoryless distribution.
- Weibull Distribution - Generalizes exponential; allows aging.
- Survival Analysis