Where did I go wrong in proving $\mathbb E[X^{2n}] = \prod_{1 \leq k \leq 2n, k \operatorname{odd}}k$

Let $X$ ~ $\mathcal{N}(0,1)$. Show that: $\displaystyle \mathbb E[X^{2n}] = \prod_{1 \leq k \leq 2n, k \operatorname{odd}}k$


Idea:

$$\mathbb E[X^{2n}]=\frac{1}{\sqrt{2\pi}}\int_{\mathbb R}x^{2n}e^{-\frac{x^2}{2}}dx=\frac{2}{\sqrt{2\pi}}\int_{0}^{\infty}x^{2n}e^{-\frac{x^2}{2}}dx~,$$ then set $t=x^2 / 2 \Rightarrow dt=xdx$ and

$$\frac{2}{\sqrt{2\pi}}\int_{0}^{\infty}x^{2n}e^{-\frac{x^2}{2}}dx=\frac{2^{n+1}}{\sqrt{\pi}}\int_{0}^{\infty}t^{n-\frac{1}{2}}e^{-t}dt=\frac{2^{n+1}}{\sqrt{\pi}}\Gamma(n+\frac{1}{2})$$

I know that in order to get the desired result, I need to show that:

$$\frac{2}{\sqrt{2\pi}}\int_{0}^{\infty}x^{2n}e^{-\frac{x^2}{2}}dx=\frac{2}{\sqrt{\pi}}\Gamma(n+\frac{1}{2})$$

But I am far off it, where did I go wrong?


Solution 1:

You were actually off only by a factor of 2. With your choice of change of variable, \begin{align} \frac2{\sqrt{2\pi}}\int_{0}^{\infty}x^{2n}e^{-\frac{x^2}2 }dx &= \frac2{\sqrt{2\pi}}\int_{0}^{\infty}x^{2(n - \frac12)} e^{-\frac{x^2}2 } \cdot xdx \\ &=\frac{ 2^{1/2} }{\sqrt{\pi}}\int_{0}^{\infty}(2t)^{n - \frac12} e^{-t^2 } \cdot dt \\ &= \frac{2^n}{\sqrt{\pi}}\int_{0}^{\infty}t^{n-\frac12}e^{-t}dt=\frac{2^n}{\sqrt{\pi}}\Gamma\Bigl( n + \frac12 \Bigr) \end{align}

Invoking the definition of Gamma function that $\Gamma(x) = (x-1)\Gamma(x-1)$, for $n \in \mathbb{N}$ we have \begin{align} &\phantom{ {}={} }\frac{2^n}{\sqrt{\pi}}\Gamma\Bigl( n + \frac12 \Bigr) \\ &= \frac{ 2^{n-1} }{\sqrt{\pi}} \cdot 2\cdot \Bigl( n - \frac12 \Bigr)\cdot \Gamma\Bigl( n - \frac12 \Bigr) \\ &= \frac{ 2^{n-2} }{\sqrt{\pi}} \cdot (2n - 1) \cdot 2\Bigl( n - \frac32 \Bigr) \cdot \Gamma\Bigl( n - \frac32 \Bigr) \\ & \hspace{36pt}\vdots \\ &=\frac1{\sqrt{\pi}} \cdot (2n-1) \hspace{-10pt} \underbrace{(2n-3)}_{\text{from}~n-\frac12-(1)~\text{so 2nd}} \hspace{-24pt} \overbrace{(2n-5)}^{\text{from}~n-\frac12-(2)~\text{so 3rd}} \hspace{-12pt} \ldots 5\cdot 3\cdot \hspace{-24pt} \underbrace{\Bigl(2 \cdot \frac12 \Bigr)}_{\text{from}~n-\frac12-(n-1)~\text{so $n$ th}} \hspace{-24pt} \cdot\Gamma\Bigl( \frac12 \Bigr) \\ &= (2n-1)(2n-3)(2n-5)\cdots 5\cdot 3 \cdot 1 \end{align} as desired, where it is well-known that $\Gamma(1/2) = \sqrt{\pi}$.

Solution 2:

I think your computation is actually correct. Note that $$\Gamma(n+\frac{1}{2})=\frac{1\cdot 3\cdot 5\cdot\cdots\cdot (2n-1)}{2^n}\sqrt{\pi}$$ see here, for instance. Thus, the expression you derived is actually exactly what you want.

Solution 3:

You can also prove this by induction using integration by parts: \begin{align} \int x^{2n}e^{-x^2/2}\,dx &=\int x^{2n-1}\cdot xe^{-x^2/2}\,dx \\&=-\int x^{2n-1}d\big(e^{-x^2/2}\big) \\&=-[x^{2n-1}e^{-x^2/2}]\Big|^{\infty}_{-\infty}+\int e^{-x^2/2}d\big(x^{2n-1}\big) \\&=0+(2n-1)\int x^{2n-2}e^{-x^2/2}\,dx \end{align} Now apply the induction hypothesis.