Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2014 Jan 22.
Published in final edited form as: Commun Stat Theory Methods. 2007 Jun 27;29(4):851–857. doi: 10.1080/03610920008832519

Properties of Doubly-Truncated Gamma Variables

Christopher S Coffey 1, Keith E Muller 2
PMCID: PMC3898536  NIHMSID: NIHMS446100  PMID: 24465079

Abstract

The truncated gamma distribution has been widely studied, primarily in life-testing and reliability settings. Most work has assumed an upper bound on the support of the random variable, i.e. the space of the distribution is (0, u). We consider a doubly-truncated gamma random variable restricted by both a lower (l) and upper (u) truncation point, both of which are considered known. We provide simple forms for the density, cumulative distribution function (CDF), moment generating function, cumulant generating function, characteristic function, and moments. We extend the results to describe the density, CDF, and moments of a doubly-truncated noncentral chi-square variable.

Keywords: censoring, moments, characteristic function, noncentral chi-square, internal pilot study

1. INTRODUCTION

The truncated gamma distribution has been widely studied, primarily in life-testing and reliability settings. Most work has assumed an upper bound on the support of the random variable, i. e. the space of the distribution is (0, u) (Johnson, Kotz, and Balakrishnan, 1994, §8.1). We consider a doubly-truncated gamma random variable restricted by both a lower (l) and upper (u) truncation point, both of which are considered known.

Coffey and Muller (1999) encountered such a distribution when computing the conditional distribution of the test statistic using an internal pilot design for sample size re-estimation as proposed by Wittes and Brittain (1990). Internal pilot studies allow researchers to use some fraction of the planned observations to re-estimate key parameters of interest and modify the final sample size if the parameters were initially mis-specified. Although internal pilot studies have been studied primarily in the clinical trials literature, these designs can be applied to a wide range of applications.

In study planning for linear models with Gaussian errors, determining the sample size required to detect a specified effect with some target power requires knowledge of the true variance, σ2. An internal pilot study can be applied in order to protect against mis-specification of σ2. The final sample size, N+, then becomes a function of the variance estimate from the internal pilot sample σ^12. Coffey and Muller (1999) provided an algorithm for computing the power under such a design. The power computations require first conditioning on an observed final sample size and then applying the law of total probability. Conditional upon an observed final sample size, σ^12 is restricted to those values leading to that final sample size and thus follows a doubly-truncated χ2 distribution, a special case of the doubly-truncated gamma distribution.

2. PROPERTIES OF A DOUBLY-TRUNCATED GAMMA VARIABLE

2.1 Density and CDF

Consider a gamma random variable, X ~ Γ(α, β), with density

fΓ(x;α,β)=xα1exp(x/β)Γ(α)βα,x(0,)α>0,β>0, (2.1)

where Γ(α) indicates the complete gamma function. The CDF of this distribution is simply

FΓ(s;α,β)=0sxα1exp(x/β)Γ(α)βαx. (2.2)

We now consider Y ~ ΓT(α, β, l, u) to be a doubly-truncated version of X with lower truncation point, l, and upper truncation point, u. Obviously,

fΓ(y;α,β,l,u)=fΓ(y;α,β)FΓ(u;α,β)FΓ(l;α,β),l<y<u, (2.3)

and

