Evaluate $\frac{1}{\sqrt{2\pi \sigma^2}} \int_{-\infty}^\infty \cos (x)e^{-\frac{1}{2} \left( \frac{x}{\sigma} \right)^2 }dx$

1k Views Asked by At

Question: Given that $X$ is a random variable following normal distribution with mean $0$ and variance $\sigma^2.$ What is the expected value of $\cos(X)?$

Recall that the probability density function of a normal distribution with mean $\mu$ and variance $\sigma^2$ is $$f(x) = \frac{1}{\sqrt{2\pi \sigma^2}} e^{-\frac{1}{2} \left( \frac{x-\mu}{\sigma} \right)^2 }.$$ So the required expected value is $$E[\cos(X)] = \frac{1}{\sqrt{2\pi \sigma^2}} \int_{-\infty}^\infty \cos (x)e^{-\frac{1}{2} \left( \frac{x}{\sigma} \right)^2 }dx.$$

However, I fail to evaluate the integral by hand.

2

There are 2 best solutions below

2
On

This is the real part of the characteristic function of normal distribution. See For example: https://en.wikipedia.org/wiki/Characteristic_function_(probability_theory)

The value of the integral is $e^{-\sigma^{2}/2}$.

0
On

In addition to the previous answer. One can get also $\cos x=\frac{e^{ix}+e^{-ix}}{2}$ (just the same), so $$ \mathbb E[\cos(X)]=\frac12\left(\mathbb E[e^{iX}]+\mathbb E[e^{-iX}]\right) = \frac12\left(\varphi_X(1)+\varphi_X(-1)\right) $$ where $$\varphi_X(t)=\mathbb E[e^{itX}]=e^{it\mu-\frac{t^2\sigma^2}{2}}=e^{-t^2\sigma^2/2}\left(\cos(t\mu)+i\sin(t\mu)\right)$$ is a characteristic function of $X$. Finally, $$ \mathbb E[\cos(X)]=\frac12 e^{-\sigma^2/2}\left(\cos(\mu)+i\sin(\mu)+\cos(-\mu)+i\sin(-\mu)\right) = \cos(\mu)e^{-\sigma^2/2}. $$ For $\mu=0$, $\cos(\mu)=1$.