Books Probability and Statistical Inference
The Exponential, Gamma, and Chi-Squared Distributions
Consider a Poisson process with mean rate . Let denote the waiting time, which is also a random quantity, until the first event occurs. We want to find the distribution of . Consider the probability where . (If , then it is clear that .) We have
Let denote the number of occurrences in the interval . By the given condition, we know that . Then the probability of no occurrences in the interval is given by the probability mass function of the Poisson distribution evaluated at 0,
Therefore, we have
This is the CDF of , that is,
When , the PDF of is
We often denote and say that the random variable has an exponential distribution exponential distribution if its PDF is given by
where the parameter . In fact, is precisely the mean of the distribution. To see this, we first find its MGF .
We have
In order for the integral to converge, we require that . Then, we have
The first and second derivatives of are given by
Evaluating at , we get
Therefore, the mean and variance of the exponential distribution are
So, if is the mean number of occurrences in a unit interval, then is the mean waiting time until the first occurrence, which agrees with our intuition.
For the exponential random variable with mean , its CDF is
Its median is the solution to , that is,
which is slightly less than the mean .
The PDF and CDF of the exponential distribution are shown in Figure 3.1.
We can see that the PDF of an exponential distribution is monotonically decreasing. To show this, we need to calcuate the derivative of the PDF and show that it is negative. We have
Thereofre, indeed for all . An immediate consequence is that the mode of the exponential distribution is , at which the maximum value of the PDF is .
Apart from the probability for an exponential random variable with mean that is given by the CDF, it is also useful to note that
Solution
Let be the waiting time for the first customer and let . Therefore, follows an exponential distribution with mean . We want to find . We have
Make sure to use consistent units of time for the rate and the waiting time: here is per hour, so express minutes as hour before substituting into the formula.
Let be an exponential random variable with mean . Show that
Proof
We have
There is an interesting interpretation of the result in Exercise 3.2. Suppose a certain type of electronic component has a lifetime that is exponentially distributed with mean life of hours. If the component has been in operation for hours, the conditional probability that it will last for another hours is
due to the result from Exercise 3.2. Equivalently, the probability that this component survives another hours equals the probability that a new component survives its first hours: past operation does not make failure in the next interval more or less likely under this model. This is against our intuition, which means that the exponential distribution is probably not a good model for the lifetime of this component.
In a Poisson process with mean rate , we have seen the waiting time of the first occurrence has an exponential distribution. We now generalize this by considering the waiting time of the -th occurrence. The CDF of is given by
The event means that within the interval , there are less than occurrences. Thereofore,
where denotes the number of occurrences in the interval which follows a Poisson distribution with mean . Hence, is given by
When , taking the derivative of with respect to , we get the PDF of as
A PDF of this form is said to be one of the gamma type, and the random variable is said to have a gamma distribution gamma distribution. For a general gamma distribution, the parameter is not necessarily a positive integer like we assumed in the above derivation. But to make this generalization, we need to introduce the concept of the gamma function gamma function for which this discussion is named after. The gamma function is defined as
If , applying integration by parts, we have
The first term is 0 because as . The integral in the second term is by definition. Therefore, we have
For a positive integer , by applying (3.3) repeatedly, we get
The value of is easily calculated as
Therefore, we have
This is the same as the definition of the factorial function for positive integers.
By expressing the denominator of the PDF (3.2) as using gamma function, we get
We see that (3.4) is valid for any positive real number . Similar to exponential distributions, we usually denote .
Let us now formally define the gamma distribution and find its characteristics. A random variable is said to have a gamma distribution gamma distribution with parameters and if its PDF is given by
We need to verify that the integral of the PDF on its support is indeed . We have
Applying change of variable , we get
This shows that the integral of the PDF on its support is indeed .
The MGF of the gamma distribution is given by
Enforcing the condition that and applying change of variable , we obtain
Therefore, we have
The first and second derivatives of are given by
Evaluating at , we get
Hence, the mean and variance of the gamma distribution are
Solution
Let minute be our time unit. The number of customer arrivals in a minute follows a Poisson distribution with mean . Then, the waiting time before the first arrivals follows a gamma distribution with parameters and . The PDF of is given by
To find , we need to evaluate the integral of the PDF from to :
Alternatively, we can also use the formula (3.1) we have derived earlier to easily find this probability:
To see how the parameters and affect the shape of the PDF, we plot several gamma densities in Figure 3.2. In each panel, one parameter is held fixed while the other varies. Note that for a fixed , the probability moves right as increases. The same is true when is fixed and increases. We have another interesting observation here:
To study the geometric behavior of the gamma PDF and to locate its modes, we compute . We treat and separately. For , the distribution is , and we have already seen that
For , we have
To determine the monotonicity of , we examine the sign of and compare with Figure 3.2. We consider , , and separately. For , we have
Hence is strictly decreasing on , and from the explicit formula for the PDF diverges as .
For , the distribution is , which is strictly decreasing; its maximum occurs at .
For , we have
Thus increases on , attains its maximum at , and decreases on .
In summary, the mode of is
We now consider a special case of the gamma distribution that plays an important role in statistics. Let have a gamma distribution with parameters and where . Then, its PDF is given by
We say that has a chi-squared distribution chi-squared distribution with degrees of freedom and write . The practical meaning of degrees of freedom will be explained later. Recall the formulas for the mean, variance, and MGF of the gamma distribution. By substituting and , we get associated formulas for the chi-squared distribution:
And the MGF is given by
Recall that
Thus, , that is, the exponential distribution with mean is the same as the chi-squared distribution with degrees of freedom.
Figure 3.3 shows PDFs of chi-squared distributions for several degrees of freedom . Because , the qualitative shapes match those of the gamma densities in Figure 3.2. For modes, substitute and into the gamma summary above: if , then and there is no finite mode in ; if , then and the mode is at (cf. ); if , then and the unique mode is (for instance, gives ). This follows immediately from the gamma discussion; no further derivation is needed.
Tail probabilities and critical values of the chi-squared distribution are central in statistical inference, especially in hypothesis testing. We write for the upper critical value of with degrees of freedom, defined by
Equivalently, is the -th percentile of . Accordingly,
Figure 3.4 illustrates the case and : each shaded tail has area , with cut points and on the horizontal axis.
Exercises
Let have a logistic distribution with PDF
Show that
Proof
We will show this by finding the CDF of . By the very expression of itself, we observe that
Therefore,
In the following, we will consider the case . We have
Then this problem turns to evaluating the integral
In summary, the CDF of is given by
This shows that follows a uniform distribution on .
The initial value of an appliance is $ and its dollar value in the future is given by
where is the time in years since purchase. Thus, after years, , the appliance is worth nothing as far as the warranty is concerned. If it fails in the first three years, the warranty will pay . Assume the failing time has an exponential distribution with mean of years. Compute the expected value of the warranty payment.
Solution
The expected warranty payment is given by
where
Therefore, we need to evaluate the integral
The warranty payment is expected to be $.