# Characteristic function of a standard normal random variable

The characteristic function of a random variable $$X$$ is given by $$\Phi_X(\omega) = \mathbb{E}e^{j\omega X}=\int_{-\infty}^\infty e^{j\omega x}f_X(x) dx.$$ One can easily capture the similarity between this integral and the Fourier transform.

For a standard normal random variable, the characteristic function can be found as follows: $$\Phi_X(\omega)= \int_{-\infty}^\infty \frac{1}{\sqrt{2\pi}}e^{-\frac{x^2}{2}}e^{j\omega x} dx = \int_{-\infty}^\infty \frac{1}{\sqrt{2\pi}}\exp\left(-\frac{(x^2-2j\omega x)}{2}\right)dx$$

I know that the answer must be $$\Phi_X(\omega) = \exp(-\omega^2/2)$$, but can you explain how to evaluate the integral with a complex number in the exponent?

• You can take the derivative with respect to $\omega$, and integrate by parts to get a differential equation. Nov 27, 2011 at 13:32
• Is it a good way to use the fact that "If $f$ and $g$ are real functions then $\int (f + i g) = \int f + i \int g$" math.stackexchange.com/q/85941/1281 ?
– Tim
Nov 27, 2011 at 13:40

Do it without complex numbers, notice that

$$\begin{eqnarray} \mathcal{F}(\omega) = \int_{-\infty}^\infty \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{x^2}{2}} \mathrm{e}^{j \omega x} \mathrm{d} x &=& \int_{0}^\infty \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{x^2}{2}} \mathrm{e}^{j \omega x} \mathrm{d} x + \int_{-\infty}^0 \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{x^2}{2}} \mathrm{e}^{j \omega x} \mathrm{d} x \\ &=& \int_{0}^\infty \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{x^2}{2}} \mathrm{e}^{j \omega x} \mathrm{d} x + \int_{0}^{\infty} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{x^2}{2}} \mathrm{e}^{-j \omega x} \mathrm{d} x \\ &=& 2 \int_{0}^\infty \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{x^2}{2}} \cos(\omega x) \mathrm{d} x \end{eqnarray}$$ Now, compute $\mathcal{F}^\prime(\omega)$, and integrate by parts: $$\begin{eqnarray} \mathcal{F}^\prime(\omega) &=& -\frac{2}{\sqrt{2\pi}} \int_0^\infty \mathrm{e}^{-\frac{x^2}{2}} x \sin(\omega x) \mathrm{d} x = \frac{2}{\sqrt{2\pi}} \int_0^\infty \sin(\omega x) \mathrm{d} \left( \mathrm{e}^{-\frac{x^2}{2}} \right) \\ &=& \frac{2}{\sqrt{2\pi}} \left. \mathrm{e}^{-\frac{x^2}{2}} \sin(\omega x) \right|_0^\infty - \frac{2}{\sqrt{2\pi}} \int_0^\infty \mathrm{e}^{-\frac{x^2}{2}} \omega \cos(\omega x) \mathrm{d} x \\ &=& - \omega \mathcal{F}(\omega) \end{eqnarray}$$ The solution to so obtained ODE, $\mathcal{F}^\prime(\omega) = - \omega \mathcal{F}(\omega)$ is $\mathcal{F}(\omega) = c \exp\left( - \frac{\omega^2}{2} \right)$, and the integration constant is seen to be one from normalization requirement $\mathcal{F}(0)=1$ of the Gaussian probability density.

Complex integration: As you have started, complete the square: $$\left( -\frac{x^2}{2} + j \omega x \right) = \left( -\frac{x^2}{2} + j \omega x + \frac{\omega^2}{2} \right) - \frac{\omega^2}{2} = -\frac{1}{2} \left( x - j \omega \right)^2 - \frac{\omega^2}{2}$$ We then have: $$\mathcal{F}(\omega) = \mathrm{e}^{-\frac{\omega^2}{2}} \cdot \int_{-\infty}^\infty \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{1}{2} \left( x - j \omega \right)^2 } \mathrm{d} x$$ The integral $I = \int_{-\infty}^\infty \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{1}{2} \left( x - j \omega \right)^2 } \mathrm{d} x$ is indeed $1$. To see this, consider $$\begin{eqnarray} I_L &=& \int_{-L}^L \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{1}{2} \left( x - j \omega \right)^2 } \mathrm{d} x = \int_{-L-j \omega}^{L-j \omega} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z \\ &=& \left(\int_{-L-j \omega}^{L-j \omega} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z - \int_{-L}^{L} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z\right) + \int_{-L}^{L} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z \\ &=& \left(\int_{-L-j \omega}^{L-j \omega} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z - \int_{-L}^{L} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z\right) + \mathcal{I}_L \end{eqnarray}$$ Here we denoted $\mathcal{I}_L = \int_{-L}^{L} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z$. Notice that $\lim\limits_{L \to \infty} \mathcal{I}_L = 1$.

