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.
Mean waiting time = 1/λ
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.
Where:
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()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}")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.
Mean waiting time = 1/λ
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.
Where:
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()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}")