
Math 216: Statistical Thinking
Think about it: You’re waiting for the bus, your phone battery is dying, and you need to know - how long until the next one arrives? The exponential distribution is your crystal ball for waiting times!
Real-World Detective Work:

The Big Idea: Models waiting times between completely random events
Properties:
Detective’s Secret: If events happen randomly over time, waiting times follow exponential!
Definition
The exponential distribution describes the time between events in a Poisson process, where events occur continuously and independently at a constant average rate.
Probability Density Function (PDF): \[f(x)=\frac{1}{\theta} \exp \left(-\frac{x}{\theta}\right), \quad x>0\]

Key Parameters:
Real-World Interpretation:

Probability Work:
The Golden Formula: \(P(X \text{ > } a) = \exp\left(-\frac{a}{\theta}\right)\)
Bus Example (θ = 8 min):
Emergency Room (θ = 15 min):
Insight: Long waits become exponentially unlikely!
pexp: Calculates the cumulative probability for a given value.
pexp(q, rate = 1, lower.tail = TRUE)pexp(5, rate = 1/2) calculates \(P(X \leq 5)\) for \(\theta = 2\).pexp(5, rate = 1/2, lower.tail = FALSE) for \(P(X > 5)\).qexp: Computes the quantile for a specified probability.
qexp(p, rate = 1, lower.tail = TRUE)qexp(0.7, rate = 1/2) finds the time by which 70% of events are expected to occur for \(\theta = 2\).
Geometric Distribution (Discrete Cousin)
Exponential Distribution (Continuous Sibling)
The Scenario: Starbucks manager wants to know staffing needs during morning rush
Data: Average time between customer orders = 2.5 minutes (θ = 2.5)
Questions:
# Coffee shop analysis
theta_coffee <- 2.5
# Q1: What's the probability a customer arrives within 1 minute?
p_within_1min <- pexp(1, rate = 1/theta_coffee)
sprintf("P(wait ≤ 1 min) = %.1f%%", p_within_1min * 100)[1] "P(wait ≤ 1 min) = 33.0%"
# Q2: How long until 80% of customers have arrived?
time_80_percent <- qexp(0.8, rate = 1/theta_coffee)
sprintf("80%% arrive within %.1f minutes", time_80_percent)[1] "80% arrive within 4.0 minutes"
# Q3: Probability of waiting more than 5 minutes for next customer?
p_over_5min <- pexp(5, rate = 1/theta_coffee, lower.tail = FALSE)
sprintf("P(wait > 5 min) = %.1f%%", p_over_5min * 100)[1] "P(wait > 5 min) = 13.5%"
Manager’s Insight: Most customers arrive quickly, but occasional long gaps allow barista breaks!
The Scenario: IT helpdesk promises 90% of tickets resolved within target time
Data: Historical average resolution time = 4.2 hours (θ = 4.2)
Investigation:
# Tech support analysis
theta_tech <- 4.2
# Q1: What time should we promise for 90% resolution?
promise_time <- qexp(0.9, rate = 1/theta_tech)
sprintf("Promise resolution within %.1f hours for 90%% success", promise_time)[1] "Promise resolution within 9.7 hours for 90% success"
# Q2: What's the probability a ticket takes over 8 hours?
p_over_8hr <- pexp(8, rate = 1/theta_tech, lower.tail = FALSE)
sprintf("P(resolution > 8 hr) = %.1f%%", p_over_8hr * 100)[1] "P(resolution > 8 hr) = 14.9%"
# Q3: Median resolution time?
median_time <- qexp(0.5, rate = 1/theta_tech)
sprintf("50%% of tickets resolved within %.1f hours", median_time)[1] "50% of tickets resolved within 2.9 hours"
Service Level: Promise 9.7 hours for 90% success rate, but most tickets (50%) solved in 2.9 hours!
The Scenario: Manufacturing plant tests equipment reliability
Data: Average time between failures = 45 days (θ = 45)
Reliability Analysis:
# Quality control analysis
theta_equipment <- 45
# Q1: Probability equipment runs 30 days without failure?
p_30_days <- pexp(30, rate = 1/theta_equipment, lower.tail = FALSE)
sprintf("P(no failure for 30 days) = %.1f%%", p_30_days * 100)[1] "P(no failure for 30 days) = 51.3%"
# Q2: Warranty period for 95% reliability?
warranty_95 <- qexp(0.95, rate = 1/theta_equipment)
sprintf("95%% reliable for %.1f days", warranty_95)[1] "95% reliable for 134.8 days"
# Q3: Probability of failure in first week?
p_first_week <- pexp(7, rate = 1/theta_equipment)
sprintf("P(failure in first week) = %.1f%%", p_first_week * 100)[1] "P(failure in first week) = 14.4%"
Quality Promise: Equipment is 95% reliable for 135 days - perfect for 4-month warranties!
pexp: “What’s the probability?”
pexp(q, rate = 1/θ, lower.tail = TRUE)pexp(5, rate = 1/8) = P(wait ≤ 5 minutes) = 46.5%pexp(10, rate = 1/15) = P(wait ≤ 10 minutes) = 48.7%qexp: “How long for this probability?”
qexp(p, rate = 1/θ, lower.tail = TRUE)qexp(0.9, rate = 1/8) = 90% of people wait ≤ 18.4 minutesqexp(0.5, rate = 1/15) = 50% of patients wait ≤ 10.4 minutesShortcut: Use rate = 1/θ to convert from your average wait time!