Let Y = X1 + … + Xn with independent, identically distributed summands. Independence turns the expectation of a product into a product of expectations, so the moment generating function of the sum is ψY(t) = ψX(t)n (Lemma 3.31), and its logarithm is n log ψX(t). The slope of log ψY at t = 0 is E(Y) and its curvature is V(Y). Because an mgf determines its distribution (Theorem 3.33), recognising ψXn in the table of Section 3.6 tells us the exact law of the sum, which the right panel checks against simulation.
The empirical curve is the logarithm of (1/R)∑r exp(tYr). It is reliable near t = 0 and becomes noisy for large |t|, where a few extreme sums carry all the weight. The moments "from ψ" use central differences of ψX at 0 with step 10−4 and the product rule: ψY′(0) = nψ′(0), ψY″(0) = n(n − 1)ψ′(0)2 + nψ″(0). The normal summands have mean 1.
code/ch03_expectation.py (mgf_sum_study, mgf, mgf_moments, sum_law, irwin_hall_pdf).