1

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.

Idonknow
  • 16,493
  • 4
    This is just the real part of the charateristic function evaluated at $1$ and the answer is $e^{-\sigma^{2}/2}$. – Kavi Rama Murthy Nov 18 '19 at 08:04
  • 1
    @KaboMurphy Wow! I am not familiar with characteristic function. Perhaps you can post your comment as an answer? – Idonknow Nov 18 '19 at 08:09
  • Similar questions: https://math.stackexchange.com/questions/2134801/compute-e-sin-x-if-x-is-normally-distributed, https://math.stackexchange.com/questions/3121914/variance-of-sine-and-cosine-of-a-random-variable. – StubbornAtom Nov 19 '19 at 07:09

2 Answers2

7

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$.

NCh
  • 14,089
  • 4
  • 18
  • 33
6

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}$.