taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.2.10-6

Exercise 1.2.10-6

not stated yet in Lean solution written

RatingHM27
MarkersHM (needs higher mathematics)
KindK3, find a value: compute a number, a set or a closed form from the written solution
SectionSection 1.2.10 of Volume 1. Companion chapter: Analysis of an algorithm

The task

Find the third semi-invariant κ3\kappa_3 for the distributions (8), (18) and (20).

The exact wording is in your copy of the book.

Hints

Open one hint at a time. Try the exercise again after each.

Hint 1

Expand ln⁡G(et)\ln G(e^t) to the term t3t^3. For a product, the semi-invariants add.

Hint 2

For (8) the factor z+k−1k\frac{z+k-1}k is a coin series with p=1kp=\frac1k. For (20) write ln⁡G(et)\ln G(e^t) with H(t)=ln⁡et−1tH(t)=\ln\frac{e^t-1}t.

Solution

Show the solution

By (23), κ3=3! [t3]ln⁡G(et)\kappa_3=3!\,[t^3]\ln G(e^t).

Coin series (18). ln⁡(q+pet)=ln⁡(1+p(t+t22+t36+⋯ ))\ln(q+pe^t)=\ln\bigl(1+p(t+\frac{t^2}2+\frac{t^3}6+\cdots)\bigr). With u=p(t+t2/2+t3/6)u=p(t+t^2/2+t^3/6) we use ln⁡(1+u)=u−u2/2+u3/3\ln(1+u)=u-u^2/2+u^3/3. The coefficient of t3t^3 is p6−12p2+13p3\frac p6-\frac12p^2+\frac13p^3, times 3!3! gives p−3p2+2p3=p(1−p)(1−2p)=pq(q−p)p-3p^2+2p^3=p(1-p)(1-2p)=pq(q-p). So for nn tosses κ3=npq(q−p)\kappa_3=npq(q-p).

Distribution (8). By (8), Gn=∏k=2nQkG_n=\prod_{k=2}^nQ_k with Qk=z+k−1k=q+pzQ_k=\frac{z+k-1}k=q+pz, p=1kp=\frac1k. The semi-invariants of a product add, so κ3=∑k=2n1k(1−1k)(1−2k)\kappa_3=\sum_{k=2}^n\frac1k\bigl(1-\frac1k\bigr)\bigl(1-\frac2k\bigr). The term k=1k=1 is 00, so the sum runs over 1≤k≤n1\le k\le n:

κ3=∑k=1n(1k−3k2+2k3)=Hn−3Hn(2)+2Hn(3).\kappa_3=\sum_{k=1}^n\Bigl(\frac1k-\frac3{k^2}+\frac2{k^3}\Bigr)=H_n-3H_n^{(2)}+2H_n^{(3)}.

Uniform distribution (20). G(et)=1n∑j=1nejt=et(ent−1)n(et−1)G(e^t)=\frac1n\sum_{j=1}^ne^{jt}=\frac{e^t(e^{nt}-1)}{n(e^t-1)}, so ln⁡G(et)=t+H(nt)−H(t)\ln G(e^t)=t+H(nt)-H(t) with H(t)=ln⁡et−1tH(t)=\ln\frac{e^t-1}t. Then H′(t)=etet−1−1t=1+1t(tet−1−1)H'(t)=\frac{e^t}{e^t-1}-\frac1t=1+\frac1t\bigl(\frac t{e^t-1}-1\bigr). With tet−1=∑k≥0Bktk/k!\frac t{e^t-1}=\sum_{k\ge0}B_kt^k/k! this is H′(t)=1+∑k≥1Bktk−1/k!H'(t)=1+\sum_{k\ge1}B_kt^{k-1}/k!. Integrate with H(0)=0H(0)=0: H(t)=t+∑k≥1Bktkk⋅k!H(t)=t+\sum_{k\ge1}\frac{B_kt^k}{k\cdot k!}. Hence for k≥2k\ge2 the coefficient of tk/k!t^k/k! in ln⁡G(et)\ln G(e^t) is (nk−1)Bk/k(n^k-1)B_k/k, so κk=(nk−1)Bkk\kappa_k=\frac{(n^k-1)B_k}k. For k=3k=3, B3=0B_3=0, so κ3=0\kappa_3=0. (The distribution is symmetric about its mean.)

Check

For n=6n=6 the distribution (8) has κ3=427712000\kappa_3=\frac{4277}{12000} by the direct central moment ∑(k−μ)3pk\sum(k-\mu)^3p_k, and the formula H6−3H6(2)+2H6(3)H_6-3H_6^{(2)}+2H_6^{(3)} gives the same fraction. For n=5n=5, p=13p=\frac13: κ3=5⋅13⋅23⋅13=1027\kappa_3=5\cdot\frac13\cdot\frac23\cdot\frac13=\frac{10}{27} agrees. For the uniform case with n=7n=7 the third central moment is 00.

Remarks

For the same method κ2=n2−112\kappa_2=\frac{n^2-1}{12} in the uniform case, which is the variance (n+1)(n−1)/12(n+1)(n-1)/12 of (22). The coin series has the nice value κ3=npq(q−p)\kappa_3=npq(q-p), and κ4\kappa_4 has no such pattern.

This solution is drafted, and a person has not reviewed it yet. The source.

In Lean

not stated yet The exercise is not stated in Lean yet.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.