Laplace's method

From HandWiki
Short description: Method for approximate evaluation of integrals


In mathematics, Laplace's method, named after Pierre-Simon Laplace, is a technique used to approximate integrals of the form

[math]\displaystyle{ \int_a^b e^{Mf(x)} \, dx, }[/math]

where [math]\displaystyle{ f(x) }[/math] is a twice-differentiable function, M is a large number, and the endpoints a and b could possibly be infinite. This technique was originally presented in (Laplace 1774).

In Bayesian statistics, Laplace's approximation can refer to either approximating the posterior normalizing constant with Laplace's method[1] or approximating the posterior distribution with a Gaussian centered at the maximum a posteriori estimate.[2] Laplace approximations play a central role in the integrated nested Laplace approximations method for fast approximate Bayesian inference.

The idea of Laplace's method

[math]\displaystyle{ f(x) = \tfrac{\sin(x)}{x} }[/math] has a global maximum at 0. [math]\displaystyle{ e^{Mf(x)} }[/math] is shown on top for M = 0.5, and at the bottom for M = 3 (both in blue). As M grows the approximation of this function by a Gaussian function (shown in red) improves. This observation underlies Laplace's method.

Suppose the function [math]\displaystyle{ f(x) }[/math] has a unique global maximum at x0. Let [math]\displaystyle{ M\gt 0 }[/math] be a constant and consider the following two functions:

[math]\displaystyle{ \begin{align} g(x) &= Mf(x) \\ h(x) &= e^{Mf(x)} \end{align} }[/math]

Note that x0 will be the global maximum of [math]\displaystyle{ g }[/math] and [math]\displaystyle{ h }[/math] as well. Now observe:

[math]\displaystyle{ \begin{align} \frac{g(x_0)}{g(x)} &= \frac{M f(x_0)}{M f(x)} = \frac{f(x_0)}{f(x)} \\[4pt] \frac{h(x_0)}{h(x)} &= \frac{e^{M f(x_0)}}{e^{M f(x)}} = e^{M(f(x_0) - f(x))} \end{align} }[/math]

As M increases, the ratio for [math]\displaystyle{ h }[/math] will grow exponentially, while the ratio for [math]\displaystyle{ g }[/math] does not change. Thus, significant contributions to the integral of this function will come only from points x in a neighbourhood of x0, which can then be estimated.

General theory of Laplace's method

To state and motivate the method, we need several assumptions. We will assume that x0 is not an endpoint of the interval of integration, that the values [math]\displaystyle{ f(x) }[/math] cannot be very close to [math]\displaystyle{ f(x_0) }[/math] unless x is close to x0.

We can expand [math]\displaystyle{ f(x) }[/math] around x0 by Taylor's theorem,

