The previous post opens up a discussion on generating distributions by raising an existing distribution to a power. The previous post focuses on the example of raising an exponential distribution to a power. This post focuses on the distributions generated by raising a gamma distribution to a power.
Raising to a Power
Let be a random variable. Let be a positive constant. The random variables , and are called transformed, inverse and inverse transformed, respectively.
Let , and be the probability density function (PDF), the cumulative distribution function (CDF) and the survival function of the random variable (the base distribution). The following derivation seeks to express the CDFs of the “transformed” variables in terms of the base CDF .
Unlike the exponential distribution, the CDF of the gamma distribution does not have a closed form. Suppose that is a random variable that has a gamma distribution with shape parameter and scale parameter . The following is the expression of the gamma CDF.
By a change of variable, the CDF can be expressed as the following integral.
Note that and are the gamma function and incomplete gamma function, respectively, defined as follows.
The CDF can be evaluated numerically using software. When the gamma distribution is raised to a power, the resulting CDF will be defined as a function of .
“Transformed” Gamma CDFs
The CDF of the “transformed” gamma distributions does not have a closed form. Thus the CDFs are to be defined based on an integral or the incomplete gamma function, shown in the preceding section. We still use the two-step approach – first deriving the CDF without the scale parameter and then add it at the end. Based on the two preceding sections, the following shows the CDFs of the three different cases.
The transformed gamma distribution and the inverse transformed gamma distribution are three-parameter distributions with being the shape parameter, being the scale parameter and being in the power to which the base gamma distribution is raised. The inverse gamma distribution has two parameters with being the scale parameter and being shape parameter (the same two parameters in the base gamma distribution). Computation of these CDFs would require the use of software that can evaluate incomplete gamma function.
Another Way to Work with “Transformed” Gamma
The CDFs derived in the preceding section is a two-step approach – first raising a gamma distribution with scale parameter equals to 1 to a power and then adding a scale parameter. The end result gives CDFs that are a function of the incomplete gamma function. Calculating a CDF would require using a software that has the capability of evaluating incomplete gamma function (or evaluating an equivalent integral). If the software that is used does not have the incomplete gamma function but has gamma CDF (e.g. Excel), then there is another way of generating the “transformed” gamma CDF.
Observe that the CDFs in the last section are the results of raising a base gamma distribution with shape parameter and (transformed), shape parameter and (inverse) and shape parameter and (inverse transformed). Based on this observation, we can evaluate the CDFs and the moments. This section shows how to evaluate CDFs using this approach. The next section shows how to evaluate the moments.
Transformed Gamma Distribution
Inverse Gamma Distribution
Inverse Transformed Gamma Distribution
Example 1 below uses Excel to compute the transformed gamma CDF.
“Transformed” Gamma Moments
Following the idea in the preceding section, the moments for the “transformed” gamma moments can be derived using gamma moments with the appropriate parameters (see here for the gamma moments). The following table shows the results.
|Base Gamma Parameters||Moments|
Note that the moments for the transformed gamma distribution exists for all positive . The moments for inverse gamma are limited (capped by the shape parameter ). The moments for inverse transformed gamma are also limited, this time limited by both parameters. The computation for these moments is usually done by software, except when the argument of the gamma function is a positive integer.
“Transformed” Gamma PDFs
Once the CDFs are known, the PDFs are derived by taking derivative. The following table gives the three PDFs.
Each PDF is obtained by taking derivative of the integral for the corresponding CDF.
The post is concluded with one example demonstrating the calculation for CDF and percentiles using the gamma distribution function in Excel.
The size of a collision claim from a large pool of auto insurance policies has a transformed gamma distribution with parameters , and . Determine the following.
- The probability that a randomly selected claim is greater than than 6.75.
- The probability that a randomly selected claim is between 4.25 and 8.25.
- The median size of a claim from this pool of insurance policies.
- The mean and variance of a claim from this pool of insurance policies.
- The probability that a randomly selected claim is within one standard deviation of the mean claim size.
- The probability that a randomly selected claim is within two standard deviations of the mean claim size.
Since , this is a transformed gamma distribution. There are two ways to get a handle on this distribution. One way is to plug in the three parameters , and into the transformed gamma CDF (in the table Step 2. “Transformed” Gamma CDF (with scale parameter)). This would require using a software that can evaluate the incomplete gamma function or its equivalent integrals. The other way is to know that this distribution is the result of raising the gamma distribution with shape parameter and scale parameter to the power of 1/2. We take the latter approach.
In Excel, =GAMMA.DIST(A1,B1,C1,TRUE) is the function that produces the gamma CDF , assuming that the value is in cell A1, the shape parameter is in cell B1 and the scale parameter is in cell C1. When the last parameter is TRUE, it gives the CDF. If it is FALSE, it gives the PDF. For example, =GAMMA.DIST(2.5, 2, 1, TRUE) gives the value of 0.712702505.
The transformed gamma distribution in question (random variable ) is the result of raising gamma and scale parameter 16 (random variable ) to 1/2. Thus the CDF is obtained from evaluating the gamma CDF , which is =GAMMA.DIST(, 2.5, 16, TRUE). As a result, the following gives the answers for the first two bullet points.
=GAMMA.DIST(, 2.5, 16, TRUE)
The median or other percentiles of transformed gamma distribution are obtained by a trial and error approach, i.e. by plugging in values of into the gamma CDF =GAMMA.DIST(, 2.5, 16, TRUE). After performing the trial and error process, we see that and . Thus we take the median to be 5.9. So the median size of a claim is around 5.9.
Computation of the moments of a gamma distribution requires the evaluation of the gamma function . Excel does not have an explicit function for gamma function. Since is in the gamma PDF, we can derive the gamma function from the gamma PDF in Excel =GAMMA.DIST(1, a, 1, FALSE). The value of this gamma PDF is . This the value of is divided by the value of this gamma PDF value. For example, the following Excel formulas give and .
=EXP(-1)/GAMMA.DIST(1, 5, 1, FALSE) = 24
=EXP(-1)/GAMMA.DIST(1, 2.5, 1, FALSE) = 1.329340388
The moments is . Based on the results in the section on “Transformed” gamma moments, the following gives the mean and variance.
The following gives the probability of a claim within one or two standard deviations of the mean.