Solution (source code)

= Solution

An <Edgeworth expansion> refines the <central limit theorem> by incorporating higher <cumulants>. For iid centred observations with <variance> $\sigma^2$, standardized sum $Z_n=\sum_iX_i/(\sigma\sqrt n)$, standardized third cumulant $\gamma_1=\kappa_3/\sigma^3$ and fourth cumulant $\gamma_2=\kappa_4/\sigma^4$, its central-region density expansion is
$$
f_{Z_n}(z)=\phi(z)\left[1+\frac{\gamma_1}{6\sqrt n}H_3(z)+\frac1n\left\{\frac{\gamma_2}{24}H_4(z)+\frac{\gamma_1^2}{72}H_6(z)\right\}\right]+o(n^{-1}),
$$
under sufficient moment and smoothness/nonlattice conditions. Here $H_3=z^3-3z$, $H_4=z^4-6z^2+3$, $H_6=z^6-15z^4+45z^2-15$ are probabilists' <Hermite polynomials>. Expanding the characteristic exponent gives the cubic and quartic terms, while squaring the cubic term in the exponential gives the $H_6$ correction. Integrating the first correction, using $(\phi H_{k-1})'=-\phi H_k$, gives
$$
\boxed{\mathbb P(Z_n\leq z)=\Phi(z)+\frac{\gamma_1}{6\sqrt n}(1-z^2)\phi(z)+O(n^{-1}).}
$$
Thus skewness determines the first departure from the <normal approximation>; inversion gives a <Cornish-Fisher expansion> for <quantiles>. These are asymptotic expansions, not guaranteed nonnegative densities in extreme tails. Lattice data require continuity/lattice corrections, and moment assumptions alone do not justify a uniform smooth-density expansion.