Lambdia

A Linear Term in the Exponent Moves the Bell and Does Nothing Else

A plain t sitting next to the t squared in a Gaussian exponent looks like a new function and is only a shift. Completing the square turns the integral of e to the minus a t squared over two plus b t, from x to infinity, into e to the b squared over 2a times the root of 2 pi over a times the standard normal at a rescaled and shifted argument, never at x itself. The worked case comes out as exactly half a bell, e root pi over two or 2.40901455, but only because its lower limit happens to land on the centre b over a.

Here is an integral that looks like it needs a new function:

1e2tt2dt\int_1^{\infty} e^{2t - t^2}\,dt
(1)

A Gaussian integrand has t2t^2 in the exponent and nothing else. This one has a plain tt sitting next to it, which is enough to make a candidate reach for a table of special functions. Nothing new has arrived. The linear term moves the bell sideways, and the value is eπ/2=2.40901455e\sqrt{\pi}/2 = 2.40901455.

Completing the square in the exponent

The exponent is a quadratic in tt, so write it as a quadratic in one shifted variable:

2tt2=(t22t)=[(t1)21]=1(t1)22t - t^2 = -(t^2 - 2t) = -\left[(t-1)^2 - 1\right] = 1 - (t-1)^2
(2)

The integrand is therefore ee(t1)2e \cdot e^{-(t-1)^2}: a bell of the ordinary shape, parked at t=1t = 1 instead of the origin, with a constant factor of ee outside. And the lower limit of the integral is 1, which is exactly the centre. So the integral is half the total area under that bell:

1e2tt2dt=e0es2ds=eπ2=2.40901455\int_1^{\infty} e^{2t-t^2}\,dt = e \int_0^{\infty} e^{-s^2}\,ds = e \cdot \frac{\sqrt{\pi}}{2} = 2.40901455
(3)

Two conveniences did the work there, and only one of them generalises. Completing the square always works. The lower limit landing on the centre is a coincidence of this particular problem, and it is worth being suspicious of, because it is precisely the step that turns a tail into a half.

Fig. 1 — Same shape, moved and rescaled. The lower limit of (1) sits on the peak, which is why the answer is half a bell rather than a genuine tail.

The general integral, and where each piece comes from

Now do it with letters. Take a>0a > 0 and any real bb, and complete the square the same way:

at22+bt=a2(tba) ⁣2+b22a-\frac{a t^2}{2} + b t = -\frac{a}{2}\left(t - \frac{b}{a}\right)^{\!2} + \frac{b^2}{2a}
(4)

Substitute u=a(tb/a)u = \sqrt{a}\,(t - b/a), so dt=du/adt = du/\sqrt{a} and the lower limit t=xt = x becomes u=a(xb/a)u = \sqrt{a}(x - b/a). What is left is the upper tail of a standard normal density, and the tail flip 1N(z)=N(z)1 - N(z) = N(-z) puts it in its usual form:

xeat22+btdt=eb22a2πa  N ⁣(a(xba))\int_x^{\infty} e^{-\frac{a t^2}{2} + b t}\,dt = e^{\frac{b^2}{2a}}\sqrt{\frac{2\pi}{a}}\;N\!\left(-\sqrt{a}\left(x - \frac{b}{a}\right)\right)
(5)

Read off what the two parameters did. The centre moved from 0 to b/ab/a. The width scaled by 1/a1/\sqrt{a}, so a larger aa gives a narrower bell and the 2π/a\sqrt{2\pi/a} in front is the area of that narrower bell. And the constant eb2/2ae^{b^2/2a} came out of the integral entirely, because it does not depend on tt.

Checking (5) against the worked case is a two-second exercise: at a=2,b=2,x=1a = 2, b = 2, x = 1 the prefactor is e4/4=ee^{4/4} = e, the area factor is π\sqrt{\pi}, and the argument of NN is 2(11)=0-\sqrt{2}(1 - 1) = 0, so the whole thing is eπN(0)=eπ/2e\sqrt{\pi}\,N(0) = e\sqrt{\pi}/2. The zero inside NN is where the half came from.

The function the answer is written in

