Expected Value of the Cosine of a Random Variable Following the Standard Normal Distribution

Page content

Proposition

For a random variable X following the standard normal distribution N(0,1), the expected value of cosX is 1e.

Proof 1

The probability density function of the standard normal distribution is given by:

f(x)=12πexp[x22]

Therefore, the expectation of cosX is:

E[cosX]=cosxf(x)dx=cosx12πexp[x22]dx

To compute this integral, we use the fact that:

cosx=eix+eix2

Thus:

E[cosX]=122πexp[x22+ix]dx+122πexp[x22ix]dx

By substituting t=x, it is shown that the first and second terms on the right-hand side are equal.

Therefore:

E[cosX]=12πexp[x22ix]dx

To solve this, complete the square in the exponent of the integrand:

E[cosX]=12πexp[(x+i)2212]dx=1e2πexp[(x+i)22]dx

Substitute z=x+i:

E[cosX]=1e2πii+exp[z22]dz

This becomes a complex integral.

Consider a rectangular contour C with vertices R,R+i,R+i,R:

C1:RR+i

C2:R+iR+i

C3:R+iR

C4:RR

C:C1+C2+C3+C4

Since C is a simple closed curve and exp[z22] is analytic, by Cauchy’s integral theorem:

Cexp[z22]dz=0

Also, assuming R is large enough,

|C1exp[z22]dz|=|01exp[(R+it)22]dt|01|exp[(R+it)22]|dt=01exp[(R+it)22]dt=01exp[R2t22]dt01exp[R212]dt=exp[R212]

Thus, as R,

C1exp[z22]dz0

Similarly,:

C3exp[z22]dz0

Therefore, as R:

C2exp[z22]dz+C4exp[z22]dz0

The integral along C4 is the Gaussian integral along the real axis:

C4exp[z22]dz2π

Thus:

C2exp[z22]dz2π

Hence:

E[cosX]=1e2πii+exp[z22]dz=1e2πlimRC2exp[z22]dz=1e2π2π=1e

Proof 2

Using the Maclaurin series expansion of cosx:

E[cosX]=E[(1X22!+X44!)]=E[1]E[X2]2!+E[X4]4!

Let:

In:=E[X2n]=x2n12πex22dx

Using integration by parts:

x2nex22dx=[x2n+12n+1ex22]x2n+12n+1(x)ex22dx=0+x2n+22n+1ex22dx=12n+1x2n+2ex22dx

So:

In+1=(2n+1)In

Using this recurrence relation repeatedly:

In=(2n1)!!I0=(2n1)!!

Thus:

E[cosX]=I0I12!+I24!=11!!2!+3!!4!=1121+314321=112+142=11211!+12212!=n=0(12)nn!=e12=1e

Note

It should be noted that the expected value of sinX is trivial and equals 0. This is because the integrand becomes the product of an even function and an odd function.

The graph of the integrand function considered here is as follows. In this case, we calculated the area (considering the sign) of the region enclosed by this graph and the x-axis.

If the characteristic function of the normal distribution is known, this problem is very simple.

Since the probability density function is an even function,

ϕ(t)=E[eitX]=E[cos(tX)]

therefore, by substituting t=1 into the characteristic function

ϕ(t)=exp[t22]

the result can be immediately obtained.

Fourier Transform of the Probability Density Function of the Normal Distribution (Gaussian Function)