FΓ(s;α,β,l,u)={0,s<lFΓ(s;α,β)FΓ(l;α,β)FΓ(u;α,β)FΓ(l;α,β),l<s<u1,s>u. (2.4)

2.2 Moment Generating Function

For a random variable X which follows a Γ(α, β) distribution, the moment generating function (mgf) is given by

MX(t)={exp(tX)}=(1βt)α,t[0,β1). (2.5)

By definition, the moment generating function of Y is

MY(t)={etY}=1FΓ(u;α,β)FΓ(l;α,β)luyα1exp[(1βt)y/β]Γ(α)βαy=(1βt)1αFΓ(u;α,β)FΓ(u;α,β)lu[(1βt)y]α1exp[(1βt)y/β]Γ(α)βαy. (2.6)

Apply the transformation r = (1 − βt)y, from which it follows ∂r = (1 − βt)∂y. For t ∈ [0, β−1), we use the transformation to rewrite the mgf as

MY(t)=(1βt)αFΓ(u;α,β)FΓ(l;α,β)l(1βt)u(1βt)rα1exp(r/β)Γ(α)βαr. (2.7)

For the sake of brevity, define

P(t;α,β,l,u)=FΓ[u(1βt);α,β]FΓ[l(1βt);α,β]. (2.8)

Since the integrand in (2.7) equals P(t; α, β, l, u)fΓ[y; α, β, l(1−βt), u(1−βt)], it follows that

MY(t)=[P(t;α,β,l,u)P(0;α,β,l,u)](1βt)α=[P(t;α,β,l,u)P(0;α,β,l,u)]MX(t). (2.9)

Thus the moment generating function for a ΓT(α, β, l, u) random variable equals the product of the mgf of a Γ(α, β) random variable and a factor which accounts for the truncation.

Using parallel reasoning, it follows that the characteristic function of the doubly-truncated gamma distribution is

ϕY(t)=[P(it;α,β,l,u)P(0;α,β,l,u)]ϕX(t). (2.10)

2.3 Computing the mth Moment

One can compute the moments of a ΓT(α, β; l, u) using either the moment generating function or the characteristic function. However, it may be easier to compute the moments directly using the following lemma, which generalizes a χ2 property used implicitly by Johnson, Kotz, and Balakrishnan (1994, p420).

Lemma 1

For any real number m > −α,

xmfΓ(x;α,β)=βmΓ(α+m)Γ(α)fΓ(x;α+m,β). (2.11)

Corollary

For Y ~ ΓT(α, β; l, u) and m > −α,

(Ym)=luymfΓ(y;α,β)FΓ(u;α,β)FΓ(l;α,β)dy=[FΓ(u;α+m,β)FΓ(l;α+m,β)FΓ(u;α,β)FΓ(l;α,β)]βmΓ(α+m)Γ(α)=[FΓ(u;α+m,β)FΓ(l;α+m,β)FΓ(u;α,β)FΓ(l;α,β)](Xm). (2.12)

Hence the mth moment of a ΓT(α, β; l, u) equals the mth moment of a Γ(α, β) times a factor depending only on the distribution functions of two gamma variables. This expression seems much easier to compute than the expression obtained directly from the mgf.

2.4 Cumulant Generating Function and Cumulants

For t ∈ [0, β−1), let KX(t) = lnMX(t) represent the cumulant generating function of X. Hence, from (2.10) the cumulant generating function of the doubly-truncated random variable Y is

KY(t)=lnP(t;α,β,l,u)lnP(0;α,β,l,u)+KX(t). (2.13)

In order to compute the mth cumulant, we can evaluate the mth derivative of KY(t) at t = 0. Note that the middle term in (2.13) does not depend on t and hence can be ignored in differentiation. Furthermore, taking successive derivatives of the final term in (2.13) simply leads to κm, the mth cumulant of a Γ(α, β). Thus the mth cumulant of a ΓT(α, β; l, u) equals

(κT)m=mtlnP(t;α,β,l,u)|t=0+κm. (2.14)

However, it is difficult to provide a convenient form for arbitrary derivatives of lnP(t; α, β; l, u). Alternatively, we can use the expression for computing the mth moment in (2.12) to compute the cumulants using a recursion relationship such as described by Harvey (1972). Lee and Lin (1992, 1993) discussed an alternate relationship and provided an algorithm. Zheng (1998) provided an algorithm using Mathematica for computing the cumulants (analytically and numerically) in this manner.

3. EXTENSIONS TO NONCENTRAL χ2 RANDOM VARIABLES

Clearly all of the above results apply to a central χ2, a special case of a gamma. However, there is no direct relationship between the noncentral χ2 and the gamma distribution. Taylor and Muller (1996) described a situation using the General Linear Model in which a power calculation was desired under censoring, i. e., we perform a power calculation only when the previous test was negative or positive. The setting led to a truncated F-distribution. A truncated noncentral χ2 would arise under this setting when the test statistic follows a noncentral χ2 distribution, as is often the case, at least asymptotically, for likelihood ratio test statistics. For this reason, we briefly consider some properties of a doubly-truncated, noncentral χ2 variable, indicated χT2(v,w,l,u). Let fχ2(u;v,w) and Fχ2(u;v,w) represent the density and distribution function, respectively, of a noncentral chi-square variable. Clearly

fχT2(x;v,w,l,u)=fχ2(x;v,w)Fχ2(u;v,w)Fχ2(l;v,w),l<x<u (3.1)

and

FχT2(s;v,w,l,u)={0,s<lFχ2(s;v,w)Fχ2(l;v,w)Fχ2(u;v,w)Fχ2(l;v,w),l<s<u1,s>u. (3.2)

The noncentral χ2 density may be written as an infinite Poisson weighted sum of central χ2 densities (Johnson, Kotz, and Balakrishnan, 1995, p.436). For the sake of brevity, define

p(j;ω2)=(ω/2)jj!exp(ω/2),j=0,1,2, (3.3)

the density of a Poisson random variable with mean ω/2. We then write the density of the noncentral χ2 as

fχ2(x;v,w)=j=0p(j;w2)fχ2(x;v+2j,0),x>0. (3.4)

For m any positive integer, we can use the above expression along with Lemma 1 to obtain an expression for the mth moment of a χT2(v,w,l,u):

Xm=j=0p(j;w2)luxmfχ2(x;v+2j,0)dxFχ2(u;v,w)Fχ2(l;v,w)=j=0p(j;w2)lufχ2[x;v+2(j+m),0]dx{i=0m1[v+2(j+i)]}Fχ2(u;v,w)Fχ2(l;v,w)=j=0p(j;w2){Fχ2[u;v+2(j+m),0]Fχ2[l;v+2(j+m),0]}i=0m1[v+2(j+i)]Fχ2(u;v,w)Fχ2(l;v,w). (3.5)

The form given allows straightforward computation with contemporary computers. However, without a generalization of the lemma, expressions for the moment generating function, characteristic function, and cumulant generating function are much more complicated to develop. It is possible that recursive properties of generalized hypergeometric functions may apply.

Acknowledgments

Muller’s work supported in part by NCI program project grant P01 CA47 982-04. Coffey’s work supported in part by NIEHS grant 5-T32-ES07018. A portion of the work was described in a paper submitted by Coffey in partial fulfillment of the requirements for the Ph. D. degree in Biostatistics. The authors would like to thank an anonymous reviewer for pointing out a number of corrections and clarifications.

Contributor Information

Christopher S. Coffey, A-1124 Medical Center North, Dept of Preventive Medicine, Vanderbilt Univ. School of Med., Nashville, Tennessee 37232-2637

Keith E. Muller, 3105C McGavran-Greenberg, Dept. of Biostatistics, CB#7400, University of North Carolina, Chapel Hill, North Carolina 27599

BIBLIOGRAPHY

  1. Coffey CS, Muller KE. Exact Test Size and Power of a Gaussian Error Linear Model for an Internal Pilot Study. Statistics in Medicine. 1999;18:1199–1214. doi: 10.1002/(sici)1097-0258(19990530)18:10<1199::aid-sim124>3.0.co;2-0. [DOI] [PubMed] [Google Scholar]
  2. Harvey JR. On Expressing Moments in Terms of Cumulants and Vice Versa. The American Statistician. 1972;26:38–39. [Google Scholar]
  3. Johnson NL, Kotz S, Balakrishnan N. Continuous Univariate Distributions-1. New York: Wiley; 1994. [Google Scholar]
  4. Johnson NL, Kotz S, Balakrishnan N. Continuous Univariate Distributions-2. New York: Wiley; 1995. [Google Scholar]
  5. Lee YS, Lin TK. High Order Cornish-Fisher Expansion. Applied Statistics. 1992;41:233–240. [Google Scholar]
  6. Lee YS, Lin TK. Correction to Algorithm AS 269: High Order Cornish-Fisher Expansion. Applied Statistics. 1993;42:268–269. [Google Scholar]
  7. Taylor DJ, Muller KE. Bias in Linear Model Power and Sample Size Calculations Due to Estimating Noncentrality. Communications in Statistics: Theory and Methods. 1996;25:1595–1610. doi: 10.1080/03610929608831787. [DOI] [PMC free article] [PubMed] [Google Scholar]
  8. Wittes J, Brittain E. The Role of Internal Pilot Studies in Increasing the Efficiency of Clinical Trials. Statistics in Medicine. 1990;9:65–72. doi: 10.1002/sim.4780090113. [DOI] [PubMed] [Google Scholar]
  9. Zheng Q. Computing Relations between Statistical Moments and Cumulants. 1998 Proceedings of the ASA Statistical Computing Section. 1998:165–170. [Google Scholar]

RESOURCES