8
285 0894-9840/04/0100-0285/0 © 2004 Plenum Publishing Corporation Journal of Theoretical Probability, Vol. 17, No. 1, January 2004 (© 2004) On Sums of Products of Bernoulli Variables and Random Permutations Anatole Joffe, 1 Éric Marchand, 2 François Perron, 1, 4 and Paul Popadiuk 3 1 Département de Mathématiques et de Statistique, C.P. 6128, Succursale Centre-Ville, Montréal, Québec, Canada H3C 3J7. 2 Department of Mathematics and Statistics, P.O. Box 4400, Fredericton, New Brunswick, Canada E3B 5A3. 3 Department of Mathematics and Statistics, 7141 Sherbrooke St. West, Montréal, Québec, Canada H4B 1R6. 4 To whom correspondence should be addressed. E-mail: [email protected] Received November 22, 2002 Let {X k } k \ 1 be independent Bernoulli random variables with parameters p k . We study the distribution of the number or runs of length 2: that is S n =; n k=1 X k X k+1 . Let S=lim n Q . S n . For the particular case p k =1/(k+B), B being given, we show that the distribution of S is a Beta mixture of Poisson distributions. When B=0 this is a Poisson(1) distribution. For the particular case p k =p for all k we obtain the generating function of S n and the limiting distribution of S n for p=`lh +O(1/`n ). KEY WORDS: Random permutations; Poisson distribution; Bernouilli random variables. 1. INTRODUCTION Let {X k } k \ 1 be independent Bernoulli random variables where the distri- bution of X k is q k d 0 +p k d 1 , p k =1−q k in (0, 1). Let S n =; n k=1 X k X k+1 ; this random integer can be interpreted as the number of runs of length 2. If ; . k=1 p k p k+1 < ., the Borel Cantelli lemma shows that S=; . k=1 X k X k+1 exists almost surely. In the particular case p k = 1 k for all k, P. Diaconis observed around 1996 that S is Poisson distributed with mean 1. Neither his combinatorial proof of this surprising result nor the proof discovered by M. Emery a few

On Sums of Products of Bernoulli Variables and Random Permutations

Embed Size (px)

Citation preview

Page 1: On Sums of Products of Bernoulli Variables and Random Permutations

285

0894-9840/04/0100-0285/0 © 2004 Plenum Publishing Corporation

Journal of Theoretical Probability, Vol. 17, No. 1, January 2004 (© 2004)

On Sums of Products of Bernoulli Variables andRandom Permutations

Anatole Joffe,1 Éric Marchand,2 François Perron,1, 4 and Paul Popadiuk3

1Département de Mathématiques et de Statistique, C.P. 6128, Succursale Centre-Ville,Montréal, Québec, Canada H3C 3J7.2Department of Mathematics and Statistics, P.O. Box 4400, Fredericton, New Brunswick,Canada E3B 5A3.3Department of Mathematics and Statistics, 7141 Sherbrooke St. West, Montréal, Québec,Canada H4B 1R6.4 To whom correspondence should be addressed. E-mail: [email protected]

Received November 22, 2002

Let {Xk}k \ 1 be independent Bernoulli random variables with parameters pk. Westudy the distribution of the number or runs of length 2: that is Sn=;n

k=1 XkXk+1.Let S=lim nQ. Sn. For the particular case pk=1/(k+B), B being given, weshow that the distribution of S is a Beta mixture of Poisson distributions. WhenB=0 this is a Poisson(1) distribution. For the particular case pk=p for all k weobtain the generating function of Sn and the limiting distribution of Sn forp=`lh+O(1/`n).

KEY WORDS: Random permutations; Poisson distribution; Bernouilli randomvariables.

1. INTRODUCTION

Let {Xk}k \ 1 be independent Bernoulli random variables where the distri-bution of Xk is qkd0+pkd1, pk=1−qk in (0, 1). Let Sn=;n

k=1 XkXk+1; thisrandom integer can be interpreted as the number of runs of length 2.If ;.

k=1 pk pk+1 <., the Borel Cantelli lemma shows that S=;.

k=1 XkXk+1exists almost surely.In the particular case pk=

