# Compute $E(\sin X)$ if $X$ is normally distributed

If $X$ is normally distributed with mean $\mu$ and standard deviation $\sigma$ what is the expected value $E[\sin(x)]$? I think this has something to do with the characteristic function...

• If $X=\mu+\sigma X_0$ with $X_0$ standard gaussian, then $\sin X=\sin(\mu)\cos(\sigma X_0)+\cos(\mu)\sin(\sigma X_0)$ and $E(\sin(\sigma X_0))=0$ by symmetry hence $$E(\sin X)=\sin(\mu) E(\cos(\sigma X_0))$$ To compute $E(\cos(\sigma X_0))=\Re E(e^{i\sigma X_0})$ note that $$\int_{-\infty}^\infty\frac1{\sqrt{2\pi}}e^{i\sigma x}e^{-x^2/2}dx=\int_{-\infty}^\infty\frac1{\sqrt{2\pi}}e^{-\sigma^2/2}e^{-(x-i\sigma)^2/2}dx=e^{-\sigma^2/2}$$ hence, finally, $$E(\sin X)=\sin(\mu)e^{-\sigma^2/2}$$
– Did
Commented Feb 8, 2017 at 12:25
• Naturally, a shortcut is $$E(\sin X)=\Im E(e^{iX})=\Im(e^{i\mu-\sigma^2/2})=\Im(e^{i\mu})e^{-\sigma^2/2}=\ldots$$
– Did
Commented Feb 8, 2017 at 12:29

Let $X\sim \mathcal{N}(\mu,\sigma)$. Then, the characteristic function of $X$ is

$$t\mapsto\phi_{X}(t):=\Bbb E[\exp(itX)]=\exp\left(i\mu-\frac{\sigma^{2}t^{2}}{2}\right)$$

By linearity of the integral, we have, for any integrable complex-valued function $f$:

$$\mathfrak{Im}\int f=\int \mathfrak{Im} f \tag{1}$$

where $\mathfrak{Im}$ denotes the imaginary part of a complex number and is defined pointwise for a complex-valued function. Indeed, let $(\Omega,\mathcal{F},\nu)$ be a measure space and $f:\Omega\to\Bbb C$ a $\nu$-integrable function. Then, for any $\omega\in\Omega$, we can write:

$$f(\omega)=f_{1}(\omega)+if_{2}(\omega)$$

where $f_{1}$ and $f_{2}$ are real-valued function on $\Omega$. It is easy to see that $f_{1}$ and $f_{2}$ are integrable if $f$ is integrable (actually, if and only if). Therefore, we have:

$$\int_{\Omega} f\text{d}\nu=\int_{\Omega}f_{1}+if_{2}\text{d}\nu:=\int_{\Omega}f_{1}\text{d}\nu+i\int_{\Omega}f_{2}\text{d}\nu$$

$(1)$ follows obviously.

Hence, we have:

\begin{align*} \Bbb E[\sin(X)]&=\,\Bbb E[\mathfrak{Im}\exp(iX)]\\ &=\mathfrak{Im}\,\Bbb E[\exp(iX)]\\ &=\mathfrak{Im}\,\Bbb \phi_{X}(1)\\ &=\mathfrak{Im}\exp\left(i\mu-\frac{\sigma^{2}}{2}\right)\\ &=\sin(\mu)\exp\left(-\frac{\sigma^{2}}{2}\right) \end{align*}

• I am looking for a simpler way to do this... thanks though Commented Feb 8, 2017 at 12:58
• @David I understand. I wasn't sure that you'd know these tools. However, I doubt you can avoid complex functions. Did's comment seems simpler. The only advantage of my answer is that it works for many distributions. Commented Feb 8, 2017 at 13:01