Created:October 20, 2024
Last Updated:April 9, 2025
This calculator helps you compute the probabilities of an exponential distribution given the rate parameter (λ). You can find the probability of waiting times or lifetimes being equal to, less than, greater than, or between specific values. The distribution chart shows the probability density function (PDF) of the exponential distribution, which models the time between events in a Poisson point process.
Calculator
Parameters
Mean waiting time = 1/λ
Distribution Chart
Click Calculate to view the distribution chart
Learn More
Exponential Distribution: Definition, Formula, and Applications
Exponential Distribution
Definition: The exponential distribution models the time between events in a Poisson point process, i.e., a process in which events occur continuously and independently at a constant average rate.
Formula:The probability density function (PDF) and cumulative distribution function (CDF) are given by:
Where:
- is the rate parameter (average rate of events)
- is the time between events
Properties
- Mean (Expected Value):
- Variance:
- Memoryless Property: . This means that if an event has not occurred for some time s, the probability of waiting an additional time t is the same as the probability of waiting time t from the start. This unique property means the distribution has no "memory" of past waiting time. For example, if a light bulb has been working for 10 hours, the probability it will work for one more hour is exactly the same as the probability a brand new bulb will work for one hour. Let's prove this mathematically: This shows that waiting an additional time t after already waiting for time s has the same probability as waiting time t from the start.
- Support:
- Right-skewed distribution
- Decreasing failure rate
How to Calculate Exponential Distribution in R
R
library(tidyverse)
lambda <- 2
x <- 1.5
prob_density <- dexp(x, rate = lambda) # 0.0995741367357279
prob_cumulative <- pexp(x, rate = lambda) # 0.950212931632136
print(paste0("P(X = ", x, "): ", prob_density))
print(paste0("P(X <= ", x, "): ", prob_cumulative))
# mean and variance
mean <- 1/lambda
variance <- 1/(lambda^2)
print(paste0("Mean: ", mean)) # 0.5
print(paste0("Variance: ", variance)) # 0.25
# plot pdf
set.seed(42)
random_nums <- rexp(1000, rate = lambda)
x_values <- seq(0, 5, by = 0.01)
pdf_values <- dexp(x_values, rate = lambda)
ggplot(data.frame(x = x_values, y = pdf_values), aes(x = x, y = y)) +
geom_line(color = "blue", linewidth = 1) +
labs(
x = "x",
y = "Probability Density",
title = "Exponential Distribution PDF (λ = 2)"
) +
theme_minimal()
# plot cdf
cdf_values <- pexp(x_values, rate = lambda)
ggplot(data.frame(x = x_values, y = cdf_values), aes(x = x, y = y)) +
geom_line(color = "red", linewidth = 1) +
labs(
x = "x",
y = "Cumulative Probability",
title = "Exponential Distribution CDF (λ = 2)"
) +
theme_minimal()
How to Calculate Exponential Distribution in Python
Python
import numpy as np
import scipy.stats as stats
import matplotlib.pyplot as plt
lam = 2
# probabilities
x = 1.5
prob_density = stats.expon.pdf(x, scale=1/lam)
prob_cumulative = stats.expon.cdf(x, scale=1/lam)
print(f"P(X = {x}): {prob_density:.6f}")
print(f"P(X <= {x}): {prob_cumulative:.6f}")
# mean and variance
mean = 1/lam
variance = 1/(lam**2)
print(f"Mean: {mean:.6f}")
print(f"Variance: {variance:.6f}")