A continuous random variable \(X\) has probability density function given by
\[
\f(x) =
\begin{cases}
0 & \mbox{for } x<0 \\
k\e^{-2 x^2} & \mbox{for } 0\le x< \infty \;,\\
\end{cases}
\]
where \(k\) is a constant.
Sketch the graph of \(\f(x)\).
Find the value of \(k\).
Determine \(\E(X)\) and \(\var(X)\).
Use statistical tables to find,
to three significant figures, the median value of \(X\).
\begin{align*}
\mathbb{E}[X] &= \int_0^\infty x f(x) \, dx \\
&= \frac{2\sqrt{2}}{\sqrt{\pi}}\int_0^\infty x e^{-2x^2}\, dx \\
&= \frac{2\sqrt{2}}{\sqrt{\pi}} \left [-\frac{1}{4}e^{-2x^2} \right]_0^\infty \\
&= \frac{1}{\sqrt{2\pi}} \\
\end{align*}
In order to calculate \(\mathbb{E}(X^2)\) it is useful to consider the related computation \(\mathbb{E}(Y^2)\). In fact, by symmetry, these will be the same values. Therefore \(\mathbb{E}(X^2) = \mathbb{E}(Y^2) = \mathrm{Var}(Y) = \frac{1}{4}\) (since \(\mathbb{E}(Y) = 0\)).
Therefore \(\mathrm{Var}(Y) = \mathbb{E}(Y^2) - \mathbb{E}(Y)^2 = \frac14 - \frac{1}{2\pi}\)