834 CHAPTER 39. STATISTICAL TESTS

As to the last assertion, (a1 +a2 + · · ·+ar)n =

(a1 +a2 + · · ·+ar)(a1 +a2 + · · ·+ar) · · ·(a1 +a2 + · · ·+ar)

where there are n products. Thus this product equals a sum of terms of the form av11 av2

2 · · ·avrr

where ∑k vk = n. How many are there for a given choice of exponents v1,v2, · · · ,vr? it isthe number of ways of picking v1 factors from the above product to go with av1

1 ,v2 factorsto go with av2

2 and so forth. Thus the total number associated with a particular term of thisform is n!

v1!v2!···vr! and this proves the second part. ■

Proposition 39.6.2 Let pk,Vk be as described above where F (x) is a given distributionfunction. Then if n is large, Q(n) is distributed approximately as X 2 (r−1) where thereare r disjoint intervals covering R.

Proof: Assume the Xk are samples from F (x). Then the Vk have a multinomial distri-bution. That is

P(V1 = v1,V2 = v2, · · · ,Vr = vr) =n!

v1!v2! · · ·vn!pv1

1 · · · pvrr , ∑

kvk = n.

Indeed, the probability that any Xk is in Si is pi and so the probability that there are vi ofthem in Si is as claimed above. Then consider the moment generating function

M (t1, · · · , tr) ≡ E

(exp

r

∑k=1

tkVk

)

= ∑v1+···+vr=n

n!v1!v2! · · ·vn!

pv11 · · · p

vrr et1v1 · · ·etrvr

By Lemma 39.6.1 this equals (p1et1 + · · ·+ pretr

)n (39.16)

Now consider the moment generating function of the vector(V1−np1√

np1· · · Vk−npk√

npk

).

Then

E

(∑k

tkVk−npk√

npk

)= e−∑k tk

npk√npk E

(∑k

tk√npk

Vk

)From 39.16, this equals

Mn (t1, · · · , tr) = e−∑k tk

npk√npk

(p1e

t1√np1 + · · ·+ pretr√npr

)n

Taking ln of this, and simplifying a little,

ln(Mn) =−∑k

tk√

pkn+n ln(

p1et1√np1 + · · ·+ pre

tr√npr

)

834 CHAPTER 39. STATISTICAL TESTSAs to the last assertion, (a) +42 +---+,)" =(a, tag +---+a,) (aj tao +++ +a,)-++ (a; a2 +++: +a,)where there are n products. Thus this product equals a sum of terms of the form a}! ay savewhere ));.vz =n. How many are there for a given choice of exponents v1,v2,--- ,v,? it isthe number of ways of picking v; factors from the above product to go with a}! , v2 factorsto go with a; and so forth. Thus the total number associated with a particular term of thisform is arin and this proves the second part. HiProposition 39.6.2 Let px,V,; be as described above where F (x) is a given distributionfunction. Then if n is large, Q(n) is distributed approximately as 2 (r—1) where thereare r disjoint intervals covering R.Proof: Assume the X;, are samples from F (x). Then the V; have a multinomial distri-bution. That isn!P(Vi = vi,Va= vay++ Ve = Ve) = Ps Dirk =nIndeed, the probability that any X; is in S; is p; and so the probability that there are v; ofthem in S$; is as claimed above. Then consider the moment generating functionrM(t,:--,t-) = E [ow aek=1n!= » It. Pl -pyretl...elrrVpte+ypSn Vi -V2-By Lemma 39.6.1 this equals(pie! +--+ pre)" (39.16)Now consider the moment generating function of the vectorVi=np, | VemVip ViPKThenVie — np Yip ty SPR tkE t, ———_ ] =e v™Pk FY Vi(E V1Pk py VNPkFrom 39.16, this equals- AP me \nMn (th,+** str) =e Da (pew + pew )Taking In of this, and simplifying a little,= trIn(M,,) = —\ te /pen+nin (rie +--+ previ )k