[math]\displaystyle{ f(x) = f(x_0) + f'(x_0)(x-x_0) + \frac{1}{2} f''(x_0)(x-x_0)^2 + R }[/math]

where [math]\displaystyle{ R = O\left((x-x_0)^3\right) }[/math] (see: big O notation).

Since [math]\displaystyle{ f }[/math] has a global maximum at x0, and since x0 is not an endpoint, it is a stationary point, i.e. [math]\displaystyle{ f'(x_0)=0 }[/math]. Therefore, the second-order Taylor polynomial approximating [math]\displaystyle{ f(x) }[/math] is

[math]\displaystyle{ f(x) \approx f(x_0) + \frac{1}{2} f''(x_0) (x-x_0)^2 }[/math]

Then we just need one more step to get our Gaussian distribution. Since [math]\displaystyle{ x_0 }[/math] is a global maximum of the function [math]\displaystyle{ f }[/math] we can say, by definition of the second derivative, that [math]\displaystyle{ f''(x_0) \lt 0 }[/math], thus allowing us to write

[math]\displaystyle{ f(x) \approx f(x_0) - \frac{1}{2} |f''(x_0)| (x-x_0)^2 }[/math]

for x close to x0. The integral can then be approximated with:

[math]\displaystyle{ \int_a^b e^{M f(x)}\, dx\approx e^{M f(x_0)}\int_a^b e^{-\frac{1}{2} M|f''(x_0)| (x-x_0)^2} \, dx }[/math]

(see the picture on the right). This latter integral is a Gaussian integral if the limits of integration go from −∞ to +∞ (which can be assumed because the exponential decays very fast away from x0), and thus it can be calculated. We find

[math]\displaystyle{ \int_a^b e^{M f(x)}\, dx\approx \sqrt{\frac{2\pi}{M|f''(x_0)|}}e^{M f(x_0)} \text { as } M\to\infty. }[/math]

A generalization of this method and extension to arbitrary precision is provided by (Fog 2008).

Formal statement and proof

Suppose [math]\displaystyle{ f(x) }[/math] is a twice continuously differentiable function on [math]\displaystyle{ [a,b], }[/math] and there exists a unique point [math]\displaystyle{ x_0 \in (a,b) }[/math] such that:

[math]\displaystyle{ f(x_0) = \max_{x \in [a,b]} f(x) \quad \text{and} \quad f''(x_0)\lt 0. }[/math]

Then:

[math]\displaystyle{ \lim_{n\to\infty} \frac{\int_a^b e^{nf(x)} \, dx}{e^{nf(x_0)} \sqrt{\frac{2\pi}{n\left(-f''(x_0)\right)}}}= 1. }[/math]
Proof

Lower bound: Let [math]\displaystyle{ \varepsilon \gt 0 }[/math]. Since [math]\displaystyle{ f'' }[/math] is continuous there exists [math]\displaystyle{ \delta \gt 0 }[/math] such that if [math]\displaystyle{ |x_0-c|\lt \delta }[/math] then [math]\displaystyle{ f''(c) \ge f''(x_0) - \varepsilon. }[/math] By Taylor's Theorem, for any [math]\displaystyle{ x \in (x_0 - \delta, x_0 + \delta), }[/math]

[math]\displaystyle{ f(x) \ge f(x_0) + \frac{1}{2}(f''(x_0) - \varepsilon)(x-x_0)^2. }[/math]

Then we have the following lower bound:

[math]\displaystyle{ \begin{align} \int_a^b e^{nf(x)} \, dx &\ge \int_{x_0 - \delta}^{x_0 + \delta} e^{nf(x)} \, dx \\ &\ge e^{nf(x_0)} \int_{x_0 - \delta}^{x_0 + \delta} e^{\frac{n}{2}(f''(x_0) - \varepsilon)(x-x_0)^2} \, dx \\ &= e^{nf(x_0)} \sqrt{\frac{1}{n(-f''(x_0) + \varepsilon)}} \int_{-\delta \sqrt{n(-f''(x_0) + \varepsilon)} }^{\delta \sqrt{n(-f''(x_0) + \varepsilon)} } e^{-\frac{1}{2}y^2} \, dy \end{align} }[/math]

where the last equality was obtained by a change of variables

[math]\displaystyle{ y= \sqrt{n(-f''(x_0) + \varepsilon)} (x-x_0). }[/math]

Remember [math]\displaystyle{ f''(x_0)\lt 0 }[/math] so we can take the square root of its negation.

If we divide both sides of the above inequality by

[math]\displaystyle{ e^{nf(x_0)}\sqrt{\frac{2 \pi}{n(-f''(x_0))}} }[/math]

and take the limit we get:

[math]\displaystyle{ \lim_{n \to \infty} \frac{\int_a^b e^{nf(x)} \,dx}{e^{nf(x_0)}\sqrt{\frac{2\pi}{n(-f''(x_0))}}} \ge \lim_{n \to \infty} \frac{1}{\sqrt{2\pi}} \int_{-\delta\sqrt{n(-f''(x_0) + \varepsilon)} }^{\delta \sqrt{n(-f''(x_0) + \varepsilon)}} e^{-\frac{1}{2}y^2} \, dy \, \cdot \sqrt{\frac{-f''(x_0)}{-f''(x_0) + \varepsilon}} = \sqrt{\frac{-f''(x_0)}{-f''(x_0) + \varepsilon}} }[/math]

since this is true for arbitrary [math]\displaystyle{ \varepsilon }[/math] we get the lower bound:

[math]\displaystyle{ \lim_{n \to \infty} \frac{\int_a^b e^{nf(x)} \, dx}{ e^{nf(x_0)}\sqrt{\frac{2\pi}{n(-f''(x_0))}}} \ge 1 }[/math]

Note that this proof works also when [math]\displaystyle{ a = -\infty }[/math] or [math]\displaystyle{ b= \infty }[/math] (or both).

Upper bound: The proof is similar to that of the lower bound but there are a few inconveniences. Again we start by picking an [math]\displaystyle{ \varepsilon \gt 0 }[/math] but in order for the proof to work we need [math]\displaystyle{ \varepsilon }[/math] small enough so that [math]\displaystyle{ f''(x_0) + \varepsilon \lt 0. }[/math] Then, as above, by continuity of [math]\displaystyle{ f'' }[/math] and Taylor's Theorem we can find [math]\displaystyle{ \delta\gt 0 }[/math] so that if [math]\displaystyle{ |x-x_0| \lt \delta }[/math], then

[math]\displaystyle{ f(x) \le f(x_0) + \frac{1}{2} (f''(x_0) + \varepsilon)(x-x_0)^2. }[/math]

Lastly, by our assumptions (assuming [math]\displaystyle{ a,b }[/math] are finite) there exists an [math]\displaystyle{ \eta \gt 0 }[/math] such that if [math]\displaystyle{ |x-x_0|\ge \delta }[/math], then [math]\displaystyle{ f(x) \le f(x_0) - \eta }[/math].

Then we can calculate the following upper bound:

[math]\displaystyle{ \begin{align} \int_a^b e^{nf(x)} \, dx &\le \int_a^{x_0-\delta} e^{nf(x)} \, dx + \int_{x_0-\delta}^{x_0 + \delta} e^{nf(x)} \, dx + \int_{x_0 + \delta}^b e^{nf(x)} \, dx \\ &\le (b-a)e^{n(f(x_0)-\eta)} + \int_{x_0-\delta}^{x_0 + \delta} e^{n f(x) } \, dx \\ &\le (b-a)e^{n(f(x_0)-\eta)} + e^{nf(x_0)} \int_{x_0-\delta}^{x_0 + \delta} e^{\frac{n}{2}(f''(x_0)+\varepsilon)(x-x_0)^2} \, dx\\ &\le (b-a)e^{n(f(x_0)-\eta)} + e^{nf(x_0)} \int_{-\infty}^{+\infty} e^{\frac{n}{2}(f''(x_0)+\varepsilon)(x-x_0)^2} \, dx \\ &\le (b-a)e^{n(f(x_0)-\eta)} + e^{nf(x_0)} \sqrt{\frac{2 \pi}{n (-f''(x_0) - \varepsilon)}} \end{align} }[/math]

If we divide both sides of the above inequality by

[math]\displaystyle{ e^{nf(x_0)}\sqrt{\frac{2 \pi}{n (-f''(x_0))}} }[/math]

and take the limit we get:

[math]\displaystyle{ \lim_{n \to \infty} \frac{\int_a^b e^{nf(x)} \, dx}{e^{nf(x_0)}\sqrt{\frac{2\pi}{n(-f''(x_0))}}} \le \lim_{n \to \infty} (b-a) e^{-\eta n} \sqrt{\frac{n(-f''(x_0))}{2\pi}} + \sqrt{\frac{-f''(x_0)}{-f''(x_0) - \varepsilon}} = \sqrt{\frac{-f''(x_0)}{-f''(x_0) - \varepsilon}} }[/math]

Since [math]\displaystyle{ \varepsilon }[/math] is arbitrary we get the upper bound:

[math]\displaystyle{ \lim_{n \to \infty} \frac{\int_a^b e^{nf(x)} \, dx}{e^{nf(x_0)}\sqrt{\frac{2 \pi}{n (-f''(x_0))}}} \le 1 }[/math]

And combining this with the lower bound gives the result.

Note that the above proof obviously fails when [math]\displaystyle{ a = -\infty }[/math] or [math]\displaystyle{ b = \infty }[/math] (or both). To deal with these cases, we need some extra assumptions. A sufficient (not necessary) assumption is that for [math]\displaystyle{ n = 1, }[/math]

[math]\displaystyle{ \int_a^b e^{nf(x)} \, dx \lt \infty, }[/math]

and that the number [math]\displaystyle{ \eta }[/math] as above exists (note that this must be an assumption in the case when the interval [math]\displaystyle{ [a,b] }[/math] is infinite). The proof proceeds otherwise as above, but with a slightly different approximation of integrals:

[math]\displaystyle{ \int_a^{x_0-\delta} e^{nf(x)} \, dx + \int_{x_0 + \delta}^b e^{nf(x)} \, dx \le \int_a^b e^{f(x)}e^{(n-1)(f(x_0) - \eta)} \, dx = e^{(n-1)(f(x_0) - \eta)} \int_a^b e^{f(x)} \, dx. }[/math]

When we divide by

[math]\displaystyle{ e^{nf(x_0)}\sqrt{\frac{2\pi}{n(-f''(x_0))}}, }[/math]

we get for this term

[math]\displaystyle{ \frac{e^{(n-1)(f(x_0) - \eta)} \int_a^b e^{f(x)} \, dx}{e^{nf(x_0)}\sqrt{\frac{2\pi}{n(-f''(x_0))}}} = e^{-(n-1)\eta} \sqrt{n} e^{-f(x_0)} \int_a^b e^{f(x)} \, dx \sqrt{\frac{-f''(x_0)}{2\pi}} }[/math]

whose limit as [math]\displaystyle{ n \to \infty }[/math] is [math]\displaystyle{ 0 }[/math]. The rest of the proof (the analysis of the interesting term) proceeds as above.

The given condition in the infinite interval case is, as said above, sufficient but not necessary. However, the condition is fulfilled in many, if not in most, applications: the condition simply says that the integral we are studying must be well-defined (not infinite) and that the maximum of the function at [math]\displaystyle{ x_0 }[/math] must be a "true" maximum (the number [math]\displaystyle{ \eta \gt 0 }[/math] must exist). There is no need to demand that the integral is finite for [math]\displaystyle{ n=1 }[/math] but it is enough to demand that the integral is finite for some [math]\displaystyle{ n=N. }[/math]

This method relies on 4 basic concepts such as

Concepts
1. Relative error

The “approximation” in this method is related to the relative error and not the absolute error. Therefore, if we set

[math]\displaystyle{ s = \sqrt{\frac{2\pi}{M\left|f''(x_0)\right|}}. }[/math]

the integral can be written as

[math]\displaystyle{ \begin{align} \int_a^b e^{M f(x)} \, dx &= se^{Mf(x_0)} \frac{1}{s}\int_a^b e^{M(f(x)-f(x_0))}\, dx \\ & = se^{Mf(x_0)} \int_{\frac{a-x_0}{s}}^{\frac{b-x_0}{s}} e^{M(f(sy+x_0)-f(x_0))}\,dy \end{align} }[/math]

where [math]\displaystyle{ s }[/math] is a small number when [math]\displaystyle{ M }[/math] is a large number obviously and the relative error will be

[math]\displaystyle{ \left| \int_{\frac{a-x_0}{s}}^{\frac{b-x_0}{s}} e^{M(f(sy+x_0)-f(x_0))} dy-1 \right|. }[/math]

Now, let us separate this integral into two parts: [math]\displaystyle{ y\in[-D_y,D_y] }[/math] region and the rest.

2. [math]\displaystyle{ e^{M (f(sy+x_0)-f(x_0))} \to e^{-\pi y^2} }[/math] around the stationary point when [math]\displaystyle{ M }[/math] is large enough

Let’s look at the Taylor expansion of [math]\displaystyle{ M(f(x)-f(x_0)) }[/math] around x0 and translate x to y because we do the comparison in y-space, we will get

[math]\displaystyle{ M(f(x)-f(x_0)) = \frac{Mf''(x_0)}{2}s^2y^2 +\frac{Mf'''(x_0)}{6}s^3y^3+ \cdots = -\pi y^2 +O\left(\frac{1}{\sqrt{M}}\right). }[/math]

Note that [math]\displaystyle{ f'(x_0)=0 }[/math] because [math]\displaystyle{ x_0 }[/math] is a stationary point. From this equation you will find that the terms higher than second derivative in this Taylor expansion is suppressed as the order of [math]\displaystyle{ \tfrac{1}{\sqrt{M}} }[/math] so that [math]\displaystyle{ \exp(M(f(x)-f(x_0))) }[/math] will get closer to the Gaussian function as shown in figure. Besides,

[math]\displaystyle{ \int_{-\infty}^{\infty}e^{-\pi y^2} dy =1. }[/math]
The figure of [math]\displaystyle{ e^{M[f(sy+x_0)-f(x_0)]} }[/math] with [math]\displaystyle{ M }[/math] equals 1, 2 and 3, and the red line is the curve of function [math]\displaystyle{ e^{-\pi y^2} }[/math] .
3. The larger [math]\displaystyle{ M }[/math] is, the smaller range of [math]\displaystyle{ x }[/math] is related

Because we do the comparison in y-space, [math]\displaystyle{ y }[/math] is fixed in [math]\displaystyle{ y\in[-D_y,D_y] }[/math] which will cause [math]\displaystyle{ x\in[-sD_y, sD_y] }[/math]; however, [math]\displaystyle{ s }[/math] is inversely proportional to [math]\displaystyle{ \sqrt{M} }[/math], the chosen region of [math]\displaystyle{ x }[/math] will be smaller when [math]\displaystyle{ M }[/math] is increased.

4. If the integral in Laplace’s method converges, the contribution of the region which is not around the stationary point of the integration of its relative error will tend to zero as [math]\displaystyle{ M }[/math] grows.

Relying on the 3rd concept, even if we choose a very large Dy, sDy will finally be a very small number when [math]\displaystyle{ M }[/math] is increased to a huge number. Then, how can we guarantee the integral of the rest will tend to 0 when [math]\displaystyle{ M }[/math] is large enough?

The basic idea is to find a function [math]\displaystyle{ m(x) }[/math] such that [math]\displaystyle{ m(x)\ge f(x) }[/math] and the integral of [math]\displaystyle{ e^{Mm(x)} }[/math] will tend to zero when [math]\displaystyle{ M }[/math] grows. Because the exponential function of [math]\displaystyle{ Mm(x) }[/math] will be always larger than zero as long as [math]\displaystyle{ m(x) }[/math] is a real number, and this exponential function is proportional to [math]\displaystyle{ m(x), }[/math] the integral of [math]\displaystyle{ e^{Mf(x)} }[/math] will tend to zero. For simplicity, choose [math]\displaystyle{ m(x) }[/math] as a tangent through the point [math]\displaystyle{ x=sD_y }[/math] as shown in the figure:

[math]\displaystyle{ m(x) }[/math] is denoted by the two tangent lines passing through [math]\displaystyle{ x=\pm sD_y+x_0 }[/math]. When [math]\displaystyle{ sD_y }[/math] gets smaller, the cover region will be larger.

If the interval of the integration of this method is finite, we will find that no matter [math]\displaystyle{ f(x) }[/math] is continue in the rest region, it will be always smaller than [math]\displaystyle{ m(x) }[/math] shown above when [math]\displaystyle{ M }[/math] is large enough. By the way, it will be proved later that the integral of [math]\displaystyle{ e^{Mm(x)} }[/math] will tend to zero when [math]\displaystyle{ M }[/math] is large enough.

If the interval of the integration of this method is infinite, [math]\displaystyle{ m(x) }[/math] and [math]\displaystyle{ f(x) }[/math] might always cross to each other. If so, we cannot guarantee that the integral of [math]\displaystyle{ e^{Mf(x)} }[/math] will tend to zero finally. For example, in the case of [math]\displaystyle{ f(x)=\tfrac{\sin(x)}{x}, }[/math] [math]\displaystyle{ \int^{\infty}_{0}e^{Mf(x)} dx }[/math] will always diverge. Therefore, we need to require that [math]\displaystyle{ \int^{\infty}_{d}e^{Mf(x)} dx }[/math] can converge for the infinite interval case. If so, this integral will tend to zero when [math]\displaystyle{ d }[/math] is large enough and we can choose this [math]\displaystyle{ d }[/math] as the cross of [math]\displaystyle{ m(x) }[/math] and [math]\displaystyle{ f(x). }[/math]

You might ask that why not choose [math]\displaystyle{ \int^{\infty}_{d}e^{f(x)} dx }[/math] as a convergent integral? Let me use an example to show you the reason. Suppose the rest part of [math]\displaystyle{ f(x) }[/math] is [math]\displaystyle{ -\ln x, }[/math] then [math]\displaystyle{ e^{f(x)}=\tfrac{1}{x} }[/math] and its integral will diverge; however, when [math]\displaystyle{ M=2, }[/math] the integral of [math]\displaystyle{ e^{Mf(x)}=\tfrac{1}{x^2} }[/math] converges. So, the integral of some functions will diverge when [math]\displaystyle{ M }[/math] is not a large number, but they will converge when [math]\displaystyle{ M }[/math] is large enough.

Based on these four concepts, we can derive the relative error of this Laplace's method.

Other formulations

Laplace's approximation is sometimes written as

[math]\displaystyle{ \int_a^b h(x) e^{M g(x)}\, dx \approx \sqrt{\frac{2\pi}{M|g''(x_0)|}} h(x_0) e^{M g(x_0)} \ \text { as } M\to\infty }[/math]

where [math]\displaystyle{ h }[/math] is positive.

Importantly, the accuracy of the approximation depends on the variable of integration, that is, on what stays in [math]\displaystyle{ g(x) }[/math] and what goes into [math]\displaystyle{ h(x) }[/math].[3]

The derivation of its relative error

First, use [math]\displaystyle{ x_0=0 }[/math] to denote the global maximum, which will simplify this derivation. We are interested in the relative error, written as [math]\displaystyle{ |R| }[/math],

[math]\displaystyle{ \int_a^b h(x) e^{M g(x)}\, dx = h(0)e^{Mg(0)}s \underbrace{\int_{a/s}^{b/s}\frac{h(x)}{h(0)}e^{M\left[ g(sy)-g(0) \right]} dy}_{1+R}, }[/math]

where

[math]\displaystyle{ s\equiv\sqrt{\frac{2\pi}{M\left| g'' (0) \right|}}. }[/math]

So, if we let

[math]\displaystyle{ A\equiv \frac{h(sy)}{h(0)}e^{M\left[g(sy)-g(0) \right]} }[/math]

and [math]\displaystyle{ A_0\equiv e^{-\pi y^2} }[/math], we can get

[math]\displaystyle{ \left| R\right| = \left| \int_{a/s}^{b/s}A\,dy -\int_{-\infty}^{\infty}A_0\,dy \right| }[/math]

since [math]\displaystyle{ \int_{-\infty}^{\infty}A_0\,dy =1 }[/math].

For the upper bound, note that [math]\displaystyle{ |A+B| \le |A|+|B|, }[/math] thus we can separate this integration into 5 parts with 3 different types (a), (b) and (c), respectively. Therefore,

[math]\displaystyle{ |R| \lt \underbrace{\left| \int_{D_y}^{\infty}A_0 dy \right|}_{(a_1)} + \underbrace{\left| \int_{D_y}^{b/s}A dy \right|}_{(b_1)}+ \underbrace{\left| \int_{-D_y}^{D_y}\left(A-A_0\right) dy \right|}_{(c)} + \underbrace{\left| \int_{a/s}^{-D_y}A dy \right|}_{(b_2)} + \underbrace{\left| \int_{-\infty}^{-D_y}A_0 dy \right|}_{(a_2)} }[/math]

where [math]\displaystyle{ (a_1) }[/math] and [math]\displaystyle{ (a_2) }[/math] are similar, let us just calculate [math]\displaystyle{ (a_1) }[/math] and [math]\displaystyle{ (b_1) }[/math] and [math]\displaystyle{ (b_2) }[/math] are similar, too, I’ll just calculate [math]\displaystyle{ (b_1) }[/math].

For [math]\displaystyle{ (a_1) }[/math], after the translation of [math]\displaystyle{ z\equiv\pi y^2 }[/math], we can get

[math]\displaystyle{ (a_1) = \left| \frac{1}{2\sqrt{\pi}}\int_{\pi D_y^2}^{\infty} e^{-z}z^{-1/2} dz\right| \lt \frac{e^{-\pi D_y^2}}{2\pi D_y}. }[/math]

This means that as long as [math]\displaystyle{ D_y }[/math] is large enough, it will tend to zero.

For [math]\displaystyle{ (b_1) }[/math], we can get

[math]\displaystyle{ (b_1)\le\left| \int_{D_y}^{b/s}\left[\frac{h(sy)}{h(0)}\right]_{\text{max}} e^{Mm(sy)}dy \right| }[/math]

where

[math]\displaystyle{ m(x) \ge g(x)-g(0) \text{as} x\in [sD_y,b] }[/math]

and [math]\displaystyle{ h(x) }[/math] should have the same sign of [math]\displaystyle{ h(0) }[/math] during this region. Let us choose [math]\displaystyle{ m(x) }[/math] as the tangent across the point at [math]\displaystyle{ x=sD_y }[/math] , i.e. [math]\displaystyle{ m(sy)= g(sD_y)-g(0) +g'(sD_y)\left( sy-sD_y \right) }[/math] which is shown in the figure

[math]\displaystyle{ m(x) }[/math] is the tangent lines across the point at [math]\displaystyle{ x=sD_y }[/math] .

From this figure you can find that when [math]\displaystyle{ s }[/math] or [math]\displaystyle{ D_y }[/math] gets smaller, the region satisfies the above inequality will get larger. Therefore, if we want to find a suitable [math]\displaystyle{ m(x) }[/math] to cover the whole [math]\displaystyle{ f(x) }[/math] during the interval of [math]\displaystyle{ (b_1) }[/math], [math]\displaystyle{ D_y }[/math] will have an upper limit. Besides, because the integration of [math]\displaystyle{ e^{-\alpha x} }[/math] is simple, let me use it to estimate the relative error contributed by this [math]\displaystyle{ (b_1) }[/math].

Based on Taylor expansion, we can get

[math]\displaystyle{ \begin{align} M\left[g(sD_y)-g(0)\right] &= M\left[ \frac{g''(0)}{2}s^2D_y^2 +\frac{g'''(\xi)}{6}s^3D_y^3 \right] && \text{as } \xi\in[0,sD_y] \\ & = -\pi D_y^2 +\frac{(2\pi)^{3/2}g'''(\xi)D_y^3}{6\sqrt{M}|g''(0)|^{\frac{3}{2}}}, \end{align} }[/math]

and

[math]\displaystyle{ \begin{align} Msg'(sD_y) &= Ms\left(g''(0)sD_y +\frac{g'''(\zeta)}{2}s^2D_y^2\right) && \text{as } \zeta\in[0,sD_y] \\ &= -2\pi D_y +\sqrt{\frac{2}{M}}\left( \frac{\pi}{|g''(0)|} \right)^{\frac{3}{2}}g'''(\zeta)D_y^2, \end{align} }[/math]

and then substitute them back into the calculation of [math]\displaystyle{ (b_1) }[/math]; however, you can find that the remainders of these two expansions are both inversely proportional to the square root of [math]\displaystyle{ M }[/math], let me drop them out to beautify the calculation. Keeping them is better, but it will make the formula uglier.

[math]\displaystyle{ \begin{align} (b_1) &\le \left|\left[ \frac{h(sy)}{h(0)} \right]_{\max} e^{-\pi D_y^2}\int_0^{b/s-D_y}e^{-2\pi D_y y} dy \right| \\ &\le \left|\left[ \frac{h(sy)}{h(0)} \right]_{\max} e^{-\pi D_y^2}\frac{1}{2\pi D_y} \right|. \end{align} }[/math]

Therefore, it will tend to zero when [math]\displaystyle{ D_y }[/math] gets larger, but don't forget that the upper bound of [math]\displaystyle{ D_y }[/math] should be considered during this calculation.

About the integration near [math]\displaystyle{ x=0 }[/math], we can also use Taylor's Theorem to calculate it. When [math]\displaystyle{ h'(0) \ne 0 }[/math]

[math]\displaystyle{ \begin{align} (c) &\le \int_{-D_y}^{D_y} e^{-\pi y^2} \left| \frac{sh'(\xi)}{h(0)}y \right|\, dy \\ &\lt \sqrt{\frac{2}{\pi M |g''(0)|}} \left| \frac{h'(\xi)}{h(0)} \right|_\max \left( 1-e^{-\pi D_y^2} \right) \end{align} }[/math]

and you can find that it is inversely proportional to the square root of [math]\displaystyle{ M }[/math]. In fact, [math]\displaystyle{ (c) }[/math] will have the same behave when [math]\displaystyle{ h(x) }[/math] is a constant.

Conclusively, the integral near the stationary point will get smaller as [math]\displaystyle{ \sqrt{M} }[/math] gets larger, and the rest parts will tend to zero as long as [math]\displaystyle{ D_y }[/math] is large enough; however, we need to remember that [math]\displaystyle{ D_y }[/math] has an upper limit which is decided by whether the function [math]\displaystyle{ m(x) }[/math] is always larger than [math]\displaystyle{ g(x)-g(0) }[/math] in the rest region. However, as long as we can find one [math]\displaystyle{ m(x) }[/math] satisfying this condition, the upper bound of [math]\displaystyle{ D_y }[/math] can be chosen as directly proportional to [math]\displaystyle{ \sqrt{M} }[/math] since [math]\displaystyle{ m(x) }[/math] is a tangent across the point of [math]\displaystyle{ g(x)-g(0) }[/math] at [math]\displaystyle{ x=sD_y }[/math]. So, the bigger [math]\displaystyle{ M }[/math] is, the bigger [math]\displaystyle{ D_y }[/math] can be.

In the multivariate case where [math]\displaystyle{ \mathbf{x} }[/math] is a [math]\displaystyle{ d }[/math]-dimensional vector and [math]\displaystyle{ f(\mathbf{x}) }[/math] is a scalar function of [math]\displaystyle{ \mathbf{x} }[/math], Laplace's approximation is usually written as:

[math]\displaystyle{ \int h(\mathbf{x})e^{M f(\mathbf{x})}\, d\mathbf{x} \approx \left(\frac{2\pi}{M}\right)^{d/2} \frac{h(\mathbf{x}_0)e^{M f(\mathbf{x}_0)}}{\left|-H(f)(\mathbf{x}_0)\right|^{1/2}} \text { as } M\to\infty }[/math]

where [math]\displaystyle{ H(f)(\mathbf{x}_0) }[/math] is the Hessian matrix of [math]\displaystyle{ f }[/math] evaluated at [math]\displaystyle{ \mathbf{x}_0 }[/math] and where [math]\displaystyle{ |\cdot| }[/math] denotes matrix determinant. Analogously to the univariate case, the Hessian is required to be negative definite.[4]

By the way, although [math]\displaystyle{ \mathbf{x} }[/math] denotes a [math]\displaystyle{ d }[/math]-dimensional vector, the term [math]\displaystyle{ d\mathbf{x} }[/math] denotes an infinitesimal volume here, i.e. [math]\displaystyle{ d\mathbf{x} := dx_1dx_2\cdots dx_d }[/math].

Laplace's method extension: Steepest descent

Main page: Method of steepest descent

In extensions of Laplace's method, complex analysis, and in particular Cauchy's integral formula, is used to find a contour of steepest descent for an (asymptotically with large M) equivalent integral, expressed as a line integral. In particular, if no point x0 where the derivative of [math]\displaystyle{ f }[/math] vanishes exists on the real line, it may be necessary to deform the integration contour to an optimal one, where the above analysis will be possible. Again the main idea is to reduce, at least asymptotically, the calculation of the given integral to that of a simpler integral that can be explicitly evaluated. See the book of Erdelyi (1956) for a simple discussion (where the method is termed steepest descents).

The appropriate formulation for the complex z-plane is

[math]\displaystyle{ \int_a^b e^{M f(z)}\, dz \approx \sqrt{\frac{2\pi}{-Mf''(z_0)}}e^{M f(z_0)} \text{ as } M\to\infty. }[/math]

for a path passing through the saddle point at z0. Note the explicit appearance of a minus sign to indicate the direction of the second derivative: one must not take the modulus. Also note that if the integrand is meromorphic, one may have to add residues corresponding to poles traversed while deforming the contour (see for example section 3 of Okounkov's paper Symmetric functions and random partitions).

Further generalizations

An extension of the steepest descent method is the so-called nonlinear stationary phase/steepest descent method. Here, instead of integrals, one needs to evaluate asymptotically solutions of Riemann–Hilbert factorization problems.

Given a contour C in the complex sphere, a function [math]\displaystyle{ f }[/math] defined on that contour and a special point, say infinity, one seeks a function M holomorphic away from the contour C, with prescribed jump across C, and with a given normalization at infinity. If [math]\displaystyle{ f }[/math] and hence M are matrices rather than scalars this is a problem that in general does not admit an explicit solution.

An asymptotic evaluation is then possible along the lines of the linear stationary phase/steepest descent method. The idea is to reduce asymptotically the solution of the given Riemann–Hilbert problem to that of a simpler, explicitly solvable, Riemann–Hilbert problem. Cauchy's theorem is used to justify deformations of the jump contour.

The nonlinear stationary phase was introduced by Deift and Zhou in 1993, based on earlier work of Its. A (properly speaking) nonlinear steepest descent method was introduced by Kamvissis, K. McLaughlin and P. Miller in 2003, based on previous work of Lax, Levermore, Deift, Venakides and Zhou. As in the linear case, "steepest descent contours" solve a min-max problem. In the nonlinear case they turn out to be "S-curves" (defined in a different context back in the 80s by Stahl, Gonchar and Rakhmanov).

The nonlinear stationary phase/steepest descent method has applications to the theory of soliton equations and integrable models, random matrices and combinatorics.

Laplace's method generalization: Median-point approximation

In the generalization, evaluation of the integral is considered equivalent to finding the norm of the distribution with density

[math]\displaystyle{ e^{M f(x)}. }[/math]

Denoting the cumulative distribution [math]\displaystyle{ F(x) }[/math], if there is a diffeomorphic Gaussian distribution with density

[math]\displaystyle{ e^{-g -\frac{\gamma}{2}y^2} }[/math]

the norm is given by

[math]\displaystyle{ \sqrt{2\pi\gamma^{-1}}e^{-g} }[/math]

and the corresponding diffeomorphism is

[math]\displaystyle{ y(x)=\frac{1}{\sqrt{\gamma}}\Phi^{-1}{\left(\frac{F(x)}{F(\infty)}\right)}, }[/math]

where [math]\displaystyle{ \Phi }[/math] denotes cumulative standard normal distribution function.

In general, any distribution diffeomorphic to the Gaussian distribution has density

[math]\displaystyle{ e^{-g -\frac{\gamma}{2}y^2(x)}y'(x) }[/math]

and the median-point is mapped to the median of the Gaussian distribution. Matching the logarithm of the density functions and their derivatives at the median point up to a given order yields a system of equations that determine the approximate values of [math]\displaystyle{ \gamma }[/math] and [math]\displaystyle{ g }[/math].

The approximation was introduced in 2019 by D. Makogon and C. Morais Smith primarily in the context of partition function evaluation for a system of interacting fermions.[5]

Complex integrals

For complex integrals in the form:

[math]\displaystyle{ \frac{1}{2\pi i}\int_{c-i\infty}^{c+i\infty} g(s)e^{st} \,ds }[/math]

with [math]\displaystyle{ t \gg 1, }[/math] we make the substitution t = iu and the change of variable [math]\displaystyle{ s=c+ix }[/math] to get the bilateral Laplace transform:

[math]\displaystyle{ \frac{1}{2 \pi}\int_{-\infty}^\infty g(c+ix)e^{-ux}e^{icu} \, dx. }[/math]

We then split g(c + ix) in its real and complex part, after which we recover u = t/i. This is useful for inverse Laplace transforms, the Perron formula and complex integration.

Example: Stirling's approximation

Laplace's method can be used to derive Stirling's approximation

[math]\displaystyle{ N!\approx \sqrt{2\pi N} N^N e^{-N}\, }[/math]

for a large integer N.

From the definition of the Gamma function, we have

[math]\displaystyle{ N! = \Gamma(N+1)=\int_0^\infty e^{-x} x^N \, dx. }[/math]

Now we change variables, letting [math]\displaystyle{ x=Nz }[/math] so that [math]\displaystyle{ dx = Ndz. }[/math] Plug these values back in to obtain

[math]\displaystyle{ \begin{align} N! &= \int_0^\infty e^{-Nz} (Nz)^N N \, dz \\ &= N^{N+1} \int_0^\infty e^{-Nz} z^N \, dz \\ &= N^{N+1} \int_0^\infty e^{-Nz} e^{N\ln z} \, dz \\ &= N^{N+1} \int_0^\infty e^{N(\ln z-z)} \, dz. \end{align} }[/math]

This integral has the form necessary for Laplace's method with

[math]\displaystyle{ f(z) = \ln{z}-z }[/math]

which is twice-differentiable:

[math]\displaystyle{ f'(z) = \frac{1}{z}-1, }[/math]
[math]\displaystyle{ f''(z) = -\frac{1}{z^2}. }[/math]

The maximum of [math]\displaystyle{ f(z) }[/math] lies at z0 = 1, and the second derivative of [math]\displaystyle{ f(z) }[/math] has the value −1 at this point. Therefore, we obtain

[math]\displaystyle{ N! \approx N^{N+1}\sqrt{\frac{2\pi}{N}} e^{-N}=\sqrt{2\pi N} N^N e^{-N}. }[/math]

See also

Notes

  1. Tierney, Luke; Kadane, Joseph B. (1986). "Accurate Approximations for Posterior Moments and Marginal Densities". J. Amer. Statist. Assoc. 81 (393): 82–86. doi:10.1080/01621459.1986.10478240. 
  2. Amaral Turkman, M. Antónia; Paulino, Carlos Daniel; Müller, Peter (2019). "Methods Based on Analytic Approximations". Computational Bayesian Statistics: An Introduction. Cambridge University Press. pp. 150–171. ISBN 978-1-108-70374-1. 
  3. Butler, Ronald W (2007). Saddlepoint approximations and applications. Cambridge University Press. ISBN 978-0-521-87250-8. 
  4. MacKay, David J. C. (September 2003). Information Theory, Inference and Learning Algorithms. Cambridge: Cambridge University Press. ISBN 9780521642989. http://www.inference.phy.cam.ac.uk/mackay/itila/book.html. 
  5. Makogon, D.; Morais Smith, C. (2022-05-03). "Median-point approximation and its application for the study of fermionic systems". Physical Review B 105 (17): 174505. doi:10.1103/PhysRevB.105.174505. https://link.aps.org/doi/10.1103/PhysRevB.105.174505. 

References

  • Azevedo-Filho, A.; Shachter, R. (1994), "Laplace's Method Approximations for Probabilistic Inference in Belief Networks with Continuous Variables", in Mantaras, R.; Poole, D., Uncertainty in Artificial Intelligence, San Francisco, CA: Morgan Kaufmann .
  • Deift, P.; Zhou, X. (1993), "A steepest descent method for oscillatory Riemann–Hilbert problems. Asymptotics for the MKdV equation", Ann. of Math. 137 (2): 295–368, doi:10.2307/2946540 .
  • Erdelyi, A. (1956), Asymptotic Expansions, Dover .
  • Fog, A. (2008), "Calculation Methods for Wallenius' Noncentral Hypergeometric Distribution", Communications in Statistics, Simulation and Computation 37 (2): 258–273, doi:10.1080/03610910701790269 .
  • Laplace, P S (1774), "Mémoires de Mathématique et de Physique, Tome Sixième", Statistical Science 1 (3): 366–367 
  • Wang, Xiang-Sheng; Wong, Roderick (2007). "Discrete analogues of Laplace's approximation". Asymptot. Anal. 54 (3–4): 165–180.