<<

arXiv:2006.12428v4 [math.PR] 9 Aug 2021 otlts obnn uhpoessi h eeomn fhis of development the in mod processes random such such exponential of Combining independent celebrated postulates. are most events the of applie perhaps times interarrival the In in modelling. prevalent stochastic are in variables random distributed Exponentially Introduction 1. e pcfi xmls ntefil frlaiiy h neti lifetimes uncertain [ a the (see reliability, name variates of to exponential field analysis, as the risk In modelled and examples. survival specific and few theory reliability , whe density value. the noninteger of identically positive form and arbitrary restricted independent an less of take a sum is integer density gamma an The of distribution the being uuigmdl,AnrEln a e oitouewa snwtefa the now is what introduce to led was Erlang Agner models, queueing sitrrtda h u of sum the as interpreted is ueia nlss safnaetlto,i a enptt ode good to put been has it tool, fundamental a As func analysis. density numerical the gamma produces independent approach distinct this of how fra sums showing of for by tools density concludes the the for using found by also (a further, is found results been these have formulae Extending such . where papers distributed previous Erlang with exponentials independent ment independent of of density the sums nove for of a representation densities suggests the immediately explore which further characteristic p difference We divided parameters. distinct a pairwise having exponentials independent on rcse o h oeln fnnPisnsre feet w events of series non-Poisson variables. of distributed modelling normally the of for sets processes point of independence the the testing to Referring a variables. as random variables distributed exponentially of sum eso:1 uy2021 July 15 Version: uhrno aibe n hi uslea h oeo ayfilssuc fields many of core the at lie sums their and variables random Such h iie ieecsi ujc oefmla ntefilso approx of fields the in familiar more subject a is differences divided The h ae eiswt h oml o the for formula the with begins paper The rvosytte:”ntesmo needn admvralso th of variables random independent of sum the ”On titled: Previously xoeta,Eln n am variates gamma and Erlang exponential, MSC: calculus fractional differences, h est o uso needn am aitsuigfra using variates Keywords: gamma independent of s sums variates co for Erlang such density of for sums the formulae for closed-form perspective per difference finding difference divided to divided approach a using unified By a variables. random gamma and Abstract: ntedniyfrsm findependent of sums for density the On eeaie Integer Generalised 00,6E0 26A33 62E10, 60E05, hspprr-xmnstedniyfrsm fidpnete independent of sums for density the re-examines paper This ovltos xoeta aibe,Eln est,gam density, Erlang variables, exponential Convolutions, k needn u o-dnial itiue am variables. gamma distributed non-identically but independent am aibe [ variable, gamma tnoe idee,UK Middlesex, Stanmore, [email protected] 2 dodLevy Edmond )adhnesse alr ie r itiue sa as distributed are times failure system hence and ]) hypo-exponential 1 6 hw t eeac oWls abawhen lambda Wilks’ to relevance its shows ] get e praht finding to approach new a uggests toa calculus. ctional vltos npriua,the particular, In nvolutions. aibe n eosrtsagree- demonstrates and variables pcie h ae provides paper the spective, est en htfrtesmof sum the for that being density toa acls representation a calculus, ctional aibe sacneuneo its of consequence a as variables h ae dacsasuccinct a advances paper The . ehdo stages of method dotnrdsoee)b other by rediscovered) often nd eetetm othe to time the here initself. tion ial,i [ in Finally, itotta hsdniyhas density this that out oint u fhtrgnosErlang heterogeneous of sum admvrals h paper The variables. random l,tePisnpoes the process, Poisson the els, etesaeprmtrmay parameter shape the re esetv rmwihto which from perspective l adniy divided density, ma ed fpoaiiyand probability of fields d miliar pnnil Erlang xponential, itiue exponentials. distributed e.W eto eea here mention We few. fcmoet r often are components of eti ipiyn and simplifying in ffect xoeta family” exponential e telecommunications, h mto hoyand theory imation ragdistribution Erlang 24 ,Smdevelops Sim ], o hss in phases) (or k hevent th /On the density for sums of independent exponential, Erlang and gamma variates 2 elucidating formulae for the moments of the geometric Brownian motion, see [5]. It is hoped that the ideas here demonstrate another aspect of its usefulness and provide the reader with new avenues to explore the densities for sums of exponential and gamma random variables further.

2. The hypo-exponential density

Let Xi be a having the with rate (or intensity) para-

menter λi > 0. Then its probability density function, fXi (t), is given by:

−λit λie t ≥ 0 fXi (t)= (0 t< 0.

The sum of n mutually independent exponential random variables, Xi, with pairwise distinct parameters, λi, i =1,...,n, respectively, has the hypo-exponential density, Sn(t), given by

n n e−λj t Sn(t)= λi n , t ≥ 0. (2.1)  i=1  j=1 (λk − λj ) Y X k=1 kQ=6 j

We note that the condition that the λi’s be distinct is essential as the formula (2.1) is undefined for any instance where λi = λj for i 6= j. This formula is well known and its derivation can be found in a number of sources, for example [21]. To an approximation theorist, the form of (2.1) is very familiar. It is the (n − 1)th-order xt divided difference of the function e(x)= e at the points −λ1,..., −λn, expressed in its Lagrange polynomial form, multiplied by the product of all the λi’s. Knowing this, suggests an alternative perspective and a common basis when extending to more general instances where the λi’s are not distinct and some, or all, parameters have repeats.

3. Preliminaries

3.1. Newton’s divided differences

Given data points (xi,yi) for i = 1,...,m, a standard interpolation problem is to approximate the (possibly unknown) function y = f(x) generating the data points by a known function con- structed to pass though each such data point. Newton’s method proceeds by casting the problem as determining the coefficients b0,...,bm−1 under a recursive scheme of polynomials of increasing order: qi(x)= qi−1(x)+ bi−1(x − x1)(x − x2) ... (x − xi−1), i =2, . . . , m, (3.1)

beginning with q1(x) = b0. If we regard these as a system of m equations, we may find the ′ coefficients by solving for the column vector b = (b0,...,bm−1) in the matrix equation system:

y = Tb (3.2)

′ where, y = (y1,...,ym) and T is the matrix

10 0 ... 0 1 (x2 − x1) 0 ... 0   1 (x3 − x1) (x3 − x2)(x3 − x1) 0 . . . . .  ......    1 (x − x ) (x − x )(x − x ) ... m−1(x − x )  m 1 m 2 m 1 k=1 m k    Q −1 When the xi’s are distinct, T is nonsingular and the unique solution is b = T y. The triangular nature of T reflects the recursive form of (3.1). It can be shown (see [3] p.140 or [23] Lemma 4.2.2) /On the density for sums of independent exponential, Erlang and gamma variates 3 that the coefficient bk−1 (k = 1,...,m) is (and defines) the (k − 1)th-order divided difference of the function f(.) at points x1,...,xk, i.e.

bk−1 ≡ f[x1, x2,...,xk], and f[x1, x2,...,xk] may be given the alternative following definition:

Definition 3.1. For a function f(.) defined at points x1,...,xk, the (k − 1)th-order divided difference is defined by the recurrence relation:

f[x2,...,xk−1, xk] − f[x1 ...,xk−2, xk−1] f[x1,...,xk]= (3.3) xk − x1 with f[x]= f(x).

It can also be shown that when the arguments x1,...,xk are distinct, the divided difference f[x1,...,xk] can be expressed in terms of Lagrange polynomials:

k f(x ) f[x ,...,x ]= j , (3.4) 1 k k j=1 X (xj − xq) q=1 qQ=6 j

(see [3] p.139). We note that the form of (3.4) shows f[x1,...,xm] to be a symmetric function of its arguments and so the calculations are invariant to permutations in the order of its arguments, e.g. f[x1, x2, x3]= f[x2, x3, x1]. See [23] Lemma 4.2.1.

3.2. Lemmas

The following short lemmas will prove helpful.

Lemma 3.1. For any m> 1 distinct points x1,...,xm we have:

m 1 m ≡ 0. (3.5) j=1 (xj − xk) X k=1 kQ=6 j

Proof. Examine the system (3.2) for data points (xi,yi) but where yi = 1 for i =1,...,m. Rather than invert T, we instead solve for b using Cramer’s rule. Let Ti signify the matrix found by replacing the ith column of T by y then bi−1 = det(Ti)/det(T). Clearly, Ti is singular for i> 1, hence det(Ti) = 0 and (thus) bi−1 = 0 for i =2,...,m. Noting (3.4), we therefore prove (3.5). Lemma 3.1 should come as no surprise as it merely states that when divided differences are taken at m points where all function values f(xi) are equal, f[x1,...,xm] ≡ 0.

Lemma 3.2. For distinct values x1,...,xm and s ∈ R, the decomposition of the rational function, U(s), 1 U(s)= m , (xk − s) k=1 as a sum of partial fractions, gives Q

m 1 1 m = m . (3.6) (xk − s) j=1 (xj − s) (xk − xj ) k=1 X k=1 Q kQ=6 j Proof. Obvious. (See also [1]). /On the density for sums of independent exponential, Erlang and gamma variates 4

3.3. Euler’s gamma function and related functions

We note the following definitions and expressions which are further explored in [18] and in [10].

Euler’s gamma function, Γ(a), is defined by: ∞ Γ(a)= ta−1e−tdt, for Re(a) > 0 Z0 and satisfies the relation Γ(a +1) = aΓ(a). Hence, for any a ∈ N, Γ(a +1) = a!. The function may be extended to all a< 0 except at its poles {0, −1, −2,...} by defining Γ(a)=Γ(a + 1)/a.

The incomplete gamma function γ(a,z) for z ≥ 0 is defined by: z γ(a,z)= ta−1e−tdt, for Re(a) > 0. Z0 The function can also be expressed in series form using the confluent hypergeometric (or Kum- mer’s) function, M(a,b,z), as γ(a,z)= a−1zae−zM(1, 1+ a,z), for a 6=0, −1, −2 ... (3.7) = a−1zaM(a, 1+ a, −z), using Kummer’s transformation M(a,b,z)=ezM(b − a, b, −z), (see Eqns. (8.5.1) and (13.2.39) in [18]). From the definition of γ(a,z), we have γ(1,z) = (1 − e−z), for Re(z) > 0, and the nth derivative of γ(a,z)/z is given by: dn γ(a,z) γ(n + a,z) = (−1)n , (3.8) dzn z zn+a see [10].

For M(a,b,z), we have that: dn Γ(a + n)Γ(b) M(a,b,z)= M(a + n,b + n,z), (3.9) dzn Γ(a)Γ(b + n) (see [18] Eqn. 13.3.16) and M(a,b,z) has the integral representation Γ(b) 1 M(a,b,z)= eztta−1(1 − t)b−a−1dt, (3.10) Γ(a)Γ(b − a) Z0 (see [18] Eqn. 13.4.1).

The complementary (or upper) incomplete gamma function Γ(a,z) for z ≥ 0 is defined by: ∞ Γ(a,z)= ta−1e−tdt, for Re(a) > 0 Zz and has an alternative integral form (see [18] Eqn.(8.6.4)) za ∞ t−ae−(t+z) Γ(a,z)= dt, for z > 0,Re(a) < 1. (3.11) Γ(1 − a) t + z Z0 Clearly, we have that Γ(a) = Γ(a,z)+ γ(a,z), for all z ≥ 0. When a is an integer n ≥ 1, γ(n,z) and Γ(n,z) may be expressed as finite series:

n−1 n−1 zr zr γ(n,z) = (n − 1)! 1 − e−z and Γ(n,z) = (n − 1)!e−z . r! r! r=0 r=0 X  X Finally, Euler’s beta function, B(z,y) for z > 0, y > 0, is defined by: 1 B(z,y)= tz−1(1 − t)y−1dt Z0 and satisfies the relation B(z,y)=Γ(z)Γ(y)/Γ(z + y). /On the density for sums of independent exponential, Erlang and gamma variates 5

4. Convolution of exponential random variables with distinct parameters

The definition and representation of divided differences in Sec. 3.1 immediately suggests the fol- lowing proposition giving the hypo-exponential density an alternative compact form.

Proposition 4.1. Let X1,...,Xn be n independent exponential random variables with parameters λi, i =1,...,n and where λi 6= λj when i 6= j. Let Yi = X1 + ··· + Xi and denote its density by Si(t). Then Yn has the hypo-exponential density given by

n

Sn(t)= λi e[−λ1,..., −λn], t ≥ 0, (4.1) i=1  Y  xt where e[−λ1,..., −λn] is the (n−1)th-order divided difference for the function e(x)= e at points −λ1,..., −λn. Proof. The proof follows by inspection of (2.1) and recognising the Lagrange polynomial repre- sentation (3.4). However, Lemma 3.1 allows for a short proof using induction on n. For n = 1 the equation holds trivially. We assume the truth of equation (4.1) at n − 1 and

examine the density for Yn = Yn−1 + Xn. Performing the convolution of fXn (t) with Sn−1(t), we have: t −λnu Sn(t)= λne Sn−1(t − u)du Z0 n−1 n−1 t e−λj (t−u) = λ e−λnu λ du (using (3.4) and n i n−1 0 i=1 j=1 Z Y X (λk − λj )  k=1 kQ=6 j n−1 with the understanding that for n=2, (λk − λ1)=1) k=1 kY=16 n n−1 t e−λj t e−(λn−λj )udu = λ 0 i n−1 i=1 j=1 R Y X (λk − λj )  k=1 kQ=6 j n n−1 e−λj t[1 − e−(λn−λj )t] = λ i n−1 i=1 j=1 Y X (λn − λj ) (λk − λj )  k=1 kQ=6 j n n−1 n−1 e−λj t e−λnt = λi n − n . i=1 j=1 (λk − λj ) j=1 (λk − λj ) Y  X k=1 X k=1  kQ=6 j kQ=6 j From Lemma 3.1,

n n−1 1 1 1 = + =0 n n n−1 j=1 (λ − λ ) j=1 (λ − λ ) X k j X k j (λk − λn) k=1 k=1 k=1 k=6 j k=6 j Q Q Q hence n−1 e−λnt e−λnt − = n n−1 j=1 (λ − λ ) X k j (λk − λn) k=1 k=1 k=6 j Q Q and noting (3.4), Proposition 4.1 (and (2.1)) therefore follows. /On the density for sums of independent exponential, Erlang and gamma variates 6

Remark 4.1. With a little work and noting the Hermite-Genocchi integral relation (see Theorem 8.1 below), the density formula (2.1) can be re-written as an integral over the relevant simplex and must therefore be a divided difference. Remark 4.2. Propositions 2 and 3 of [4] show divided difference interpretations for more general forms involving exponentials than the one in (2.1). Remark 4.3. We will see below that expression (4.1), unlike expression (2.1), has a valid inter- pretation even in an instance when there are repeats of some or all of the λi’s.

5. Convolution of exponential random variables with identical parameters

When n independent exponential random variables Xi have identical parameter λ, their sum X1 + ··· + Xn has the with parameters (n, λ). Its density, Erln,λ(t), is defined by λntn−1 Erl (t)= e−λt, t ≥ 0, n,λ (n − 1)! see [1], which is the gamma density with an integer . We have from (4.1) with n = 2 and λ2 = λ1

2 S2(t)= λ1e[−λ1, −λ1].

However, applying Definition 3.1 in this case would lead to division by zero. The extension to the instance of repeats in the arguments for the divided difference (sometimes called the confluent or osculatory case) is provided by its integral form. Consider again the first-order divided difference f[a1,a2]

f(a ) − f(a ) 1 a2 f[a ,a ]= 2 1 = f ′(u)du, 1 2 a − a a − a 2 1 2 1 Za1 for an arbitrary variable u. Applying a change of variable to v using u = a1 + v(a2 − a1) yields

1 1 ′ f[a1,a2]= f (a1 + v(a2 − a1))(a2 − a1)dv a2 − a1 0 1 Z ′ = f (a1 + v(a2 − a1))dv. Z0

It follows, when a2 = a1 we have:

1 ′ ′ f[a1,a1]= f (a1) dv = f (a1). Z0

Theorem 5.1. (Hermite). Let a1,...,ak be real (not necessarily distinct) and let f(x) have a continuous (k−1)th derivative in the interval [amin,amax], where amin and amax are (respectively) the minimum and maximum of a1,...,ak. Then

1 v1 vk−2 (k−1) f[a1,...,ak]= ··· f a1 + v1(a2 − a1)+ v2(a3 − a2)+ Z0 Z0 Z0 ··· + vk−1(ak − ak−1) dvk−1 . . . dv1, where f (m)(a) denotes the mth-order derivative of f(x) evaluated at x = a. Proof. See [23] Theorem 4.2.3. As a consequence, the divided difference definition is extended to a (unique) continuous function of the points a1,...,ak so long as the variables are evaluated within the interval of continuity of /On the density for sums of independent exponential, Erlang and gamma variates 7 the (k − 1)th derivative of f(x). The instance of k arguments a1,...,a1 is therefore found as:

1 v1 vk−2 (k−1) f[a1,...,a1]= f (a1) ··· dvk−1 . . . dv1 Z0 Z0 Z0 1 v1 vk−3 (k−1) = f (a1) ··· vk−2dvk−2 . . . dv1 Z0 Z0 Z0 1 v1 vk−4 v2 (5.1) = f (k−1)(a ) ··· k−3 dv . . . dv 1 2! k−3 1 Z0 Z0 Z0 ... 1 = f (k−1)(a ) . 1 (k − 1)!

Using (5.1), we may now extend the interpretation of (4.1) and state that the density for the sum of n independent exponential random variables with identical parameter λ is given by:

λne(n−1)(−λ) λntn−1e−λt S (t)= λne[−λ, . . . , −λ]= = , n (n − 1)! (n − 1)! n times the Erlang density with parameters| ({zn, λ). }

6. Convolution of exponential random variables in general - a novel representation

In this section we continue to consider the density for sums of independent exponential random variables and develop an alternative representation for the general case of the sum of independent Erlang distributed random variables. Expressions for this density have been derived in a number of previous articles, such as [14], [8], [2], [6] and [11]. The technique used in these papers is either by taking Laplace transform of the convolution of random variables and inspection for its inverse, or through repeated integration by parts. Here, we provide a new direct approach by exploiting the representation of the hypo-exponential density in Proposition 4.1.

6.1. Sums of exponentials and an Erlang distributed random variable

In preparation, we examine the case studied in [12] where the density for the sum Y = X1 + ··· + Xn of n independent exponential random variables is considered, with m1 > 1 of these having parameter λ1 and so their sum, Z1, has the Erlang distribution with parameters (m1, λ1). The remaining n − m1, Xi’s, are independent exponential random variables with distinct parameters λ2,...,λk, where k := n − m1 + 1. Looking to equation (4.1), the divided difference representation for Sn(t), this case requires the determination of:

m1 Sn(t)= λ1 λ2 ...λke[−λ1,..., −λ1, −λ2,..., −λk]

m1 times (6.1) m1 (m1) = λ1 λ2 ...λke[|−λ1 {z, −λ2},..., −λk].

(m1) In (6.1), −λ1 denotes m1 occurrences of −λ1 in the argument list. One way to proceed is simply to apply the recurrence definition of the divided difference (3.3) across any two distinct arguments, say:

(m1) 1 (m1−1) e[−λ1 , −λ2,..., −λk]= e[−λ1 , −λ2,..., −λk] λ1 − λk (6.2) (m1) − e[−λ1 , −λ2,..., −λk−1]  and to continue until all remaining distinct arguments are exhausted so that only repeats remain and then apply (5.1). /On the density for sums of independent exponential, Erlang and gamma variates 8

To clarify this procedure, take the illustrative example considered in [8]. Let Y = Z1 + X2 where Z1 has the density Erl3,λ1 (t) and X2 is exponential with parameter λ2. Then, beginning with (6.1), we may find the density for Y using (6.2) as follows:

3 (3) Sn(t)= λ1λ2e[−λ1 , −λ2] (2) (3) 3 e[−λ1 , −λ2] − e[−λ1 ] = λ1λ2 λ1 − λ2   (2) 2 −λ1t 3 e[−λ1, −λ2] − e[−λ1 ] t e = λ1λ2 2 − (using (5.1)) (λ1 − λ2)  2(λ1 − λ2)  −λ2t −λ1t −λ1t 2 −λ1t 3 e − e te t e = λ1λ2 3 − 2 − (using (5.1) again) (λ1 − λ2) (λ1 − λ2) 2(λ1 − λ2)  −λ1t −λ1t 2 −λ1t  −λ2t 3 e te t e e = λ1λ2 3 − 2 + + 3 (λ2 − λ1) (λ2 − λ1) 2(λ2 − λ1) (λ1 − λ2)   which agrees with [8], p.76 (after correcting for a mistaken division by 2 in the D1 term there). In general, the above approach, whilst perfectly correct, very quickly leads to a profusion of calculations and is only practical for a small number of repeats or distinct arguments.

Proposition 6.1. Let a1,...,am be distinct and let f(x) have a continuous k1th derivative in the interval [amin,amax]. Then

∂k1 f[a ,a ,...,a ]= k !f[a(k1+1),a ,...,a ], k1 1 2 m 1 1 2 m ∂a1 where the notation a(i) signifies that a appears i times in the list of arguments for the divided difference term. Proof. See Appendix A.1. We return to the case considered by [12] for general k. Using (4.1) and Proposition 6.1, we may therefore conclude the following proposition giving a concise expression for the density fY (t) for Y = Z + X2 + ··· + Xk:

Proposition 6.2. Let Z1 be a random variable having the Erlang distribution with parameters (m1, λ1) and Xi, for i = 2,...,k, be mutually independent exponential random variables with xt distinct parameters λi and independent of Z1. Then for e(x) = e , the density fY (t) for Y = Z1 + X2 + ··· + Xk is given by:

m1 (m1) fY (t)= λ1 λ2 ...λke[−λ1 , −λ2,..., −λk] λm1 λ ...λ ∂m1−1 = 1 2 k . e[−λ , −λ ..., −λ ]. m1−1 1 2 k (m1 − 1)! ∂(−λ1) /On the density for sums of independent exponential, Erlang and gamma variates 9

A closed-form formula for the density of the sum Y may now be derived as follows: λm1 λ ...λ ∂m1−1 f (t)= 1 2 k . e[−λ , −λ ..., −λ ] Y m1−1 1 2 k (m1 − 1)! ∂(−λ1) k λm1 λ ...λ ∂m1−1 e−λ1t e−λj t = 1 2 k . + (m − 1)! ∂(−λ )m1−1 k k 1 1 j=2  (λq − λ1) X (λq − λj ) q=2 q=1 Q qQ=6 j k k λm1 λ ...λ (m − 1)! (−1)rq r ! e−λj t(m − 1)! = 1 2 k 1 e−λ1ttr1 q + 1 rq +1 k (m1 − 1)! k r1! ...rk! (λq − λ1) r =m1−1 q=2 j=2 m1  Pj=1 Xj Y X (λ1 − λj ) (λq − λj ) ri≥0 q=2 qQ=6 j (using the general Leibniz rule, see Appendix A.2) k (−t)r1 e−λj t = λm1 λ ...λ e−λ1t(−1)m1−1 + , 1 2 k k k k r =m1−1 rq +1 j=2 m1  Pj=1 Xj r1! (λq − λ1) X (λ1 − λj ) (λq − λj ) ri≥0 q=2 q=2 Q qQ=6 j (6.3) for t ≥ 0. For the case k = 2 and general m1, the density may also be found in the following succinct manner. Set r = m1 − 1. Then using Proposition 6.2,

r+1 r λ1 λ2 d fY (t)= r e[−λ1, −λ2] r! d(−λ1) r+1 −λ2t r −x r λ1 λ2e d t(1 − e ) dx = r , for x = (λ1 − λ2)t r! dx x d(−λ1)    (6.4) λr+1λ e−λ2t dr tγ(1, x) λr+1λ e−λ2t γ(r +1, x) = 1 2 (−t)r = 1 2 tr+1 (using (3.8)) r! dxr x r! xr+1 λm1 λ e−λ2tγ(m , (λ − λ )t) = 1 2 1 1 2 , for t> 0 m1 (m1 − 1)!(λ1 − λ2) and λ1 > λ2. For the instance λ2 > λ1, replace γ(m1, (λ1 − λ2)t) by a corresponding confluent hypergeometric representation, (3.7) above. The equivalence with (6.3) is seen once we rearrange terms there (for k = 2) to find

−λ2t m1−1 r m1 e −λ1t t fY (t)= λ λ2 − e 1 (λ − λ )m1 r!(λ − λ )m1−r 1 2 r=0 1 2  X  −λ2t m1−1 r m1 e −(λ1−λ2)t [(λ1 − λ2)t] = λ λ2 1 − e 1 (λ − λ )m1 r! 1 2 r=0  X  and (6.4) follows after applying the finite series representation for γ(n,z).

6.2. Sums of exponentials in general

Returning to Proposition 6.1, we may further take partial derivatives w.r.t. a2 and write: ∂k1+k2 ∂k2 f[a ,a ,...,a ]= k ! f[a(k1+1),a ,...,a ] k1 k2 1 2 m 1 k2 1 2 m ∂a1 ∂a2 ∂a2 (6.5) (k1+1) (k2+1) = k1!k2!f[a1 ,a2 ,...,am]. The second equality in (6.5) follows by applying a similar reasoning used in the proof of Proposition 6.1. Repeating this for all the arguments, we state the following corollary: /On the density for sums of independent exponential, Erlang and gamma variates 10

Corollary 6.1. Let a1,...,am be distinct and let f(x) have a continuous qth derivative in the interval [amin,amax]. Then, for integers 1 < ki ≤ q, i =1,...,m,

k1+···+km ∂ (k1+1) (km+1) f[a1,...,am]= k1! ...km!f[a ,...,a ]. k1 km 1 m ∂a1 ...∂am

The interested reader can look further to [19] Ch.1 or to the exercises and hints in [23] Ch.4. Let X1,...,Xn be n independent random variables having exponential distributions with pa- rameters from the set {λi; i = 1,...,k ≤ n}, with λi 6= λj when i 6= j. Suppose further that mi is the number of such random variables having parameter λi so that m1 + ··· + mk = n. Then Y = X1 + ··· + Xn is the sum of k independent random variables having the Erlang distribu- tion with parameter (mi, λi) for i =1,...,k. Applying Corollary 6.1, the following result is then immediately apparent:

Proposition 6.3. (A General Representation). Let Y = Z1 + ··· + Zk be the sum of k inde- pendent random variables having Erlang distributions with parameters, respectively, (mi, λi) for xt i =1,...,k. For e(x)= e , the density for Y , fY (t), for t ≥ 0 is given by

k mi (m1) (mk) fY (t)= λi e[−λ1 ,..., −λk ] i=1  Y  (6.6) k λmi ∂n−k = i . e[−λ ,..., −λ ], m1−1 m −1 1 k (mi − 1)! ∂(−λ ) . . . ∂(−λk) k i=1 1 Y where n = m1 + ··· + mk. Proof. The correctness of this representation will also be demonstrated via Lemma 7.1 below. This particular representation for the sum of independent Erlang distributed random variables appears to be novel. A closed-form expression for (6.6) is easily found with Lemma 6.1.

Lemma 6.1. Let a1,...,am be distinct and let f(x) have a continuous qth derivative in the interval [amin,amax]. Then, for integers 1 < ki ≤ q, i =1,...,m, and k = k1 + ··· + km: m m k (ri) ki−ri ∂ f (ai)(−1) (kq + rq)! f[a1,...,am]= ki! . k1 km r ! (a − a )kq +rq +1r ! ∂a1 ...∂am m i q i q q i=1 Pj=1 rj =ki =1 X X qY=6 i rj ≥0 Proof. See Appendix A.2. We may now state the following corollary:

Corollary 6.2. Let Y = Z1 + ··· + Zk be the sum of k independent random variables having the Erlang distribution with parameter (mi, λi) for i = 1,...,k and λi 6= λj for i 6= j. Then the density for Y , fY (t), for t ≥ 0 is given by

k k k −λit mi−1 ri mi e (−1) (−t) (mq + rq − 1)! fY (t)= λi × m +r . (6.7) k ri! (λq − λi) q q rq! i=1 i=1 k q=1 (m − 1)! P =1 rj =mi−1 Y n X j j X qY=6 i o j=1 rj ≥0 jQ=6 i Proof. The result is immediate after applying Lemma 6.1 to equation (6.6) and rearranging terms.

Corollary 6.2 agrees with Theorem 1 of [8]. A further manipulation of (6.7) gives:

k m i (−1)mi−ntn−1 f (t)= λmi e−λit Y i (n − 1)! i=1 n=1 X X k mq mq + rq − 1) λq × m +r , rq (λq − λi) q q k q=1 P =1 rj =mi−n   j X qY=6 i j=6 i,rj ≥0 /On the density for sums of independent exponential, Erlang and gamma variates 11 agreeing with Theorem 1 of [11]. Consider the case k = 2, where Z1 and Z2 are independent variables and have the densities

Erlm1,λ1 (t) and Erlm2,λ2 (t), respectively, with λ1 6= λ2. Using (6.6), we may determine the density for Y = Z1 + Z2 and generalise (6.4) directly as follows:

m1 m2 (m1) (m2) fY (t)= λ1 λ2 e[−λ1 , −λ2 ] λm1 λm2 ∂m1+m2−2 = 1 2 . e[−λ , −λ ] m1−1 m2−1 1 2 (m1 − 1)!(m2 − 1)! ∂(−λ1) ∂(−λ2) λm1 λm2 ∂m2−1 e−λ2tγ(m , (λ − λ )t) = 1 2 1 1 2 (following the steps to (6.4)) m2−1 m1 (m1 − 1)!(m2 − 1)! ∂(−λ2) (λ1 − λ2) 1 2   λm λm tm1 ∂m2−1 = 1 2 e−λ1tM(1,m +1, (λ − λ )t) (using (3.7)) m2−1 1 1 2 m1!(m2 − 1)! ∂(−λ2) m1 m2 m1+m2−1 −λ1t   λ1 λ2 t e = M(m2,m1 + m2, (λ1 − λ2)t), (using (3.9)) Γ(m1 + m2) m1 m2 m1+m2−1 −λ2t λ1 λ2 t e = M(m1,m1 + m2, (λ2 − λ1)t), t> 0. Γ(m1 + m2) (6.8)

In the final step we applied Kummer’s transformation.

7. A representation for the generating function for sums of Erlangs

For a continuous random variable Y with density function fY (t) for t ≥ 0, its moment generating function (m.g.f.), MY (s), is defined by:

∞ st st MY (s)= E(e )= e fY (t)dt. (7.1) Z0 If the m.g.f. exists then it uniquely determines the distribution. The m.g.f. for a random variable m m with density Erlm,λ(t) is λ /(λ − s) (see [21] p.65) and so when Y is the sum of k independent

Erlang random variables with densities Erlmi,λi (t), for i =1,...,k, we have:

k m λi i MY (s)= . λi − s i=1 Y   Lemma 7.1. Let Y = Z1+···+Zk where Zi’s are independent Erlang distributed random variables

with densities Erlmi,λi (t), i = 1,...,k, respectively and λi 6= λj for i 6= j. Then the m.g.f. of Y can be characterised by:

k ∞ λmi ∂m−k M (s)= est i . e[−λ ,..., −λ ]dt (7.2) Y m1−1 m −1 1 k (mi − 1)! ∂(−λ ) . . . ∂(−λk) k 0 i=1 1 Z Y xt where m = m1 + ··· + mk and divided differences are taken over the function e(x)= e . We provide a proof of this lemma and in doing so, once more confirm the correctness of Propo- sition 6.3. The proof is given as it will also form the basis for a further development in the next section. Proof. Applying the Leibniz integral rule to (7.2) and using the Lagrange polynomial representa- /On the density for sums of independent exponential, Erlang and gamma variates 12 tion for the divided difference term e[−λ1,..., −λk], we have:

k k ∞ λmi ∂m−k e−(λj −s)tdt M (s)= i . 0 Y m1−1 m −1 (mi − 1)! ∂(−λ ) . . . ∂(−λk) k k i=1 1 j=1 R Y X (λq − λj ) q=1 qQ=6 j k k λmi ∂m−k 1 = i . m1−1 m −1 (mi − 1)! ∂(−λ ) . . . ∂(−λk) k k i=1 1 j=1 Y X (λj − s) (λq − λj ) q=1 q=6 j Q (7.3) k k λmi ∂m−k 1 = i . (from (3.6)) m1−1 m −1 (mi − 1)! ∂(−λ ) . . . ∂(−λk) k (λj − s) i=1 1 j=1 Y Y k k k k mi mj −1 mi λi d 1 λi (mj − 1)! = . m −1 = . m (mi − 1)! d(−λj ) j (λj − s) (mi − 1)! (λi − s) j i=1 j=1 i=1 j=1 Y Y Y Y k λ mi = i λi − s i=1 Y   as required.

8. Fractional calculus and the extension to sums of independent gamma distributed random variables

A gamma distributed random variable Z with parameter (α, β) and (α/β) has density and m.g.f. given, respectively, by:

βαtα−1e−βt β α G (t)= and M (s)= α,β > 0. α,β Γ(α) Z β − s   By correspondence, it is tempting, but wrong, to extend of (6.6) to gamma variables simply by replacing mi, (mi − 1)! and λi by (respectively) αi, Γ(αi) and βi. This would then extend Proposition 6.3 to include a representation for the density for the sum of k independent gamma random variables with parameters (αi,βi). Such a proposal would appear to be reasonable given that in Sec. 5 we saw that the Erlang density with parameters (n, λ) may be found as:

λn dn−1 λntn−1e−λt Erl (t)= e−λt = (8.1) n,λ (n − 1)! d(−λ)n−1 (n − 1)!   xt dv v xt and if, for f(x) = e , dxv f(x) = t e were true for noninteger v > 0 then we could similarly conclude: βα dα−1 βαtα−1e−βt G (t)= e−βt = . (8.2) α,β Γ(α) d(−β)α−1 Γ(α)   However, unlike the Erlang distribution, α is not restricted to being a positive integer and whilst βα and Γ(α) may be obvious generalisations of βn and (n−1)! for positive noninteger parameters, the derivative term in (8.2) needs elaborating and we will require the tools of fractional calculus in order to formalise this extension. The history of fractional calculus is almost as old as that of the calculus itself. However, com- pared with integer calculus, noninteger calculus ideas and methods are relatively unfamiliar. Its development has been comparatively slower and a reflection of this is that an account providing a systematic treatment of the subject did not appear until the publication in 1974 of the book by Oldham and Spanier [17]. The interested reader can look to [15] and to [20] for two further accessible textbooks on the subject. We will draw on these and other sources but present only the necessary definitions and results required to complete our discussion. /On the density for sums of independent exponential, Erlang and gamma variates 13

The most widely investigated and used definition of the fractional derivative is the Riemann- Liouville (RL) definition (sometimes referred to as the Abel-Riemann definition). Let x ∈ R. For a function f ∈ L1[a,b], −∞ 0 is defined as

1 x Iν f(x)= (x − τ)ν−1f(τ)dτ, for x ∈ [a,b], (8.3) a x Γ(ν) Za 1 0 where, L [a,b] denotes the set of Lebesgue integrable functions on [a,b]. For completeness, aIxf(x)= p p f(x). The fractional integral operator has the linearity property aIx bf(x)+cg(x) = b aIxf(x) + c Ipg(x) for b, c constants and the semigroup property Ip( Iq)= Ip+q. a x a x a x a x   The (left-sided) RL fractional derivative of order ν > 0 is defined by:  dm Dν f(x)= Im−ν f(x) a x dxm a x 1 dm x  m−ν−1 (8.4) Γ(m−ν) dxm a (x − τ) f(τ)dτ, m − 1 <ν 0 as a composition of fractional integration of order m − ν followed by differentiation of integer order m where m is ν ν m m−ν ν the smallest integer greater than ν. From the definition, aDx aIx f(x) =aDx aIx aIx f(x) = Dm Imf(x) =f(x) and hence Dν is a left-inverse to Iν . However, Iν ( Dν f(x)) = f(x) is a x a x a x a x  a x a x  only true when f (ν−j)(a) = 0 for j = 1,...,m, where m − 1 < ν ≤ m. When the order ν is a  ν positive integer, aDxf(x) is the conventional integer-order derivative. It is easily shown that the fractional derivative conforms with the linear transformation property:

ν ν ν aDxf(bx + c)= b ab+cDy f(y) , y = bx + c,b > 0.

Note the inclusion of the upper and lower terminals in the notation and definitions. It can be seen that the fractional integral is always nonlocal (i.e. dependent on a, the lower terminal) and the fractional derivative is generally nonlocal unless it is of an integer order. For a thorough discussion see Ch.5 in [17], alternatively [20] Ch.2 or [15] Ch.4. v xt We now examine the validity of (8.2) by determining aDxf(x) for f(x) = e for noninteger v> 0. Let m − 1 0. We have then

dm 1 dm x Dvext = ( Iξext)= (x − τ)ξ−1etτ dτ a x dxm a x Γ(ξ) dxm Za 1 dm ext (x−a)t = uξ−1e−udu (τ 7→ x − u/t) Γ(ξ) dxm tξ Z0 1 dm ext = γ(ξ, (x − a)t). Γ(ξ) dxm tξ

Taking the lower terminal as a = −∞, the Liouville form of the RL fractional derivative, γ(ξ, (x − a)t) → Γ(ξ) so yielding:

dm ext Dvext = = tm−ξext = tvext. −∞ x dxm tξ Hence (8.2) has a meaningful correspondence with (8.1) under the Liouville definition for fractional derivatives (sometimes also referred to as the Liouville-Weyl definition). With the Liouville definition, a sufficient condition that (8.3) converge is that f(−x)= O(x−ν−ǫ), ǫ> 0, x → ∞. Integrable functions satisfying this property are sometimes referred to as functions of Liouville class. It is straightforward to verify that f(x) = ecx (with c > 0) and f(x) = x−c (with 0

k Definition 8.1. The (mixed) partial Liouville fractional derivative with order ν = i=1 νi (νith order in xi direction, i =1,...,k) is defined as follows: P ν ∂ ν1 νk ν1 νk g(x1,...,xk) := −∞Dx1 ... −∞Dxk g(x1,...,xk) ∂x1 ...∂xk

k m x1 xk k 1 ∂ ηi = . m1 mk ··· (xi − ξi) g(ξ1,...,ξk)dξk . . . dξ1, Γ(mi − νi) ∂x ...∂x i=1 1 k −∞ −∞ i=1 Y Z Z Y k Z+ where m = i=1 mi, ηi = (mi − νi − 1), mi−1 <νi

8.1. A representation for the density for sums of independent gamma random variables

The following lemma will assist us further in our extension to sums of independent gamma random variables. Lemma 8.1. Let f(x) = (x + b)−c for x ∈ R with b and c constants with c ≥ 1. Then: (i) For 0 <ν< 1: Γ(c − ν) Iν f(x) = (−1)ν (x + b)−(c−ν), −∞ x Γ(c) where (−1)ν is a complex coefficient. (ii) For any 0 ≤ m − 1 <ν 0 and m − 1 <ν

Proposition 8.1. Let Z1,...,Zk be k independent random variables with Zi having the gamma density Gαi,βi (t),i =1,...,k and βi 6= βj for i 6= j. Let e[−β1,..., −βk] be the divided difference xt for e(x) = e at points −βi (i = 1,...,k) then, at least for the Liouville definition of fractional derivatives, we may say that Y = Z1 + ··· + Zk has density, fY (t), given by:

k βαi f (t)= i . Dα1−1 ... Dαk−1e[−β ,..., −β ]. (8.5) Y −∞ −β1 −∞ −βk 1 k Γ(αi) i=1 Y Proof. Let fY (t) denote the density function for the sum Y . Substituting fY (t) from (8.5) into (7.1), the m.g.f. for Y is then expressed as:

k ∞ βαi M (s)= est i . Dα1−1 ... Dαk −1e[−β ,..., −β ]dt Y −∞ −β1 −∞ −βk 1 k Γ(αi) 0 i=1 Z Y k k ∞ αi e−(βj −s)tdt βi α1−1 αk−1 0 = .−∞D ... −∞D , −β1 −βk k Γ(αi) i=1 j=1 R Y X (βq − βj ) q=1 qQ=6 j as the exchange of order of integrals is clearly permitted. The proof continues by following the same steps as that for Lemma 7.1 except at the penultimate line of (7.3) we apply the Liouville fractional derivative definition to give instead:

k αi k βi αj −1 1 MY (s)= . −∞D−βj (8.6) Γ(αi) βj − s i=1 j=1 Y Y   αj −1 where, for αj < 1, we note that −∞D−βj must be interpreted as a fractional integral, i.e.

Dαj −1 ≡ I1−αj , α < 1. −∞ −βj −∞ −βj j

Setting c = 1 in Lemma 8.1, we have firstly, for 0 < αj < 1 using part (i) of the lemma: 1 I1−αj = (−1)1−αj Γ(α )(x + s)−αj −∞ x x + s j   ν or, multiplying both sides by (−1), (using the linearity property for aIx ) 1 I1−αj = Γ(α )(−x − s)−αj . −∞ x −x − s j   It follows, for βj >s, we can write 1 Γ(α ) I1−αj = j . −∞ −βj α βj − s (βj − s) j   Secondly, for αj ≥ 1, using Lemma 8.1 part (ii): 1 Dαj −1 = (−1)1−αj Γ(α )(x + s)−αj . −∞ x x + s j   Again, it follows, for βj >s, we can write 1 Γ(α ) Dαj −1 = j . −∞ −βj α βj − s (βj − s) j   Hence, (8.6) becomes k α βi i MY (s)= , βi − s i=1 Y   which we know is the m.g.f. for Y . As the moment generating function is unique to the density function, the proof is completed. /On the density for sums of independent exponential, Erlang and gamma variates 16

Proposition 8.1 extends Proposition 6.3 to independent gamma distributed random variables and for the instance of k = 1, (8.2) is therefore shown to be a valid statement under this proposi- tion.

Remark 8.1. Observe that for values {−β1,..., −βk} and constant t, the divided differences over the functions e(x)= ext and exp(x)= ex satisfy:

k−1 e[−β1,..., −βk]= t exp[−β1t, . . . , −βkt],

x where exp[a1,...,am] denotes the divided difference of e at the points {a1,...,am}. Furthermore, using the linear transformation property for the fractional derivative, we have

α−1 α−1 α−1 −∞D−β f(−βt)= t −∞Dx f(x), x = −βt. Hence, we have the equivalent representation for the density of Y :

α1 αk α1+···+αk −1 β1 ...βk t α1−1 αk −1 fY (t)= {−∞Dx1 ... −∞Dxk exp[x1,...,xk]}xi=−βit,i=1,...,k. (8.7) Γ(α1) ... Γ(αk)

ν Remark 8.2. The Caputo definition for the fractional derivative, aDx, is perhaps the second most widely encountered definition, particularly in studies of fractional differential equations. The Caputo derivative of order ν > 0 is defined by: b 1 x Dν f(x)= (x − τ)m−ν−1f (m)(τ)dτ, for m − 1 <ν 0. ν Proof. Using the linearity property of aIx , we have 1 ex Iν f(x)= Iν − Iν −∞ x −∞ x x −∞ x x    1 x eτ = (−1)ν xν−1Γ(1 − ν) − (x − τ)ν−1 dτ (from Lemma 8.1 part (i) and (8.3)) Γ(ν) τ Z−∞ (−1) ∞ e−(u−x) = (−1)ν xν−1Γ(1 − ν) − uν−1 du (τ 7→ x − u) Γ(ν) u − x Z0 = (−1)ν xν−1Γ(1 − ν) − (−1)ν xν−1Γ(1 − ν, −x), /On the density for sums of independent exponential, Erlang and gamma variates 17 from the alternative integral representation for Γ(a,z) in (3.11). The first part of the lemma then follows after noting that Γ(a) − Γ(a,z)= γ(a,z). For the second part dm Dν f(x)= Im−ν f(x) , for m − 1 <ν 1 is found as: βαλtα f (t)= { Dα−1exp[x , x ]} Y Γ(α) −∞ x1 1 2 x1=−βt,x2=−λt α α x1−x2 β λt x2 α−1 1 − e = {e (−1)−∞Dx1 } Γ(α) x1 − x2 βαλtα 1 − ey  = {ex2 (−1) Dα−1 }, for y = x − x Γ(α) −∞ y y 1 2 βαλtα   = {ex2 (−1)−αy−αγ(α, −y)} (using Lemma 8.2) Γ(α) x1=−βt,x2=−λt βαλe−λtγ(α, (β − λ)t) = , t> 0, Γ(α)(β − λ)α giving a generalisation of (6.4) to noninteger shape parameters and agreeing with Eqn.(6) of [16]. 1−α It is easily verified that the same result is found when 0 <α< 1, using −∞Ix in place of α−1 −∞Dx .

8.2. The density for sums of independent gamma random variables

For Y = Z1 + Z2 where Zi has gamma density Gαi,βi (t) (i = 1, 2), we assume β2 > β1 without loss of generality. We may find the density for Y as:

α1 α2 α1+α2−1 β1 β2 t α1−1 α2−1 fY (t)= {−∞Dx1 −∞Dx2 exp[x1, x2]}x1=−β1t,x2−β2t Γ(α1)Γ(α2) α1 α2 α1+α2−1 β1 β2 t α1−1 x1 γ(α2, x1 − x2) = −∞D e x1 α2 x1=−β1t,x2−β2t Γ(α1)Γ(α2) (x1 − x2)    and then continue by applying the fractional calculus version of Leibniz rule (see [20] Sec. 2.7.2). Alternatively, we may take another route. The integral form for the divided difference f[a1,a2] over the function f may also be expressed as 1 ′ f[a1,a2]= f (va1 + (1 − v)a2)dv, ai ∈ R Z0 so that, for x1 > x2, 1 α1−1 α2−1 α1−1 α2−1 vx1+(1−v)x2 −∞Dx1 −∞Dx2 exp[x1, x2]= −∞Dx1 {−∞Dx2 e dv} 0 1 Z α1−1 vx1 α2−1 (1−v)x2 = −∞Dx1 e −∞Dx2 e dv 0 Z 1 = vα1−1evx1 (1 − v)α2−1e(1−v)x2 dv 0 Z 1 = ex2 vα1−1(1 − v)α2−1e(x1−x2)vdv. Z0 /On the density for sums of independent exponential, Erlang and gamma variates 18

Using (3.10), the integral representation for the confluent hypergeometric function, we may write

1 Γ(α )Γ(α ) vα1−1(1 − v)α2 −1e(x1−x2)vdv = 1 2 M(α , α + α , (x − x )) Γ(α + α ) 1 1 2 1 2 Z0 1 2 and we may conclude that

α1 α2 α1+α2−1 β1 β2 t α1−1 α2−1 fY (t)= {−∞Dx1 −∞Dx2 exp[x1, x2]}|xi=−βit,i=1,2 Γ(α1)Γ(α2) α1 α2 α1+α2−1 x2 β1 β2 t e = M(α1, α1 + α2, (x1 − x2))|xi=−βit,i=1,2 Γ(α1 + α2) α1 α2 α1+α2−1 −β2t β1 β2 t e = M(α1, α1 + α2, (β2 − β1)t), t> 0 Γ(α1 + α2) giving a generalisation of (6.8) to noninteger shape parameters. This approach lends itself to an easy extension for finding the density for the sum of k indepen- dent gamma random variables, k ≥ 2. We provide the Hermite-Genocchi theorem for the integral form of the divided difference f[a1,...,an]: n−1 Theorem 8.1. (Hermite-Genocchi). Let f ∈ C (R) and let a1,...,an be (not necessarily dis- tinct) real numbers. Then, for n ≥ 2,

(n−1) f[a1,...,an]= f (v1a1 + ··· + vnan)dv1 . . . dvn−1 S Z n−1 n−2 1 1−v1 1−Pk=1 vk (n−1) = dv1 dv2··· dvn−1f (v1a1 + ...vnan) Z0 Z0 Z0 where the domain of integration is the simplex

n−1 S Rn−1 n−1 = (v1, v2,...,vn−1) ∈ + : vi ≤ 1 i=1  X and n−1 vn =1 − vi. i=1 X Proof. See, for example, [5] (noting that as f[a1,...,an] is a symmetric function of its arguments, f[a1,...,an] ≡ f[an,a1,...,an−1]).

We proceed by assuming, without loss of generality, that βk = max{βi,i = 1,...,k} so that (xi − xk) > 0 for i =1,...,k − 1. Next, apply Theorem 8.1 to exp[x1,...,xk] to give

(k−1) exp[x1,...,xk]= exp (v1x1 + ··· + vkxk)dv1 . . . dvk−1 S Z k−1

v1x1+···+vkxk = e dv1 . . . dvk−1 S Z k−1 k−1 k−1 vixi (1−P =1 vj )xk = e e j dv1 . . . dvk−1. S k−1 i=1 Z  Y  The density for the sum of k independent gamma random variables is then found as follows. /On the density for sums of independent exponential, Erlang and gamma variates 19

Firstly,

α1−1 αk −1 −∞Dx1 ... −∞Dxk exp[x1,...,xk] k−1 k−1 αi−1 vixi αk−1 (1−Pj=1 vj )xk = −∞Dxi e −∞Dxk e dv1 . . . dvk−1 S k−1 i=1 Z  Y  k−1 k−1 k−1 αi−1 vixi αk−1 (1−Pj=1 vj )xk = vi e (1 − vj ) e dv1 . . . dvk−1 S k−1 i=1 j=1 Z  Y  X k−1 k−1 k−1 xk αi−1 αk −1 Pj=1 vj (xj −xk) = e vi (1 − vj ) e dv1 . . . dvk−1 S k−1 i=1 j=1 Z Y X k k i=1 Γ(αi) xk (k−1) = k e Φ2 α1,...,αk−1; αi; (x1 − xk),..., (xk−1 − xk) , Γ(Q i=1 αi) i=1 X  (n) P (n) where, Φ2 denotes Erd´elyi’s confluent form of the fourth Lauricella function FD (see [25] Sec.1.4) and where the multiple integral term in the penultimate line above, multiplied by Γ(α1 + ··· + k αk)/ i=1 Γ(αi), is recognised as being a representation for this confluent form. (See [7]). Finally, we have the density for Y = Z1 + ··· + Zk Q α1 αk α1+···+αk−1 β1 ...βk t α1−1 αk−1 fY (t)= −∞Dx1 ... −∞Dxk exp[x1,...,xk]|xi=−βit,i=1,...,k Γ(α1) ... Γ(αk) k α1 αk α1+···+αk−1 β1 ...βk t −βkt (k−1) = e Φ2 α1,...,αk−1; αi; (βk − β1)t, . . . , (βk − βk−1)t , t> 0 Γ(α + ··· + αk) 1 i=1 X  which can be seen to be an equivalent expression to Eqn.(9) given in [14] and to Eqn.(6) in [7] and reduces to the expression for the density given earlier for k = 2.

Appendix A

A.1. Proof of Proposition 6.1

Proof. We prove this in two parts: (a) Examine the differential of f[a1,a2,...,ak] w.r.t. a1 as a limit as follows:

∂ f[a1 + h,a2,...,ak] − f[a1,a2,...,ak] f[a1,a2,...,ak] = lim ∂a h→0 h 1   f[a + h,a ,...,a ] − f[a ,a ,...,a ] = lim 1 2 k 1 2 k h→0 (a + h) − a  1 1  = lim f[a1,a2,...,ak,a1 + h] h→0 (2) = f[a1 ,a2,...,ak].

1 1 (b) Consider the derivative of f[u1,...,un,a2,...,ak], n> 1, w.r.t. a1 and where each argument 1 ui is a function of a1: n ∂ ∂ du1 f[u1,...,u1 ,a ,...,a ]= f[u1,...,u1 ,a ,...,a ] i ∂a 1 n 2 k ∂u1 1 n 2 k da 1 i=1 i 1 Xn du1 = f[u1,u1,...,u1 ,a ,...,a ] i , i 1 n 2 k da i=1 1 X 1 using (a). Now define ui = a1 for i =1,...,n. Hence we have

∂ (n) (n+1) f[a1 ,a2,...,ak]= nf[a1 ,a2,...,ak]. ∂a1 /On the density for sums of independent exponential, Erlang and gamma variates 20

Using (a) and (b), we therefore have

2 ∂ ∂ (2) 2 f[a1,a2,...,ak]= f[a1 ,a2,...,ak] ∂a1 ∂a1 (3) =2f[a1 ,a2,...,ak].

It follows then that (b) taken with (a), the proposition is proved. See also [9] Ch. 2.

A.2. Proof of Lemma 6.1

Proof. We recall the general Leibniz rule for m differentiable functions gi(x), i =1,...,m:

n ∂ n! (r1) (rm) n {g1(x) ...gm(x)} = g1 ...gm ∂x r1! ...rm! r1+···+rm=n rXj ≥0

and note that dk 1 (−1)k(n + k − 1)! = , for n ∈ N. dak an (n − 1)!an+k   The partial derivative for the divided difference f[a1,...,am] in the lemma is then found by first invoking its Lagrange polynomial representation as follows:

m m ∂k ∂k 1 f[a ,...,a ]= f(a ) k1 k 1 m k1 k i m m (ai − aq) ∂a1 ...∂am ∂a1 ...∂am i=1 q=1 n X qY=6 i o m m ki ∂ kq! = k f(ai) k +1 i (ai − aq) q i=1 ∂ai q=1 X n qY=6 i o m m ri rq f (ai) (−1) (kq + rq)! = ki! k +r +1 ri! (ai − aq) q q rq! i=1 r1+···+rm=ki q=1 X rXj ≥0 qY=6 i (using the general Leibniz rule) m m ki−ri ri (−1) f (ai) (kq + rq)! = ki! k +r +1 . ri! (ai − aq) q q rq! i=1 r1+···+rm=ki q=1 X rXj ≥0 qY=6 i

Acknowledgements

The author would like to thank Corina Constantinescu and Wei Zhu for helpful discussions. In addition, the author is pleased to acknowledge the valuable comments and suggestions of the two anonymous reviewers.

This is a post-peer-review, pre-copyedit version of an article published in Statistical Papers. The final authenticated version is available online at: https://doi.org/10.1007/s00362-021-01256-x

Declarations

No financial was provided for the conduct of the research and/or preparation of this manuscript.

The author has no conflicts of interest to declare that are relevant to the content of this manuscript. /On the density for sums of independent exponential, Erlang and gamma variates 21

References

[1] Akkouchi M (2008) On the convolution of exponential distributions. J. Chungcheong Math. Soc. 21, 501–510. [2] Amari SV and Misra RB (1997) Closed-form expressions for distribution of sum of exponential random variables. IEEE Trans. Reliability. 46, 519-522. [3] Atkinson KE (1989) An Introduction to Numerical Analysis, 2nd edn. New York: John Wiley and Sons. [4] Baxter BJC and Iserles A (1997) On approximation by exponentials. Ann. Numer. Math. 4, 39–54. [5] Baxter BJC and Brummelhuis R (2011) Functionals of exponential Brownian motion and divided differences. J. Comput. Appl. Math. 236, 424-433. [6] Coelho CA (1998) The generalized integer —A basis for distributions in multivariate statistics. J. Multivariate Anal. 64, 86-102. [7] Di Salvo F (2008) A characterization of the distribution of a weighted sum of gamma variables through multiple hypergeometric functions. Integral Transforms Spec. Funct., 19, 563-575. [8] Harrison PG (1990) Laplace transform inversion and passage-time distributions in Markov processes. J. Appl. Probab. 27, 74-87. [9] Hildebrand, FB (1956) Introduction to Numerical Analysis. New York: McGraw-Hill. [10] Jameson GJO (2016) The incomplete gamma functions. Math. Gaz. 100, 298-306. [11] Jasiulewicz H and Kordecki W (2003) Convolutions of Erlang and of Pascal distributions with applications to reliability. Demonstr. Math. 36, 231–238. [12] Khuong HV and Kong H-Y (2006) General expression for pdf of a sum of independent expo- nential random variables. IEEE Commun. Lett. 10, 159-161. [13] Li C, Qian D and Chen Y (2011) On Riemann-Liouville and Caputo derivatives, Discrete Dyn. Nat. Soc. Article ID 562494, 15 pages. [14] Mathai AM (1982) Storage capacity of a dam with gamma type inputs, Ann. Inst. Statist. Math. 34, 591–597. [15] Miller KS and Ross B (1993) An Introduction to the Fractional Calculus and Fractional Differential Equations. New York: John Wiley and Sons. [16] Nadarajah S and Kotz S (2005) On the linear combination of exponential and gamma random variables. Entropy. 7, 161–171. [17] Oldham KB and Spanier J (1974) The Fractional Calculus, New York: Academic Press. [18] Olver FWJ, Lozier DW, Boisvert RF and Clark CW (2010) NIST Handbook of Mathematical Functions. Cambridge, UK: UIT Cambridge. [19] Ostrowski AM (1966) Solution of Equations and Systems of Equations. 2nd edn. New York: Academic Press. [20] Podlubny I (1999) Fractional Differential Equations. San Diego: Academic Press. [21] Ross S (1997) Introduction to Probability Models. 6th edn. New York: Academic Press Inc. [22] Samko SG, Kilbas AA and Marichev OI (1993) Fractional Integrals and Derivatives: Theory and Applications. New York: Gordon and Breach. [23] Schatzman M (2002) Numerical Analysis: A Mathematical Introduction. New York: Clarendon Press/Oxford University Press. [24] Sim CH (1992) Point processes with correlated gamma interarrival times, Stat. Probab. Lett. 15, 135–141. [25] Srivastava HM and Karlsson PW (1985) Multiple Gaussian Hypergeometric Series, New York: Dover.