N(z)=12πzes2/2dsN(z) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{z} e^{-s^2/2}\,ds is the standard normal distribution function, with N(0)=1/2N(0) = 1/2 and N(z)=1N(z)N(-z) = 1 - N(z). Numerically it is the complementary error function in disguise, N(z)=12erfc(z/2)N(z) = \tfrac{1}{2}\,\mathrm{erfc}(-z/\sqrt{2}), which is how a library evaluates it and why the identity above holds to the last bit rather than approximately.

Answering in the wrong argument

The tempting mistake is to give the answer in terms of N(x)N(x), with the original limit sitting inside the normal function untouched. That is only correct when a=1a = 1 and b=0b = 0, which is the case the formula was memorised from. The whole content of (5) lives in the argument: subtract the new centre, then multiply by a\sqrt{a} because the standard normal expects a variable measured in its own widths. Skip either operation and the answer is wrong by an amount that grows with bb.

Three measured features make the same point without any algebra. Locate the peak of eat2/2+bte^{-at^2/2+bt} numerically and it sits at b/ab/a; its height is eb2/2ae^{b^2/2a}; and the distance from the peak to where the integrand has fallen to half its height is 2ln2/a\sqrt{2\ln 2/a}, which is 1.1774 for the plain bell and 0.8326 for ours. Every one of those is a statement about the bell being moved and rescaled rather than replaced.

Fig. 2 — Everything the two parameters do, measured rather than derived. The shape is untouched.

The same bell, with the limit moved off the peak

It is worth doing one case where the half does not appear, because that is the case (5) was written for. Keep a=2a = 2 and b=2b = 2 and raise the lower limit to x=2.5x = 2.5. The centre is still 1 and the width is still 1/21/\sqrt{2}, so the limit now sits 2(2.51)=2.1213\sqrt{2}(2.5 - 1) = 2.1213 widths past the peak, and the normal factor is N(2.1213)=0.016947N(-2.1213) = 0.016947. Multiplying by the same eπ=4.81866e\sqrt{\pi} = 4.81866 gives 0.08165, thirty times smaller than the answer to the original question. Nothing about the algebra changed; only the argument of NN did.

The other direction is a useful sanity check on the formula. Setting a=1a = 1 and b=0b = 0 removes both the shift and the rescaling, and (5) reduces to 2πN(x)\sqrt{2\pi}\,N(-x), which is the plain Gaussian tail with no dressing. At x=0.5x = 0.5 that is 0.77339. Every departure from that expression in the general case is one of the three effects in Fig. 2 and nothing else.

Where the formula stops being usable

The condition a>0a > 0 is not a technicality. At a=0a = 0 the integrand is ebte^{bt}, which diverges on an infinite upper range for positive bb, and for a<0a < 0 the exponent grows quadratically and the integral diverges for every bb and every xx. The 2π/a\sqrt{2\pi/a} in (5) is a warning sign as much as a factor.

There is also a numerical trap the algebra hides. Ordinary parameters are fine: at a=0.7,b=2.3,x=2a = 0.7, b = 2.3, x = 2 the three factors are 43.75, 2.996 and 0.859, and the product is 112.5983. Push bb to 40 and xx to 100 with the same aa and the prefactor becomes e1142.86e^{1142.86}, which is around 1049610^{496} and beyond the range of a double, while the normal factor drops to about 7×102827 \times 10^{-282}. Their product is a perfectly representable 4.68×102154.68 \times 10^{215}, but computing it as written returns infinity times zero. Add the logarithms and exponentiate once at the end.

Finally, the shape of (5) is worth recognising when it turns up somewhere else. Writing TT for a normal variable with variance 1/a1/a, the left side of (5) is proportional to E ⁣[ebT1{T>x}]\mathbb{E}\!\left[e^{bT}\mathbf{1}\{T > x\}\right], an exponential payoff restricted to a tail. That is the integral that appears twice in the derivation of a European option price, once with bb and once with bb shifted by one, and the two normal terms in the final formula are the two copies of N(a(xb/a))N(-\sqrt{a}(x - b/a)). The completed square is doing the same work in both places.

Sources and further reading

Formula (5) was checked against adaptive Simpson quadrature at seven parameter triples chosen to cover negative bb, negative xx, values of aa on both sides of 1 and a limit far into the tail, each agreeing to a relative error below 10910^{-9}. The peak position, peak height and half-width quoted above were located numerically by search rather than read off the algebra, and the worked case was confirmed to be exactly half the whole bell.

Commentaires · 0

Sois le premier à commenter.