Consider a complex contour $\mathcal{C}$, $-L \to L \to L - j \omega \to -L - j \omega \to -L$: $$\begin{eqnarray} I_L - \mathcal{I}_L &=&\left(\int_{-L-j \omega}^{L-j \omega} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z - \int_{-L}^{L} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z\right) \\ &=& -\int_\mathcal{C} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z - \int_{L}^{L-j \omega} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z - \int_{-L-j \omega}^{-L} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z \end{eqnarray}$$ The integral over $\mathcal{C}$ is zero, since the integrand is holomorphic. Therefore: $$I-1 = \lim_{L \to \infty} (I_L-\mathcal{I}_L) = \lim_{L \to \infty} \left( - \int_{L}^{L-j \omega} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z - \int_{-L-j \omega}^{-L} \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{z^2}{2} } \mathrm{d} z \right)$$ And the limit above is easily seen to vanish. Indeed: $$\lim_{L\to\infty} \left| \mathrm{e}^{-\frac{-(-L - j \omega t)^2}{2}} \right| = \lim_{L\to\infty} \left| \mathrm{e}^{-\frac{-(L^2 + \omega^2 t^2)}{2}} \right| =0.$$

• +1. Thanks! Why instead of directly computing $\int_{0}^\infty \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-\frac{x^2}{2}} \cos(\omega x) \mathrm{d} x$ (btw, I don't know how to directly integrate it), you solved it indirectly by constructing a ODE?
– Tim
Nov 27, 2011 at 14:14
• @Tim It seemed like the simplest approach. The only two other approaches I am aware of are 1) to write $\cos(\omega x)$ into Taylor series and integrate term-wise, 2) use Mellin-convolution theorem. Neither is simpler. Nov 27, 2011 at 14:24
• Sasha: the $+1$ term which appears at the third line in the computation of $I_L$ should read $1+o(1)$, I believe.
– Did
Dec 10, 2011 at 21:35
• @DidierPiau Welcome back and thank you for the feedback. I have edited the post to make the equation precise. Dec 10, 2011 at 22:17
• how in the first method, is moving d/dw into the integral justified? Nov 13, 2012 at 0:19

There is an alternative approach which is based on the relation between moment-generating function and characteristic function. More accurately, assume that $$X$$ is a random variable such that there exists $$\delta\in(0,\infty]$$ for which

$$M_X(t)\equiv Ee^{tX}<\infty\ , \ \forall t\in(-\delta,\delta)\,.$$

Then, it is known (e.g., see my answer to How to prove: Moment Generating Function Uniqueness Theorem) that

$$\phi_X(z)\equiv Ee^{zX}\ \ , \ \ \forall z\in \Omega\equiv\left\{x+iy\ ;\ x\in(-\delta,\delta)\right\}$$

is an analytic continuation of $$M_X(\cdot)$$ to the domain $$\Omega$$. This implies that for every $$t\in\mathbb{R}$$ $$M_X(t)=\phi_X(t)$$ and $$\psi_X(t)\equiv Ee^{itX}=\phi_X(it)\,.$$

Now, it is straightforward that for every $$z\in\Omega$$ it is possible to derive an expresssion for $$\phi_X(iz)$$ by computing a formula for $$\phi_X(z)$$ and then insert to this formula $$iz$$ instead of $$z$$. Thus, as a special case, in order to derive an expression for $$\psi_X(t)$$ at some point $$t\in(-\delta,\delta)$$, it is possible to compute $$M_X(t)$$ and then to insert $$it$$ instead of $$t$$ into the resulting expression.

In particular, if $$X\sim N(0,1)$$, then it is straightforward to show that for every $$t\in\mathbb{R}$$ $$M_X(t)=e^{\frac{t^2}{2}}<\infty$$ (that is $$\delta=\infty$$) and hence, replacing $$t$$ by $$it$$ implies that

$$\psi_X(t)= e^{-\frac{t^2}{2}}\ , \ \forall t\in\mathbb{R}\,.$$