The Exponential/Gamma Distribution

John C. Turner

SM230 - Spring 1996

The Poisson distribution gives the probability of a certain number of events in a time period when we know the average number of events in the same time period. We now consider the distribution of the time required for a specified number of events to occur. The distribution of the so-called "waiting times" is called the exponential distribution (when we are waiting for a single event) and the gamma (or Erlang) distribution (when we are waiting for more than one event).

The probability that the time until an event occurs is more than a specified amount is found by calculating the probability of 0 events in the specified time. This is done using PCDF with X=0. To find the probability that the time is less than a specified amount, subtract this probability from 1. To find the probability that the time until k events occurs is more than a specified value, we find the probability of k or fewer events in the specified time. The probability that the time is less than a specified value is found by subtracting this probability from 1.

If we know the mean time between events to be r, then the mean number of events is 1/r per unit time. If the mean time between phone calls is 2 hours, then we get 1/2 call every hour (on average). The mean number of calls in 5 hours would be 5/2. Also, the units do not have to be time. If land mines are planted so that the average distance between mines is 10 yards, then the average number of mines per yard is 1/10 and the average number of mines in 25 yds will be 2.5.

Examples:

  1. If we usually get 2 phone calls per hour, what is the probability that a call will arrive in the next 1/2 hour?
  2. If a (potential) basketball player arrives at the gym once every 4 minutes, how long will we have to wait for 3 more players to arrive so we can have a pick-up game?
  3. We usually have about 6 power outages a month. What is the chance we can get through a week without an outage?
  4. With probability 75%, how long will we go without an outage?
  5. We can survive one outage on batteries, but the second one will hurt us. What is the chance we will survive 1.5 weeks?
  6. Half the time, we will survive how long?
  7. We can register for a class in about 3/4 of an hour. We have to register for 5 classes and have a dental appointment in 2.5 hours. What is the probability we can register for classes and make the dental appointment?
  8. If I want to be 90% sure of making my dental appointment, how much time should I allow to register?
  9. [Not all problems have to deal with time.] Flaws occur in lumber that mean that the piece will have to be cut. This limits the length of boards. These flaws usually occur about every 15 feet. What is the probability we can get another 8 foot board from our stock?

Solutions:

  1. Two phone calls per hour means that in 1/2 hour we would expect 1/4 phone call. The event that one or more calls arrive in 1/2 hour is the complement of the event that no calls arrive in 1/2 hour. Using PCDF with L=1/4 and X=0, the probability is 0.7788. The desired probability is 1-0.7788 = 0.2212.
  2. Players arriving once every 4 minutes means that 1/4 player arrives per minute. (You should see it!) The complement of 3 players arriving in some time period is the event that less than or equal to 2 players arrives. For 10 minutes, this can be found using PCDF with L=10/4 and X=2. The probability of 3 or more players in 10 minutes is 1-0.5438 = 0.4562. To find the probability for 20 minutes, use L=20/4 and X=2. The probability of 3 or more players in 20 minutes is 1-0.1246 = 0.8754. To get 90% probability, we need to use L=5.32 (and X=2). L=5.32 is equivalent to 21.28 minutes of waiting since 5.32 = 21.28/4, so 90% of the time, we will wait no more than 21.28 minutes.
  3. Having 6 outages a month is the same as 6/4 outages per week (assuming 4 weeks per month). Going more than a week without an outage is the same as no outages in a given week. Therefore, the desired probability is found from PCDF with L=6/4 and X=0. It is 0.22313.
  4. To find out how long we can go to be 75% sure of no outage, we need to adjust L, keeping X=0, so that PCDF returns 0.75. With L=0.29, PCDF returns 0.74826. L=0.29 is the same as 0.1933 of a week, since 0.1933*6/4 = 0.29.
  5. Surviving 1.5 weeks means at most 1 failure in 1.5 weeks. The average for 1.5 weeks is 6/4*1.5 = 2.25 failures. Using PCDF with L=2.25 and X=1, gives the probability of survival, 0.34255.
  6. To determine how long we survive with 50% probability, we need to find L (with X=1) so that PCDF returns 0.50. With L=1.68, PCDF returns 0.49948. L=1.68 is equivalent to 1.1 weeks, since 1.1*6/4 = 1.68.
  7. Since it takes 3/4 hour to register for a class, we can register for 4/3 classes per hour. We will be late if we register for < 5 classes in the 2.5 hours. This is found from PCDF using L=4/3*2.5 and X=4. The chance of being late is 0.7565.
  8. To be 90% sure of making my appointment, I want only a 10% chance of registering for 4 or fewer classes. With L=8 and X=4, PCDF returns 0.09963. L=8 is equivalent to 6 hours, since 6*4/3 = 8.
  9. One flaw every 15 feet means we would average 8/15 of a flaw in 8 feet. We can get the desired board if there are no flaws. Using PCDF with L=8/15 and X=0, yields 0.58665 for the answer.

Incidentally, Quattro Pro for Windows has a built-in function for this cdf. @GAMMAP(N,x/a) returns the cdf for the sum of N exponential random variables, where a is the mean for each one.

Problems:

  1. The duration of a flare has an exponential distribution with mean 3 minutes. If we have 5 flares and shoot one just as the previous one burns out, what is the probability we can provide 10 minutes of cover? 15 minutes? 20 minutes?
  2. I have 6 riflemen with inferior weapons. The mean time to failure is only 5 minutes. I have one fire until his/her weapon fails, then start the second one firing. When the second weapon fails, I start the third rifleman. What is the probability I can provide some fire cover for 30 minutes? 45 minutes? I am 90% sure I can keep firing for how long? (Answer is small.)
  3. The teacher is going to assign some drill problems. She figures that each problem will take about 5 minutes (on average) and the time to do a problem has an exponential distribution. How many problems should she assign so that no more than 10% of the class will finish within 30 minutes?
  4. Suppose that the length of a piece of string has an exponential distribution with mean 2 ft. If I tie 3 such pieces together, what is the probability the total length will be at least 7 ft.?
  5. 90% of the time, the total length will be at least how much? (Solve 0.90 = Prob(X>a) for a. The answer should be small.)
  6. What is the median length of the 3 pieces of string?
  7. A movie costs $6. The amount of money my friend and I each have has an exponential distribution with mean $5. (Our two amounts are independent.) What is the probability both of us can get in? (Remember our amounts of money are independent.) If we pool our money, what is the chance we both can get in? How much better is it to share than to be selfish?
  8. I have a box of computer cables. The lengths have an exponential distribution with mean 3 ft. I need a cable that is 5 ft long. What is the probability I'll find one that works? If I keep on taking out cables until I find one that works, what is the average number of cables I'll go through? [Hint: This is a review problem.] If I take 4 cables, what is the chance that I'll have at least one that works? If I need to get 4 cables that are at least 5 ft long, what is the expected number of cables that will be required? What is the probability that if I take 9 cables that I will have enough?