1k for all k, P. Diaconis observed around

1996 that S is Poisson distributed with mean 1. Neither his combinatorialproof of this surprising result nor the proof discovered by M. Emery a few

Page 2: On Sums of Products of Bernoulli Variables and Random Permutations

months later has ever been published, (see Emery (3)). The aim of this paperis to provide a third proof which is both simple and analytic. Furthermore,in Section 2 the Diaconis result is extended to the case pk=

1k+B where

B > 0 by showing (Part (c) of Theorem 1)

E(sS)=B F1

0(1−l)B−1 el(s−1) dl,

that is to say, there exists a random variable L such that the joint distri-bution of (S, L) can be described as follows: L is beta distributed withparameters (1, B), and the distribution of S conditioned by L is Poissonwith mean L. Diaconis result follows from this by letting BQ 0, since thelimit distribution of L is d1.The method of proof is based on the observation that (Sn, Xn+1)

defines a nonhomogeneous Markov chain. Its distribution can be com-puted for general pk’s. Specializing to pk=

1k+B and letting nQ. will give

part (c) of Theorem 1. Section 3 contains remarks concerning the casep1=p2=·· ·=pn=p, and a commentary on the literature.Section 4 is devoted to the case pk=

1k+B where B is assumed to be

a nonnegative integer. In this case the distribution of Sn is related tothe random permutation p of En+B={1, 2,..., n+B}. For such a p letc1, c2,..., cK be the K cycles of p ordered in the following way: c1 contains 1and for 1 < k [K, ck contains the minimum element of En+B 01k−1

j=1 cj.Finally, define T(p) as the smallest k such that |c1 |+|c2 |+· · ·+|ck | \ n anddefine Zn(p) as the number of j [ T(p) such that |cj |=1. As an example ifn=5, B=3, and p=(2)(4)(3, 8)(1, 5, 6, 7), then c1=(1, 5, 6, 7), c2=(2),c3=(3, 8), c4=(4), T(p)=2, Zn(p)=1. Theorem 3 shows that the distri-bution of Sn and Zn(p) coincide.The proofs in this article are based on generating functions and simple

combinatorics. Therefore, they are elementary.

2. THE DIACONIS RESULT AND ITS EXTENSION

Let Gn(s) :=E(sSn) be the generating function of Sn, with the con-vention S0=0. Introduce the sequence Wn :=Sn−1+Xn, n \ 1 and letHn(s) :=E(sWn) be its generating function.Clearly for general pk the expression E(sSntXn+1) is an affine function

of t. It follows that An and Bn are implicitly defined by

E(sSntXn+1)=An(s)+tBn(s). (1)

286 Joffe, Marchand, Perron, and Popadiuk

Page 3: On Sums of Products of Bernoulli Variables and Random Permutations

Obviously

Gn(s)=An(s)+Bn(s), (2)

Hn+1(s)=An(s)+sBn(s). (3)

Note that A0=q1, and B0=p1. For p ¥ (0, 1), q=1−p define the matrix

Ms(p)=rq q

p pss .

Proposition 1. For n \ 1:

rAn(s)Bn(s)s=Ms(pn+1)r

An−1(s)

Bn−1(s)s (4)

=Ms(pn+1) · · ·Ms(p1)r1

0s . (5)

Proof. Expression (5) follows from (4). Conditioning by Xn+1 gives

E(sSntXn+1)=qn+1E(sSn−1)+pn+1tE(sSn−1+Xn)

then using (1), (2), and (3)

An+tBn=qn+1(An−1+Bn−1)+pn+1t(An−1+sBn−1),

which is equivalent to (4).

Corollary 1. With the convention G0=1 and H0=1

(a) The probability generating functions Gn and Hn satisfy:

r Gn(s)Hn+1(s)s=MT

s (pn+1)rGn−1(s)

Hn(s)s , for n \ 0.

(b) For n \ 1,

Hn+1(t)−Hn(t)=(t−1)[pn+1Hn(t)−pnqn+1Hn−1(t)].

(c) When pk(1−pk+1)=apk+1 for some a \ 1,

Hn+1(t)−Hn(t)=(t−1) pn+1[Hn(t)−aHn−1(t)] for n \ 1.

On Sums of Products of Bernoulli Variables and Random Permutations 287

Page 4: On Sums of Products of Bernoulli Variables and Random Permutations

Proof. Part (a) follows from (4) of Proposition 1 by solving (2) and(3) for An(s) and Bn(s) in term of Gn(s) and Hn+1(s). Part (b) follows fromformula (3) and (4). Part (c) is an obvious consequence of (b).

Remark. Here is an alternative probabilistic proof of part (b) ofCorollary 1. Let Kn :=max{a: 0 [ a [ n and Xa=1} be the arrival time ofthe last success in the sequence X1,..., Xn, with the convention X0=1.Since, for n \ 1, L(Wn | Kn=n)=L(1+Wn−1),L(Wn | Kn=j)=L(Wj−1)for 1 [ j [ n−1 and P[Kn=j]=(1−pn) P[Kn−1=j] for j=0, 1,..., n−1,n \ 1, then letting H−1=1, it follows that

Hn(t)=Cn

j=0P[Kn=j] E[tWn | Kn=j]

=Cn−1

j=0qnP[Kn−1=j] Hj−1(t)+pntHn−1(t)

=qn 53 Cn−2

j=0P[Kn−1=j] Hj−1(t)+pn−1tHn−2(t)4−pn−1(t−1) Hn−2(t)6

+pntHn−1(t)

=qn[Hn−1(t)−pn−1(t−1) Hn−2(t)]+pntHn−1(t)

=Hn−1(t)+(t−1)[pnHn−1(t)−qn pn−1Hn−2(t)],

as proposed.Observe that a=1 implies that pk=

1k+B for some B \ 0.

In the sequel (a)n=a(a+1) · · · (a+n−1) denotes the ascending fac-torial and the usual notation for the hypergeometric functions is used (seeLebedev (8)).

Lemma 1. Suppose that pk=1k+B withB \ 0 then

(a) Hn(t)=;nk=0

(t−1)k

(1+B)kand Gn(t)=1+;n

k=1(t−1)k

(1+B)kn+1−kn+B+1 .

(b) The probability generating function of S is E[tS]=1 F1(1, 1+B;t−1).

Proof. Part (c) of Corollary 1, with a=1, implies thatHn+1(t)=Hn(t)+[H1(t)−H0(t)]<n

k=1 (t−1) pk+1=Hn(t)+(t−1)n+1<n+1

k=1 pk, sinceH1(t)=1+(t−1) p1 and H0(t)=1. The probability generating function for Hnis derived from this recurrence, and leads to that of Gn via part (a) ofCorollary 1. Part (b) follows from part (a) as a limiting case when nQ..

288 Joffe, Marchand, Perron, and Popadiuk

Page 5: On Sums of Products of Bernoulli Variables and Random Permutations

Lemma 1 leads immediately to

Theorem 1. Suppose that pk=1k+B ; B \ 0. Then

(a) P[Wn=j]=1

(1+B)j;n−jk=0

(−1)k

k!(j+1) k(j+1+B)k

; j=0, 1,..., n.(b) Wn admits the following mixture representation:

P[Wn=j]=B F1

0pl(j)(1−l)B−1 dl

with pl(j)=lj

j! ;n−jk=0

(−l)k

k! , j=0, 1,..., n.

As a limiting case when B=0, the law ofWn is given by p1(j).

(c) The distribution of S admits the following beta mixture ofPoisson representation: S | l=L Poisson(l) where l=L Beta(1, B).

As a limiting case when B=0, S has a Poisson distribution with mean 1.

Proof. Part (a) is an immediate consequence of Lemma 1. Part (b)follows by a direct computation from part (a) and part (c) follows bytaking the limit as nQ. and BQ 0.

Remark. Note the following consequences

(1) E(S)= 11+B ,

(2) Var(S)= 11+B [1+

B(1+B)(2+B)],

(3) the nth factorial moment of S is n!(1+B)n

,(4) P[S=k]= 1

(B+1)k 1F1(k+1, k+B+1;−1), k=0, 1, 2,...,

which may be derived from the probability generating function of S, oralternatively from the mixture representation. The distribution of S is ofthe GHF type (Generalized Hypergeometric Factorial), and its representa-tion is known (see Johnson et al., (6) Chapter 2).

Remark. The distribution of Wn | l arises in the ‘‘Poisson variation’’of the classical matching problem introduced in Rawlings. (10)

3. CASES WHERE pk=p

In the particular case where the Xk are identically distributed, pk=p,k=1,..., n, the distribution of Sn is known to be type II binomial of order 2.Type II binomial distributions of order k were introduced in Ling (9) and anexplicit expression has been given in Hirano et al. (5) In the next theorem asimpler expression for the case k=2 is found. There is a huge statistical

On Sums of Products of Bernoulli Variables and Random Permutations 289

Page 6: On Sums of Products of Bernoulli Variables and Random Permutations

literature devoted to the problem of runs, see, for instance, Ref. 1 in whichthe (Xk)’s form a time homogeneous Markov chain.

Theorem 2. Whenever pk=p for all k,

(a) Hn(s)=(ln+11 −ln+12 )/(l1−l2) and Gn(s)=(l

n+11 [1−l2]−

ln+12 [1−l1])/(l1−l2) where l i, i=1, 2 are the eigenvalues ofthe matrixMs(p).

(b) If p varies with n in such a way that p=`l/n+o(1/`n), thenthe asymptotic law of S is Poisson with parameter l.

Proof. Whenever pk=p for all k it follows from corollary 1 that

r Gn(s)Hn+1(s)s=(MT

s (p))n+1 r1

1s .

Part (a) follows either by diagonalising the matrix Ms(p) or by standardtechniques for solving difference equations. For part (b) observe that: l1={q+ps+`(q+ps)2−4(s−1) pq}/2 and l2=q+ps−l1, from which itfollows that l1=1+(s−1) l/n+o(1/n) while l2=(s−1)`l/n+o(1/`n).Hence as nQ., Hn(s) converges to exp(l(s−1)).Here is an interpretation for the random variables Sn and Wn in the

case of equal pk’s. In sporting events such as badminton or squash, twoplayers (say Player I and Player II) compete in a series of rallies with apoint marked if and only if a player wins a rally with the serve. AssumePlayer I wins a given rally with probability p, the outcomes of the ralliesare independent, and Player I begins with the serve. Let Xi=1 if Player Iwins the ith rally, and Xi=0 otherwise. Let Ti=1 if Player I scores a pointin the ith rally, and Ti=0 otherwise. Hence T1=X1, Tk=Xk−1Xk fork=2,..., n, the distribution of the number of points scored by Player I aftern rallies matches that of Wn, while the distribution of the number of pointsscored by Player I after n rallies matches that of Sn−1 if Player I does notstart with the serve.

4. COMBINATORIAL INTERPRETATION

This approach relies on the connection between the distributions ofWnand Zn, where Zn arises in the matching type problem that follows.Assume that the elements 1, 2,..., n+B, (B ¥ {0, 1, 2,...}) are permuted

according to a uniformly generated permutation p. This random permuta-tion can be generated in the following way, which goes back at least toFeller. (4)

290 Joffe, Marchand, Perron, and Popadiuk

Page 7: On Sums of Products of Bernoulli Variables and Random Permutations

First, draw element p(1). If p(1)=1, a cycle of length 1 is completedand we start over with elements 2. If p(1)=j with j ] 1, draw p(j),p(p(j)),... and so on until element 1 is drawn completing a cycle. Continuethe process with the remaining elements (in increasing order). The problemis to determine the distribution of the number of matches (or fixed points)Zn among the first n such drawn elements.Equivalently, Zn may be defined as the number of cycles of length 1

among the first n draws. The next result establishes the equivalencebetween the distributions of Zn andWn. It is followed by a derivation of theprobability generating functionMn(t)=E[tZn].5

5 Since the case B=0 is the classical matching case, the distributions of Wn and S given inTheorem 4 for B=0 may be obtained directly from the well known distribution of Zn.

Theorem 3. For n \ 1, the distribution of Zn is identical to that ofWnwith pk=

1k+B .

Proof. Define the Bernoulli random variables {Yk}nk=1 as Yk=1 if

and only if a cycle is completed at the kth drawing. It follows that a matchoccurs for the first drawing if and only if Y1=1, and on the kth drawingif and only if Yk−1Yk=1. Hence Zn=

L Y1+;nk=2 YkYk−1, with P(Yk=1)=

1−P(Yk=0)=1

n+B−k+1 .Finally, setXk=Yn−k+1 , k=1,..., n; which implies Zn=

L Xn+;n−1k=1XkXk+1

=L Wn, since the Xk’s are also independent Bernoulli random variables withpk=P(Xk=1)=P(Yn−k+1=1)=

1B+k .

Theorem 4. The probability generating function of Zn is given by

Mn(t)=Cn

k=0

(t−1)k

(1+B)k.

Proof. Conditioning on the length y of the first cycle, since the lengthis uniformly distributed on {1,..., n+B}, we have

Mn(t)=Cn+B

j=1E[tZn | y=j]

1n+B

=1n+B5tMn−1(t)+C

n

j=2Mn−j(t)+B6 .

Now, consider the expression (n+B+1) Mn+1(t)−(n+B) Mn(t), to obtainthe recurrence

Mn+1(t)−Mn(t)=(t−1)n+B+1

[Mn(t)−Mn−1(t)],

On Sums of Products of Bernoulli Variables and Random Permutations 291

Page 8: On Sums of Products of Bernoulli Variables and Random Permutations

which coincides with the recurrence given in part (c) of Corollary 1. Con-sequently, the proof of Theorem 1 yields the result.Let Cj, j=1, 2,..., n denote the number of cycles of length j in a

random permutation of {1, 2,..., n}. It is easy to see that for j > 1

Cj=Cn−j

i=0Xi(1−Xi+1) · · · (1−Xi+j−1) Xi+j with X0=1. (6)

In the case B=0 the joint distribution of C1,..., Cn has been extensivelystudied. Reference 2 contains new results and is a good reference on theorigin of the subject. In particular as nQ. the joint distribution ofC1,..., Ck converges to independent Poisson distributions with means(1, 1/2,..., 1/k). If we merely consider sums of the form (6) the result issurprising, since (6) does not suggest the use of combinatorial tools. Itwould be interesting to have an analytic proof of this limit law, since in thecase B ] 0 the combinatorial interpretation is lost.

ACKNOWLEDGMENTS

We are grateful to G. Letac for his comments. This led to a consider-able improvement of Ref. 7 which is the basis of this paper.

REFERENCES

1. Antzoulakos, D., and Chadjiconstantinidis, S. (2001). Distributions of numbers of successruns of fixed length in Markov dependent trials. Ann. Inst. Statist. Math. 53, 599–619.

2. Arratia, R., and Tavaré, S. (1992). The cycle structure of random permutations. Ann.Probab. 20, 1567–1591.

3. Emery, M. (1998). Sur un problème de Diaconis, unpublished manuscript.4. Feller, W. (1971). An Introduction to Probability Theory and Its Applications, 2nd ed.,Vol. II, Wiley, New York.

5. Hirano, K., Aki, S., Kashiwagui, N., and Kuboki, H. (1991). On Ling’s binomial andnegative binomial distributions of order k. Statist. Probab. Lett. 11, 503–509.

6. Johnson, N. L., Kotz, S., and Kemp, A. W. (1992). Univariate Discrete Distributions,2nd ed., Tome 1, Wiley, New York.

7. Joffe, A., Marchand, E., Perron, F., and Popadiuk, P. (2000). On a Particular Sum ofDependent Bernoulli and Its Relationship to a Matching Type Problem, Technical Report#2686, Centre de Recherches Mathématiques, Université de Montréal.

8. Lebedev, N. N. (1972). Special Functions and Their Applications, Dover, New York.9. Ling, K. D. (1988). On binomial distributions of order k. Statist. Probab. Lett. 6,247–250.

10. Rawlings, D. (2000). The Poisson variation of Montmort’s matching problem. Math.Mag. 73, 232–234.

Printed in Belgium

292 Joffe, Marchand, Perron, and Popadiuk