Chapter 7 Question 9

Assume that the service time for a customer at a bank is exponentially distributed with mean service time 2 minutes. Let X be the total service time for 10 customers. Estimate the probability that X > 22 minutes.

n <- 10
lambda <- 1/2
threshold <- 22

probability_X_less_than_22 <- pgamma(threshold, shape = n, rate = lambda)
probability_X_greater_than_22 <- 1 - probability_X_less_than_22

probability_X_greater_than_22
## [1] 0.3405106