From a Gamma Model to a Probability
A gamma density can be specified using either a scale or a rate parameter. Once the parameterization is clear, cumulative probabilities and quantiles follow a consistent procedure: standardize the observation, evaluate a regularized incomplete gamma function, and interpret the result as the required tail or interval probability. The main practical risks are mixing up scale and rate, and confusing a lower-tail probability with an upper-tail probability.
This tutorial focuses on evaluating gamma probabilities and quantiles. The gamma model is continuous, so the probability of one exact value is zero; probabilities concern intervals or tails. Interest and mortality assumptions are not relevant to these distribution calculations.
The same distribution therefore has rate equal to the reciprocal of its scale: \(\beta=1/\theta\). In the shape-scale form, the standardized argument is \(z=x/\theta\); in the shape-rate form, it is \(z=\beta x\). These are the same quantity. The gamma function is \(\Gamma(a)=\int_0^\infty t^{a-1}e^{-t}\,dt\), for \(a>0\).
Incomplete Gamma Functions and Tails
For shape \(a>0\) and standardized argument \(z\geq 0\), define the lower and upper incomplete gamma functions by integrating the gamma kernel up to \(z\), or from \(z\) onward. Their regularized versions divide by \(\Gamma(a)\), so they are probabilities between zero and one.
If \(X\sim\operatorname{Gamma}(a,\theta)\), then the standardized variable \(X/\theta\) has the gamma kernel with unit scale. If \(X\) is specified with rate \(\beta\), standardize by multiplying by \(\beta\). Thus, for \(x\geq 0\),
For \(0\leq L<U\), subtract cumulative probabilities in the same order as the interval endpoints:
where \(z_x=x/\theta=\beta x\). The endpoint choice makes no difference for a continuous distribution, because \(P(X=L)=P(X=U)=0\).
Why Standardization Gives the Cumulative Probability
The formula for \(F_X(x)\) follows directly by integrating the density and changing variables. For the shape-scale form, let \(t=u/\theta\), so \(u=\theta t\) and \(du=\theta\,dt\). When \(u\) ranges from zero to \(x\), \(t\) ranges from zero to \(x/\theta\). Therefore,
The same result in the shape-rate form follows by substituting \(t=\beta u\). This derivation also explains why the probability depends on the standardized argument, not on \(x\) alone.
Useful Formula for Integer Shapes
When the shape is a positive integer \(n\), the regularized upper tail has a finite-sum expression. This can be convenient for checking calculations or working without a gamma table:
To justify the result, start with \(Q(1,z)=\int_z^\infty e^{-t}\,dt=e^{-z}\). Integration by parts gives, for integer \(n\geq 2\),
Applying this recurrence repeatedly, down to \(Q(1,z)\), produces the stated sum. This shortcut applies only when the shape is a positive integer. For noninteger shapes, use an incomplete-gamma table or a reliable statistical calculator or software function.
Worked Example: Convert Shape-Scale Inputs and Find an Interval Probability
Suppose a hypothetical service time \(X\), measured in hours, has a gamma distribution with shape \(a=3\) and scale \(\theta=2\) hours. Find \(P(2<X<8)\). No interest rate or mortality assumption is involved.
Method. Convert each endpoint to the standardized argument \(z=x/\theta\), then subtract cumulative probabilities. Since the shape is the integer 3, use the finite-sum formula.
The standardized endpoints are \(z_L=2/2=1\) and \(z_U=8/2=4\). For shape 3, \(Q(3,z)=e^{-z}(1+z+z^2/2)\).
At the lower endpoint, \(Q(3,1)=e^{-1}(1+1+1/2)=2.5e^{-1}=0.9196986\). At the upper endpoint, \(Q(3,4)=e^{-4}(1+4+4^2/2)=13e^{-4}=0.2381033\).
The interval probability is the upper tail at the lower endpoint minus the upper tail at the upper endpoint: \(P(2<X<8)=Q(3,1)-Q(3,4)=0.9196986-0.2381033=0.6815953\). To four decimal places, the answer is 0.6816.
Check. The result is positive and less than one. The cumulative probability at 8 exceeds the cumulative probability at 2, as required. The common mistake avoided here is subtracting the upper tail at 1 from the upper tail at 4, which reverses the interval probability.
Using Incomplete-Gamma Tables for Noninteger Shapes
For a noninteger shape, the finite sum above is not available. A table or software function may report \(P(a,z)\), \(Q(a,z)\), or an unregularized value such as \(\gamma(a,z)\). Check which is provided before using it. If a table gives \(\gamma(a,z)\), divide by \(\Gamma(a)\) to obtain the probability \(P(a,z)\); if it gives \(Q(a,z)\), the value is already the upper-tail probability.
Tables may also use shape-scale or shape-rate notation. Regardless of the software’s parameter labels, the standardized argument must be \(x/\theta\) for a scale input and \(\beta x\) for a rate input. Since a scale has the units of \(X\), while a rate has reciprocal units, both standardized arguments are dimensionless.
Worked Example: Evaluate an Interval with a Noninteger Shape
A hypothetical positive measurement \(X\), in units, has a gamma distribution with shape \(a=2.5\) and rate \(\beta=0.5\) per unit. Find \(P(2<X<6)\). No interest rate or mortality assumption is involved.
Method. Use the shape-rate form, so \(z=\beta x\). The endpoints standardize to \(z_L=0.5(2)=1\) and \(z_U=0.5(6)=3\). An incomplete-gamma table or software gives \(P(2.5,1)\approx0.1508549\) and \(P(2.5,3)\approx0.6936960\).
Subtract the lower cumulative probability from the upper cumulative probability: \(P(2<X<6)=P(2.5,3)-P(2.5,1)=0.6936960-0.1508549=0.5428411\). To four decimal places, the answer is 0.5428.
Check. The standardized upper endpoint is greater than the lower endpoint, and its cumulative probability is larger. The common mistake avoided is treating the rate \(0.5\) as a scale and dividing the endpoints by it; the correct shape-rate standardization multiplies by the rate.
Gamma Quantiles: Inverting the Cumulative Probability
For \(0<p<1\), the \(p\)-quantile \(x_p\) is the value satisfying \(P(X\leq x_p)=p\). For a gamma variable with shape \(a\), first find the standardized quantile \(z_p\) satisfying \(P(a,z_p)=p\). Then convert back to the units of \(X\):
Usually \(z_p\) must be found numerically from an inverse incomplete-gamma function, a table, or a numerical search. If a table supplies only values of \(P(a,z)\), find the two entries that surround the target probability and interpolate if appropriate. A numerical solver can instead search for a root of \(P(a,z)-p=0\). Check the answer by substituting the result back into the cumulative distribution. For an upper-tail target \(P(X>x)=q\), solve \(P(a,z)=1-q\), or equivalently \(Q(a,z)=q\).
Worked Example: Find a Shape-Scale 90th Percentile
Let a hypothetical claim-processing duration \(X\), measured in days, have a gamma distribution with shape \(a=2\) and scale \(\theta=5\) days. Find its 90th percentile. No interest rate or mortality assumption is involved.
Method. Find \(z\) such that \(P(2,z)=0.90\), then multiply by the scale. For shape 2, the integer-shape formula gives \(P(2,z)=1-e^{-z}(1+z)\). Thus solve \(e^{-z}(1+z)=0.10\).
A numerical search brackets the solution: at \(z=3.8\), \(P(2,3.8)=1-e^{-3.8}(4.8)\approx1-(0.0223708)(4.8)=0.8926202\). At \(z=4\), \(P(2,4)=1-e^{-4}(5)\approx1-(0.0183156)(5)=0.9084220\). The target 0.90 lies between these values. Numerical inversion gives \(z_{0.90}\approx3.88972\).
Convert from the standardized scale to days: \(x_{0.90}=5(3.88972)=19.4486\) days. To four decimal places, the 90th percentile is 19.4486 days.
Check. Substitution gives \(P(2,3.88972)=1-e^{-3.88972}(1+3.88972)\approx0.9000\), so the corresponding duration is at the required percentile. The common mistake avoided is using \(z_{0.90}\) itself as the answer in days; it is in standardized units and must be multiplied by the scale.
Checks and Common Exam Traps
Before accepting a gamma probability or quantile, check the parameterization, units, and tail. A gamma probability is not automatically a lower-tail value simply because a table or function returns a number between zero and one. Translate the requested event into a cumulative or survival probability first.
- Scale-rate reversal: for a scale \(\theta\), use \(z=x/\theta\); for a rate \(\beta\), use \(z=\beta x\). If both are supplied, verify that \(\beta=1/\theta\).
- Wrong tail: \(P(a,z)\) is the lower tail and \(Q(a,z)\) is the upper tail. They add to one, not to the same probability.
- Wrong interval order: \(P(L<X<U)=F_X(U)-F_X(L)\). Reversing the subtraction gives a negative result, a clear warning sign.
- Quantile units: a standardized quantile \(z_p\) is not generally in the original measurement units. Multiply by \(\theta\), or divide by \(\beta\).
- Misapplied integer formula: the finite sum for \(Q(n,z)\) requires a positive integer shape \(n\). Do not use it as an exact formula for a noninteger shape.
These procedures are aligned with the SOA VEE Mathematical Statistics syllabus: identify the parameterization, standardize, select the correct incomplete-gamma tail, and check the answer in context.
Check Your Understanding
For each problem, identify the parameterization before evaluating the probability or quantile. Report probabilities to four decimal places.
- A hypothetical component lifetime \(X\), in years, is gamma with shape \(1\) and rate \(0.5\) per year. Find \(P(1<X<4)\). (Answer: 0.4712)
- A hypothetical measurement \(X\) has shape \(3\) and scale \(2\). Find \(P(X\leq4)\). (Answer: 0.3233)
- A hypothetical duration \(X\), in hours, has shape \(1\) and rate \(0.25\) per hour. Find its 80th percentile in hours. (Answer: 6.4378 hours)
- A hypothetical positive amount \(X\) has shape \(3\) and rate \(0.5\). Find \(P(2<X<8)\). (Answer: 0.6816)
- A hypothetical measurement \(X\) has shape \(2.5\) and rate \(0.5\). Use an incomplete-gamma table or software to find \(P(X>6)\). (Answer: 0.3063)