Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Large Deviations and Rare Fluctuations

    How unlikely is a sample mean that remains a fixed distance from its typical value as the sample grows? A central-limit approximation resolves fluctuations of order the inverse square root of the sample size. Large deviations instead describe fixed displacements, whose probabilities often decrease exponentially with sample size.

    We derive the Bernoulli rate function, retain the prefactor needed to estimate an actual tail probability, and compare the result with exact finite-sample sums. A second example shows why a cumulant-generating function can lose information: a mixture has a nonconvex rate, while its Legendre transform sees only the convex envelope.

    Preparation: probability measures, Gaussian vectors and generating functions, and saddle-point asymptotics.

    A rate describes probabilities of sets

    Let ANA_N be real random variables. A large-deviation principle with speed NN and rate I:R→[0,∞]I:\mathbb R\to[0,\infty] means that II is lower semicontinuous and that, for every open set GG and closed set FF,

    lim inf⁡N→∞1Nlog⁡P(AN∈G)≥−inf⁡x∈GI(x),\liminf_{N\to\infty}\frac1N\log\mathbb P(A_N\in G) \geq-\inf_{x\in G}I(x), lim sup⁡N→∞1Nlog⁡P(AN∈F)≤−inf⁡x∈FI(x).\limsup_{N\to\infty}\frac1N\log\mathbb P(A_N\in F) \leq-\inf_{x\in F}I(x).

    We use log⁡0=−∞\log0=-\infty and inf⁡∅=+∞\inf\varnothing=+\infty. A rate is good if each sublevel set {I≤c}\{I\leq c\} is compact. Goodness supplies the compactness needed in many minimization arguments; lower semicontinuity alone does not ensure a minimum on every unbounded closed set. These set bounds are the precise content of the exponential notation used in Touchette, Appendix B, pp. 81–82 (PDF).

    For a set whose interior and closure have the same rate infimum, the two bounds agree. They determine the limit of the logarithm divided by NN. They do not determine a multiplicative constant or a power of NN. In particular, writing a density as e−NI(x)e^{-NI(x)} at exponential order does not make it a normalized density or establish a full large-deviation principle by itself.

    The scaled cumulant-generating function is

    Λ(t)=lim⁡N→∞1Nlog⁡EeNtAN,t∈R,\Lambda(t)=\lim_{N\to\infty}\frac1N \log\mathbb E e^{NtA_N},\qquad t\in\mathbb R,

    when this limit exists. One useful sufficient version of the Gärtner–Ellis theorem assumes that Λ\Lambda is finite and differentiable on all of R\mathbb R. It then gives a good large-deviation principle with

    I(x)=Λ∗(x):=sup⁡t∈R{tx−Λ(t)}.I(x)=\Lambda^*(x):=\sup_{t\in\mathbb R}\{tx-\Lambda(t)\}.

    The all-real-domain hypothesis avoids additional boundary and steepness conditions needed in more general versions. The supremum need not be attained at a finite tt. When an interior maximizer exists, it obeys Λ′(t)=x\Lambda'(t)=x. See Touchette, §III.C.1, Eqs. (37)–(40), pp. 13–14 (PDF). The differentiability hypothesis will fail in our mixture example.

    Bernoulli sample means and exponential tilting

    Take independent variables XjX_j with P(Xj=1)=p\mathbb P(X_j=1)=p and P(Xj=0)=1−p\mathbb P(X_j=0)=1-p, where 0<p<10<p<1. Set

    SN=∑j=1NXj,AN=SNN.S_N=\sum_{j=1}^NX_j,\qquad A_N=\frac{S_N}{N}.

    Independence gives

    EeNtAN=(1−p+pet)N,Λ(t)=log⁡(1−p+pet).\mathbb E e^{NtA_N}=(1-p+pe^t)^N, \qquad \Lambda(t)=\log(1-p+pe^t).

    This function is finite and smooth for every real tt. For 0<x<10<x<1, solving Λ′(t∗)=x\Lambda'(t_*)=x yields

    t∗=log⁡x(1−p)p(1−x).t_* =\log\frac{x(1-p)}{p(1-x)}.

    Substitution into the transform gives

    Ip(x)=xlog⁡xp+(1−x)log⁡1−x1−p.\boxed{I_p(x)=x\log\frac{x}{p} +(1-x)\log\frac{1-x}{1-p}.}

    The continuous endpoint values are Ip(0)=−log⁡(1−p)I_p(0)=-\log(1-p) and Ip(1)=−log⁡pI_p(1)=-\log p; outside [0,1][0,1], the rate is +∞+\infty. Its unique minimum is zero at x=px=p, and

    Ip′′(x)=1x(1−x)>0.I_p''(x)=\frac1{x(1-x)}>0.

    Near the minimum,

    Ip(p+δ)=δ22p(1−p)+O(δ3).I_p(p+\delta)=\frac{\delta^2}{2p(1-p)}+O(\delta^3).

    Setting δ=y/N\delta=y/\sqrt N recovers the Gaussian exponent of the central-limit theorem. A fixed nonzero δ\delta instead gives exponential suppression on the scale NN.

    The optimizer has a probabilistic meaning. Reweighting a single Bernoulli law by etX−Λ(t)e^{tX-\Lambda(t)} makes its success probability

    pt=pet1−p+pet.p_t=\frac{pe^t}{1-p+pe^t}.

    At t=t∗t=t_*, the rare mean xx becomes typical under the tilted law. This is the mechanism behind the lower bound, while Markov's inequality supplies an upper bound. For x>px>p,

    P(AN≥x)≤inf⁡t>0e−N[tx−Λ(t)]=e−NIp(x).\mathbb P(A_N\geq x) \leq\inf_{t>0}e^{-N[tx-\Lambda(t)]} =e^{-NI_p(x)}.

    This Chernoff bound is valid at finite NN. It need not be a close relative approximation. The IID factorization and the associated Cramér theorem are discussed in Touchette, §III.D, pp. 15–16 (PDF); the binomial counting example appears in §II, Example II.1, p. 6.

    The saddle prefactor and the lattice tail

    Suppose k=Nxk=Nx is an integer and xx stays in a compact subset of (0,1)(0,1). The exact point mass is

    bN,k:=P(SN=k)=(Nk)pk(1−p)N−k.b_{N,k}:=\mathbb P(S_N=k) =\binom Nk p^k(1-p)^{N-k}.

    Using Stirling's formula with its square-root factor gives

    bN,k=e−NIp(x)2πNx(1−x)[1+O(N−1)].b_{N,k}= \frac{e^{-NI_p(x)}}{\sqrt{2\pi N x(1-x)}} \left[1+O(N^{-1})\right].

    The error statement is uniform on such compact interior subsets. It is not an endpoint approximation: for example, bN,N=pNb_{N,N}=p^N exactly, and the displayed denominator would vanish there.

    For a fixed upper-tail threshold x>px>p, a further factor is needed. Consecutive exact masses satisfy

    bN,k+j+1bN,k+j=N−k−jk+j+1p1−p.\frac{b_{N,k+j+1}}{b_{N,k+j}} =\frac{N-k-j}{k+j+1}\frac{p}{1-p}.

    For each fixed jj, this tends to

    r∞=p(1−x)x(1−p)=e−t∗<1.r_\infty=\frac{p(1-x)}{x(1-p)}=e^{-t_*}<1.

    The ratios decrease with jj. They are therefore bounded by a common number below one for all sufficiently large NN. Dominated summation of the mass ratios gives

    P(SN≥k)bN,k⟶∑j=0∞r∞j=11−e−t∗.\frac{\mathbb P(S_N\geq k)}{b_{N,k}} \longrightarrow\sum_{j=0}^\infty r_\infty^j =\frac1{1-e^{-t_*}}.

    Combining this limit with the point-mass estimate yields the lattice saddle approximation

    P(AN≥x)∼e−NIp(x)(1−e−t∗)2πNx(1−x).\boxed{\mathbb P(A_N\geq x)\sim \frac{e^{-NI_p(x)}}{ (1-e^{-t_*})\sqrt{2\pi N x(1-x)}}.}

    Here x>px>p is fixed and the sequence has integral NxNx. For a general threshold, use k=⌈Nx⌉k=\lceil Nx\rceil and xN=k/Nx_N=k/N in the prefactor and exponent; rounding can change the leading multiplicative factor. The formula also requires a different approximation when x−px-p shrinks on the central-limit scale.

    There is a simple exact finite-NN bracket. Whenever

    rN,k=N−kk+1p1−p<1,r_{N,k}=\frac{N-k}{k+1}\frac p{1-p}<1,

    the decreasing ratios imply

    bN,k≤P(SN≥k)≤bN,k1−rN,k.b_{N,k}\leq\mathbb P(S_N\geq k) \leq\frac{b_{N,k}}{1-r_{N,k}}.

    Thus an asymptotic estimate and a finite-sample error control can be kept distinct.

    For p=1/3p=1/3, x=2/3x=2/3, and NN divisible by three,

    Ip(x)=log⁡23,t∗=log⁡4,11−e−t∗=43.I_p(x)=\frac{\log2}{3},\qquad t_*=\log4, \qquad \frac1{1-e^{-t_*}}=\frac43.

    The computational companion examples/mathematical-methods/probability/large-deviations.py sums the exact tail by its recurrence and compares the result with an independent binomial survival function. In the table, “saddle error” means the absolute relative error of the lattice saddle approximation.

    NNExact tailSaddle error
    30301.9375930×10−41.9375930\times10^{-4}3.8322%3.8322\%
    90901.0927317×10−101.0927317\times10^{-10}1.3726%1.3726\%
    3003005.1174697×10−325.1174697\times10^{-32}0.42448%0.42448\%
    9009001.8438061×10−921.8438061\times10^{-92}0.14283%0.14283\%

    The exact geometric bracket holds at every listed size. By contrast, the Chernoff bound is about 5.045.04 times the exact tail at N=30N=30 and 26.6226.62 times it at N=900N=900. It captures the exponential rate while omitting the decreasing prefactor. A bound can remain correct even as its relative overestimate grows.

    Changing an observable by contraction

    Suppose ANA_N obeys a large-deviation principle with good rate II and h:R→Rh:\mathbb R\to\mathbb R is continuous. Then BN=h(AN)B_N=h(A_N) has good rate

    J(y)=inf⁡x: h(x)=yI(x).J(y)=\inf_{x:\,h(x)=y} I(x).

    The infimum is +∞+\infty if the fiber is empty. For open GG, h−1(G)h^{-1}(G) is open; for closed FF, h−1(F)h^{-1}(F) is closed. Applying the original bounds to these inverse images gives the new bounds, since minimizing over all fibers above a set is the same as minimizing over its inverse image. Compact sublevel sets of II show that the finite fiber infimum is attained and that the sublevel sets of JJ are compact. This is the contraction principle; see Touchette, §III.F, Eqs. (71)–(74), p. 22 (PDF).

    For example, let ANA_N be a Gaussian sample mean with individual mean μ\mu and variance σ2>0\sigma^2>0. Its rate is

    I(x)=(x−μ)22σ2.I(x)=\frac{(x-\mu)^2}{2\sigma^2}.

    For the squared observable BN=AN2B_N=A_N^2, both preimages must be considered. The result is

    J(y)={(y−∣μ∣)22σ2,y≥0,+∞,y<0.J(y)= \begin{cases} \dfrac{(\sqrt y-|\mu|)^2}{2\sigma^2},&y\geq0,\\[4pt] +\infty,&y<0. \end{cases}

    A Jacobian affects density prefactors, but not this rate. The statement concerns the square of the sample mean, not the sample mean of the squares; those are different observables.

    A mixture whose rate is not a Legendre transform

    Choose m>0m>0 and σ>0\sigma>0. Let SS take values +1+1 and −1-1 with equal probabilities, and let the ZjZ_j be independent standard normal variables independent of SS. Define

    AN=Sm+σN∑j=1NZj.A_N=Sm+\frac{\sigma}{N}\sum_{j=1}^NZ_j.

    Conditional on SS, this is a Gaussian sample mean. The common sign is retained for the whole sample, so the variables Sm+σZjSm+\sigma Z_j are correlated without conditioning. The IID Cramér theorem does not apply to their unconditional law.

    The two component laws have good rates

    I+(x)=(x−m)22σ2,I−(x)=(x+m)22σ2.I_+(x)=\frac{(x-m)^2}{2\sigma^2},\qquad I_-(x)=\frac{(x+m)^2}{2\sigma^2}.

    Their fixed-weight mixture has rate

    I(x)=min⁡{I+(x),I−(x)}=(∣x∣−m)22σ2.\boxed{I(x)=\min\{I_+(x),I_-(x)\} =\frac{(|x|-m)^2}{2\sigma^2}.}

    This is a full set-based large-deviation statement. For any set BB, writing PN±(B)P_N^\pm(B) for the component probabilities gives

    12max⁡{PN+(B),PN−(B)}≤P(AN∈B)≤max⁡{PN+(B),PN−(B)}.\frac12\max\{P_N^+(B),P_N^-(B)\} \leq\mathbb P(A_N\in B) \leq\max\{P_N^+(B),P_N^-(B)\}.

    For an open set, retain either component and use its lower bound, then maximize over the two choices. For a closed set, use the upper inequality and the two component upper bounds. The resulting exponent is −min⁡{inf⁡BI+,inf⁡BI−}=−inf⁡BI-\min\{\inf_B I_+,\inf_B I_-\}=-\inf_B I. Goodness follows because each sublevel set is a union of two compact sets. Fixed positive mixing weights do not alter an exponential rate.

    The density independently illustrates the same minimum:

    fN(x)=12N2πσ2(e−NI+(x)+e−NI−(x)).f_N(x)=\frac12\sqrt{\frac{N}{2\pi\sigma^2}} \left(e^{-NI_+(x)}+e^{-NI_-(x)}\right).

    After removing the Gaussian prefactor, the logarithmic density obeys the exact bound

    0≤−1Nlog⁡fN(x)+12Nlog⁡N2πσ2−I(x)≤log⁡2N.0\leq-\frac1N\log f_N(x) +\frac1{2N}\log\frac{N}{2\pi\sigma^2}-I(x) \leq\frac{\log2}{N}.

    This bound supports the rate calculation; the open/closed-set argument above supplies the large-deviation principle.

    The generating function is equally explicit:

    EeNtAN=eNσ2t2/2cosh⁡(Nmt),\mathbb E e^{NtA_N} =e^{N\sigma^2t^2/2}\cosh(Nmt),

    so

    Λ(t)=σ2t22+m∣t∣.\Lambda(t)=\frac{\sigma^2t^2}{2}+m|t|.

    It has a cusp at zero. Its Legendre transform is

    Λ∗(x)=I∗∗(x)=(max⁡{∣x∣−m,0})22σ2.\boxed{\Lambda^*(x)=I^{**}(x)= \frac{\bigl(\max\{|x|-m,0\}\bigr)^2}{2\sigma^2}.}

    For ∣x∣≤m|x|\leq m, the optimizing tt is zero. For ∣x∣>m|x|>m, it is sgn⁡(x)(∣x∣−m)/σ2\operatorname{sgn}(x)(|x|-m)/\sigma^2. The answer is the lower convex envelope of II: it replaces the positive central barrier by a flat zero interval. This explicit model is a variant of Touchette, §IV.D, Example IV.7, Eqs. (111)–(116), pp. 32–33 (PDF); its general convex-envelope discussion is in §IV.D.2, pp. 30–32.

    The actual rate has two zeros and a positive central barrier; its convex envelope replaces the barrier with a flat interval.

    Exact rate functions for m=σ=1m=\sigma=1. The solid curve is the mixture rate II; the dashed curve is the Legendre result I∗∗I^{**}. They agree outside [−1,1][-1,1], but only the actual rate describes the exponential cost of intermediate values. The curves are evaluations of the displayed formulas, not fitted probability estimates.

    Exponential tilting also explains the loss. A fixed t>0t>0 selects the positive component, with typical value m+σ2tm+\sigma^2t; a fixed t<0t<0 selects the negative component, with typical value −m+σ2t-m+\sigma^2t. At t=0t=0, both components survive and the law concentrates near the two points ±m\pm m, not at every point between them. No fixed tilt makes an interior value ∣x∣<m|x|<m typical. Conditioning on such a value and imposing its conjugate tilt therefore fail to produce equivalent macroscopic behavior in this example.

    Summary

    A large-deviation rate controls logarithmic probabilities of sets. For Bernoulli sample means it follows from a smooth cumulant-generating function, while Stirling's prefactor and the lattice tail factor are needed for accurate finite-sample probabilities. Contraction minimizes the rate over all microscopic values producing the chosen observable. A nonconvex mixture rate demonstrates the limit of the Legendre construction: without its hypotheses, the transform can retain only a convex envelope and miss a real rare-event cost.

    Exercises

    1. Recover the endpoint and Gaussian limits. Find the Bernoulli rate at zero and one directly from the exact probabilities, and derive the central-limit exponent from the interior rate.
    Solution

    The probabilities of all failures and all successes are (1−p)N(1-p)^N and pNp^N. Dividing their logarithms by −N-N gives Ip(0)=−log⁡(1−p)I_p(0)=-\log(1-p) and Ip(1)=−log⁡pI_p(1)=-\log p. These agree with the continuous extension using xlog⁡x→0x\log x\to0.

    At x=px=p, the first derivative vanishes and Ip′′(p)=1/[p(1−p)]I_p''(p)=1/[p(1-p)]. Consequently

    NIp(p+yN)=y22p(1−p)+O(N−1/2)NI_p\left(p+\frac y{\sqrt N}\right) =\frac{y^2}{2p(1-p)}+O(N^{-1/2})

    for fixed yy. Including the local binomial prefactor and the lattice spacing yields the Gaussian density with variance p(1−p)p(1-p) for N(AN−p)\sqrt N(A_N-p). The rate expansion alone gives its exponent, not its normalization.

    1. Bound a tail without an asymptotic expansion. At p=1/3p=1/3, N=30N=30, k=20k=20, compute the geometric upper factor and compare it with the limiting lattice factor.
    Solution

    The first ratio is

    r30,20=102112=521.r_{30,20}=\frac{10}{21}\frac12=\frac5{21}.

    All subsequent ratios are smaller, so

    b30,20≤P(S30≥20)≤2116b30,20.b_{30,20}\leq\mathbb P(S_{30}\geq20) \leq\frac{21}{16}b_{30,20}.

    The factor 21/16=1.312521/16=1.3125 is an exact upper bound on the tail-to-mass ratio at this NN. The exact ratio is approximately 1.2966651.296665. The limiting factor 4/34/3 is larger and becomes the appropriate leading asymptotic ratio as NN grows with k=2N/3k=2N/3. The saddle estimate also replaces the exact point mass by a Stirling approximation, so its error is a separate quantity.

    1. Contract to a variance-like statistic. For Bernoulli success probability 0<p<1/20<p<1/2, find the rate of BN=AN(1−AN)B_N=A_N(1-A_N).
    Solution

    The range is [0,1/4][0,1/4]. For yy in that interval the two preimages are

    x−=1−1−4y2,x+=1−x−.x_- =\frac{1-\sqrt{1-4y}}2,\qquad x_+=1-x_-.

    Their rate difference is

    Ip(x+)−Ip(x−)=(1−2x−)log⁡1−pp≥0.I_p(x_+)-I_p(x_-) =(1-2x_-)\log\frac{1-p}{p}\geq0.

    Thus J(y)=Ip(x−)J(y)=I_p(x_-) on [0,1/4][0,1/4] and J(y)=+∞J(y)=+\infty elsewhere. The minimum occurs at y=p(1−p)y=p(1-p). The observable forgets whether the sample mean lies above or below one half; the smaller rate, rather than an arbitrary branch of the inverse, determines its probability cost.

    1. Change the mixture weights. Replace the equal sign probabilities by P(S=+1)=w\mathbb P(S=+1)=w and P(S=−1)=1−w\mathbb P(S=-1)=1-w, with fixed 0<w<10<w<1. Determine the rate, limiting generating function and typical behavior at zero tilt.
    Solution

    Multiplication of a component probability by a fixed positive constant changes its logarithm by O(1)O(1), which vanishes after division by NN. The same open/closed-set argument therefore gives the unchanged rate min⁡(I+,I−)\min(I_+,I_-).

    The scaled generating function is

    σ2t22+1Nlog⁡(weNmt+(1−w)e−Nmt),\frac{\sigma^2t^2}{2} +\frac1N\log\left(w e^{Nmt}+(1-w)e^{-Nmt}\right),

    whose limit is again σ2t2/2+m∣t∣\sigma^2t^2/2+m|t|. Its convex transform is unchanged. At zero tilt, however, the limiting law is

    w δm+(1−w) δ−m.w\,\delta_m+(1-w)\,\delta_{-m}.

    Large deviations retain the two zero-cost locations but do not determine their relative weights. If the weights themselves decrease exponentially with NN, they contribute an additional rate and this conclusion no longer follows.

    References

    Scrollable formula. Use Left and Right arrow keys to reveal hidden content.

    Scrollable table. Use Left and Right arrow keys to reveal hidden columns.

    Scrollable figure. Use Left and Right arrow keys to reveal hidden content.