Solution (source code)

= Solution

Saddlepoint approximation methods retain the nonquadratic shape of a distribution through its <cumulant-generating function>. Suppose $X_1,\ldots,X_n$ are independent and identically distributed, $K(t)=\log E(e^{tX_1})$ is finite on an open interval containing zero, and $K''>0$. For an interior target mean $x$, solve the saddlepoint equation $K'(t)=x$. Introduce <exponential tilting> by
$$
dP_t(y)=e^{ty-K(t)}\,dP(y).
$$
Under the tilted distribution the mean and <variance> are $K'(t)=x$ and $K''(t)$. For the product sample the <Radon-Nikodym derivative> is $e^{t\sum_iX_i-nK(t)}$. Consequently the exact <density> relation for the <sample mean> is
$$
f_{\overline X}(x)=e^{n(K(t)-tx)}f_{\overline X,t}(x).
$$
A local central limit approximation to the tilted <density> at its own mean gives $f_{\overline X,t}(x)\simeq\sqrt{n/(2\pi K''(t))}$. Hence
$$
\boxed{f_{\overline X}(x)\simeq\sqrt{\frac n{2\pi K''(t)}}\exp\{n(K(t)-tx)\},\qquad K'(t)=x.}
$$
For the sum $S_n$, the equivalent expression is $f_{S_n}(s)\simeq e^{nK(t)-ts}/\sqrt{2\pi nK''(t)}$, with $K'(t)=s/n$. Under the usual smooth nonlattice <density> conditions this approximation has relative error of order $n^{-1}$ for a fixed interior target. In the tilted <Edgeworth expansion> the order $n^{-1/2}$ odd term vanishes at the mean. The exponent retains the Legendre-transform rate $I(x)=tx-K(t)$, rather than a quadratic Taylor approximation to that rate, explaining the useful tail and skewness behavior. Normalization is not automatic, and accuracy statements need their regularity and range restrictions.

For a <normal distribution>, $K(t)=\mu t+\sigma^2t^2/2$ and $t=(x-\mu)/\sigma^2$. Substitution recovers exactly the normal <density> of the <sample mean>. For an <exponential distribution> of rate $\lambda$, $K(t)=-\log(1-t/\lambda)$, $t=\lambda-1/x$ and $K''(t)=x^2$. The approximation becomes
$$
\sqrt{\frac n{2\pi}}\,\lambda^n e^n x^{n-1}e^{-n\lambda x},\qquad x>0.
$$
It has exactly the gamma <density> shape. Replacing its leading constant by the exact <normalizing constant> makes it exact, illustrating why exactness of shape and exactness of the unnormalized approximation are separate questions.

For a vector <sample mean>, tilt by $e^{t^{\mathsf T}y-K(t)}$, solve $\nabla K(t)=x$, and use the local multivariate normal <density> at the tilted mean. This gives
$$
f_{\overline X}(x)\simeq\frac{(n/(2\pi))^{d/2}}{\sqrt{\det K''(t)}}\exp\{n(K(t)-t^{\mathsf T}x)\}.
$$
Joint and marginal saddlepoint densities can also be divided to approximate conditional densities, for example after conditioning on a nuisance <sufficient statistic>. The <p* approximation> uses <likelihood> and fitted-information coordinates to obtain a closely related approximation to a <maximum-likelihood estimator>'s <density>, usually conditional on an <ancillary statistic>.

Tail probabilities need a corresponding integration approximation. The <Lugannani-Rice saddlepoint tail approximation> uses
$$
w=\operatorname{sgn}(t)\sqrt{2n\{tx-K(t)\}},\qquad u=t\sqrt{nK''(t)},
$$
and gives
$$
\boxed{\Pr(\overline X\le x)\simeq\Phi(w)+\phi(w)\left(\frac1w-\frac1u\right).}
$$
Here $\Phi,\phi$ are the standard <normal distribution> functions. The upper-tail correction has the opposite sign: $1-\Phi(w)+\phi(w)(1/u-1/w)$. Inverting a <cumulative distribution function> introduces a pole in addition to the <density>'s saddlepoint; treating both supplies the correction term, which is why simply integrating a normal approximation at the untilted mean is less accurate. At $x=K'(0)$ the apparent singularities cancel. With $v=K''(0)$ and $k=K'''(0)$, expansions give $w=t\sqrt{nv}(1+kt/(3v)+O(t^2))$ and $u=t\sqrt{nv}(1+kt/(2v)+O(t^2))$, so $1/w-1/u\to k/(6\sqrt n\,v^{3/2})$. For the <normal distribution> the correction is zero everywhere.

These methods require care for lattice distributions, where summation and lattice corrections replace the <density> inversion, and near boundaries or singular <covariance> matrices. A distribution with no <moment-generating function> in a neighborhood of zero does not satisfy the starting assumptions. A successful saddlepoint approximation is therefore a structured refinement of regular asymptotic inference, not a formula guaranteed uniformly in every tail or for every model.